[BREAKING] changed notification config format, support multiple notification providers, support webhook and markdown style notification

This commit is contained in:
yusing
2024-11-30 06:44:49 +08:00
parent fb9de4c4ad
commit 25eeabb9f9
12 changed files with 522 additions and 99 deletions

View File

@@ -11,10 +11,11 @@ type (
RedirectToHTTPS bool `json:"redirect_to_https" yaml:"redirect_to_https"`
}
Providers struct {
Files []string `json:"include" yaml:"include"`
Docker map[string]string `json:"docker" yaml:"docker"`
Notification NotificationConfigMap `json:"notification" yaml:"notification"`
Files []string `json:"include" yaml:"include"`
Docker map[string]string `json:"docker" yaml:"docker"`
Notification []NotificationConfig `json:"notification" yaml:"notification"`
}
NotificationConfig map[string]any
)
func DefaultConfig() *Config {

View File

@@ -1,5 +0,0 @@
package types
import "github.com/yusing/go-proxy/internal/notif"
type NotificationConfigMap map[string]notif.ProviderConfig