mirror of
https://github.com/yusing/godoxy.git
synced 2025-05-19 20:32:35 +02:00
21 lines
395 B
Go
21 lines
395 B
Go
package notif
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/sirupsen/logrus"
|
|
E "github.com/yusing/go-proxy/internal/error"
|
|
)
|
|
|
|
type (
|
|
Provider interface {
|
|
Name() string
|
|
Send(ctx context.Context, entry *logrus.Entry) error
|
|
}
|
|
ProviderCreateFunc func(map[string]any) (Provider, E.Error)
|
|
ProviderConfig map[string]any
|
|
)
|
|
|
|
var Providers = map[string]ProviderCreateFunc{
|
|
"gotify": newGotifyClient,
|
|
}
|