Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Message ¶
Message represents an interface that defines the behavior for message entities. Any type implementing this interface must provide a method to convert the message into its string representation.
The ToString method is expected to return a string representation of the message along with an error if the conversion fails. This allows for flexible handling of message types while ensuring proper error management during the conversion process.
type NotificationPlatform ¶
type NotificationPlatform string
NotificationPlatform represents the string identifier for a supported notifier implementation.
const ( PlatformSlack NotificationPlatform = "slack" // ProviderSlack is a notifier that sends messages to Slack. PlatformMSTeams NotificationPlatform = "teams" // ProviderMSTeams is a notifier that sends messages to Microsoft Teams. )
type Request ¶
type Request struct {
Platform NotificationPlatform // e.g., "slack" or "teams"
Token string // Authentication token for the platform
UseWebhook bool // Use webhook URL instead of token
WebhookURL string // Platform-specific endpoint
DefaultChannel string // Default channel to send messages to
}
Request represents the structure for sending notifications to various platforms. It includes details such as the target platform, authentication credentials, and optional sender information like name and icon.