logmania/notify/main.go

23 lines
430 B
Go
Raw 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"
"github.com/genofire/logmania/bot"
"github.com/genofire/logmania/database"
2017-06-16 10:33:35 +02:00
"github.com/genofire/logmania/lib"
)
var NotifyRegister []NotifyInit
type Notifier interface {
Send(entry *log.Entry) error
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)
}