feat: add bark push notification

This commit is contained in:
Simon Ding
2024-07-29 18:06:32 +08:00
parent eed72c5eb9
commit e08c126af2
4 changed files with 153 additions and 19 deletions

View File

@@ -20,7 +20,7 @@ type Notifier struct {
func (s *Notifier) SendMsg(msg string) error {
notifier := notify.New()
notifier.UseServices(s.service)
return notifier.Send(context.TODO(), "polaris", msg)
return notifier.Send(context.TODO(), "Polaris", msg)
}
var handler = utils.Map[string, HandlerFunc]{}
@@ -29,6 +29,7 @@ func init() {
handler.Store("pushover", NewPushoverClient)
handler.Store("dingtalk", NewDingTalkClient)
handler.Store("telegram", NewTelegramClient)
handler.Store("bark", NewbarkClient)
}
func Gethandler(name string) (HandlerFunc, bool) {