27 lines
455 B
Go
27 lines
455 B
Go
|
package notifier
|
||
|
|
||
|
import "github.com/ycyxuehan/zelda/pkg/notifier/api"
|
||
|
|
||
|
type DingTalk struct {
|
||
|
messageChan chan api.Message
|
||
|
accessToken string
|
||
|
}
|
||
|
|
||
|
func NewDingTalk(token string, queueLength int)*DingTalk{
|
||
|
if queueLength < 1 {
|
||
|
queueLength = 1
|
||
|
}
|
||
|
return &DingTalk{
|
||
|
accessToken: token,
|
||
|
messageChan: make(chan api.Message, queueLength),
|
||
|
}
|
||
|
}
|
||
|
|
||
|
func (dt *DingTalk)Run()error{
|
||
|
return nil
|
||
|
}
|
||
|
|
||
|
func (dt *DingTalk)Send(msg api.Message)error{
|
||
|
return nil
|
||
|
}
|