entity

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 20, 2026 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message interface {
	ToString() (string, error)
}

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL