Documentation
¶
Overview ¶
Package notifier defines the event notification interface for PKI events.
The default implementation (SMTP mailer) is built into the core. Channel-specific implementations (Slack, DingTalk, Feishu, WeChat Work) have been extracted to the webhook satellite project.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultSMTPConfig = SMTPConfig{
Port: 587,
}
Functions ¶
func ParseRecipients ¶
Types ¶
type Mailer ¶
type Mailer struct {
// contains filtered or unexported fields
}
func NewMailer ¶
func NewMailer(cfg SMTPConfig) *Mailer
type Notifier ¶
type Notifier interface {
// Send sends a notification for the given event.
Send(event, subject, body string) error
}
Notifier is the interface for sending event notifications. Implementations may deliver to email, chat, or any other channel.
type SMTPConfig ¶
type SMTPConfig struct {
Host string `json:"host,omitempty"`
Port int `json:"port,omitempty"`
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`
From string `json:"from,omitempty"`
To string `json:"to,omitempty"`
TLS bool `json:"tls,omitempty"`
InsecureSkipVerify bool `json:"insecure_skip_verify,omitempty"`
Events string `json:"events,omitempty"`
}
Click to show internal directories.
Click to hide internal directories.