mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-25 10:18:59 +02:00
initial gotify support
This commit is contained in:
21
internal/notif/providers.go
Normal file
21
internal/notif/providers.go
Normal file
@@ -0,0 +1,21 @@
|
||||
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,
|
||||
}
|
||||
Reference in New Issue
Block a user