Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SendEmailWithConfig ¶
func SendEmailWithConfig(_ context.Context, config *NotificationChannelConfig, subject, body string) error
SendEmailWithConfig sends an alert email using the provided configuration.
func SendWebhookWithConfig ¶ added in v0.12.0
func SendWebhookWithConfig(ctx context.Context, config *WebhookConfig, alertDetails map[string]interface{}) error
SendWebhookWithConfig sends an alert webhook using the provided configuration. It sends the alertDetails JSON object as the request body.
Types ¶
type EmailConfig ¶
type EmailConfig struct {
SMTP SMTPConfig
To []string
SubjectTemplate string
BodyTemplate string
}
EmailConfig holds email-specific configuration
type NotificationChannelConfig ¶
type NotificationChannelConfig struct {
Type string // "email" or "webhook"
Email EmailConfig
Webhook WebhookConfig
}
NotificationChannelConfig combines email and webhook configuration
type SMTPConfig ¶
SMTPConfig holds SMTP configuration for sending emails
Click to show internal directories.
Click to hide internal directories.