logmania/output/main.go

23 lines
397 B
Go
Raw Permalink Normal View History

2018-09-05 01:53:23 +02:00
package output
import (
2019-06-20 09:25:43 +02:00
"github.com/bdlm/log"
2018-09-05 01:53:23 +02:00
2019-08-08 15:51:55 +02:00
"dev.sum7.eu/sum7/logmania/bot"
"dev.sum7.eu/sum7/logmania/database"
2018-09-05 01:53:23 +02:00
)
var Register = make(map[string]Init)
type Output interface {
Default() []*database.Notify
Send(entry *log.Entry, to *database.Notify) bool
Close()
}
type Init func(interface{}, *database.DB, *bot.Bot) Output
func Add(name string, init Init) {
Register[name] = init
}