Documentation
¶
Overview ¶
Package notify provides notification support for ralphex plan execution results.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Params ¶
type Params struct {
Channels []string
OnError bool
OnComplete bool
TimeoutMs int
TelegramToken string
TelegramChat string
SlackToken string
SlackChannel string
SMTPHost string
SMTPPort int
SMTPUsername string
SMTPPassword string
SMTPStartTLS bool
EmailFrom string
EmailTo []string
WebhookURLs []string
CustomScript string
}
Params holds configuration for creating a notification Service. Embedded directly in Config struct — no intermediate mapping needed.
type Result ¶
type Result struct {
Status string `json:"status"` // "success" or "failure"
Mode string `json:"mode"`
PlanFile string `json:"plan_file"`
Branch string `json:"branch"`
Duration string `json:"duration"`
Files int `json:"files"`
Additions int `json:"additions"`
Deletions int `json:"deletions"`
Error string `json:"error,omitempty"`
}
Result holds completion data for notifications.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service orchestrates sending notifications through configured channels.
func New ¶
New creates a notification Service from the given Params. returns nil, nil if no channels are configured, enabling callers to skip nil checks via nil-safe Send. validates required fields per channel and returns an error for misconfigured channels.
Click to show internal directories.
Click to hide internal directories.