add simple webhook feature for peer, interface and user events (#398)

This commit is contained in:
Christoph
2025-04-19 21:29:26 +02:00
parent e75a32e4d0
commit 9354a1d9d3
14 changed files with 411 additions and 51 deletions

View File

@@ -0,0 +1,14 @@
package config
import "time"
// WebhookConfig contains the configuration for webhooks.
type WebhookConfig struct {
// Url is the URL to send the webhook to. If empty, no webhook will be sent.
Url string `yaml:"url"`
// Authentication is the authorization header for the webhook request.
// It can either be a Bearer token or a Basic auth string.
Authentication string `yaml:"authentication"`
// Timeout is the timeout for the webhook request.
Timeout time.Duration `yaml:"timeout"`
}