initial gotify support

This commit is contained in:
yusing
2024-10-22 05:38:09 +08:00
parent a3ab32e9ab
commit bee26f43d4
15 changed files with 415 additions and 38 deletions

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