Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Message ¶
type Message struct { Title string // Subject line or header Content string // Main content body URI string // Optional link for more details Priority Priority // Message priority level Extra map[string]any // Additional fields for rich notifications }
Message represents a normalized notification message. All notifiers expect messages in this format.
type Option ¶
type Option func(*Config)
Option is a function that modifies configuration
func WithTimeout ¶
WithTimeout sets the timeout for notifications
type SlackNotifier ¶
type SlackNotifier struct {
// contains filtered or unexported fields
}
SlackNotifier sends notifications to Slack via webhook
func NewSlackNotifier ¶
func NewSlackNotifier(webhookURL string, opts ...Option) *SlackNotifier
NewSlackNotifier creates a new Slack notifier
func (*SlackNotifier) Name ¶
func (s *SlackNotifier) Name() string
type SlackOption ¶
type SlackOption func(*SlackNotifier)
SlackOption is a function that modifies SlackNotifier configuration
func WithHTTPClient ¶
func WithHTTPClient(client *http.Client) SlackOption
WithHTTPClient sets a custom HTTP client for Slack notifications
Click to show internal directories.
Click to hide internal directories.