logmania/input/webhook/internal.go

16 lines
258 B
Go
Raw Normal View History

2018-09-05 21:00:02 +02:00
package webhook
import (
"net/http"
log "github.com/sirupsen/logrus"
)
type WebhookHandler func(http.Header, interface{}) *log.Entry
var handlers = make(map[string]WebhookHandler)
func AddHandler(name string, f WebhookHandler) {
handlers[name] = f
}