GoDoxy/internal/notif/providers.go
2024-10-22 05:38:09 +08:00

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,
}