birthday-notifier/notifier.go
Knut Ahlers 8af4ff08a3
Add Slack-Compatible webhook notification target
Signed-off-by: Knut Ahlers <knut@ahlers.me>
2024-03-13 11:41:15 +01:00

24 lines
500 B
Go

package main
import (
"git.luzifer.io/luzifer/birthday-notifier/pkg/notifier"
"git.luzifer.io/luzifer/birthday-notifier/pkg/notifier/log"
"git.luzifer.io/luzifer/birthday-notifier/pkg/notifier/pushover"
"git.luzifer.io/luzifer/birthday-notifier/pkg/notifier/slack"
)
func getNotifierByName(name string) notifier.Notifier {
switch name {
case "log":
return log.Notifier{}
case "pushover":
return pushover.Notifier{}
case "slack":
return slack.Notifier{}
default:
return nil
}
}