feat: new notification provider: slack bot

This commit is contained in:
Fu Diwei
2025-05-26 16:41:16 +08:00
parent 8e23b14bf3
commit e82a59289b
30 changed files with 341 additions and 11 deletions

View File

@@ -51,6 +51,7 @@ func (n *NotifierProvider) WithLogger(logger *slog.Logger) notifier.Notifier {
func (n *NotifierProvider) Notify(ctx context.Context, subject string, message string) (res *notifier.NotifyResult, err error) {
// REF: https://pushover.net/api
req := n.httpClient.R().
SetContext(ctx).
SetHeader("Content-Type", "application/json").
SetBody(map[string]any{
"title": subject,