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