mirror of
https://github.com/crazy-max/diun.git
synced 2025-12-25 14:59:33 +01:00
Add Slack notifier (#8)
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"github.com/crazy-max/diun/internal/model"
|
||||
"github.com/crazy-max/diun/internal/notif/mail"
|
||||
"github.com/crazy-max/diun/internal/notif/notifier"
|
||||
"github.com/crazy-max/diun/internal/notif/slack"
|
||||
"github.com/crazy-max/diun/internal/notif/webhook"
|
||||
"github.com/rs/zerolog/log"
|
||||
)
|
||||
@@ -27,6 +28,9 @@ func New(config model.Notif, app model.App) (*Client, error) {
|
||||
if config.Mail.Enable {
|
||||
c.notifiers = append(c.notifiers, mail.New(config.Mail, app))
|
||||
}
|
||||
if config.Slack.Enable {
|
||||
c.notifiers = append(c.notifiers, slack.New(config.Slack, app))
|
||||
}
|
||||
if config.Webhook.Enable {
|
||||
c.notifiers = append(c.notifiers, webhook.New(config.Webhook, app))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user