2024-03-11 12:16:48 +00:00
|
|
|
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"
|
2024-03-13 10:41:15 +00:00
|
|
|
"git.luzifer.io/luzifer/birthday-notifier/pkg/notifier/slack"
|
2024-03-11 12:16:48 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
func getNotifierByName(name string) notifier.Notifier {
|
|
|
|
switch name {
|
|
|
|
case "log":
|
|
|
|
return log.Notifier{}
|
|
|
|
|
|
|
|
case "pushover":
|
|
|
|
return pushover.Notifier{}
|
|
|
|
|
2024-03-13 10:41:15 +00:00
|
|
|
case "slack":
|
|
|
|
return slack.Notifier{}
|
|
|
|
|
2024-03-11 12:16:48 +00:00
|
|
|
default:
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|