logmania/notify/main.go

23 lines
453 B
Go
Raw Permalink Normal View History

2017-06-16 10:33:35 +02:00
package notify
import (
2017-10-25 00:36:16 +02:00
log "github.com/sirupsen/logrus"
"dev.sum7.eu/genofire/logmania/bot"
"dev.sum7.eu/genofire/logmania/database"
"dev.sum7.eu/genofire/logmania/lib"
2017-06-16 10:33:35 +02:00
)
var NotifyRegister []NotifyInit
type Notifier interface {
2018-04-26 21:05:27 +02:00
Send(entry *log.Entry, to *database.Notify) bool
2017-06-16 10:33:35 +02:00
Close()
}
type NotifyInit func(*lib.NotifyConfig, *database.DB, *bot.Bot) Notifier
2017-06-16 10:33:35 +02:00
func AddNotifier(n NotifyInit) {
NotifyRegister = append(NotifyRegister, n)
}