Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EmailMessage ¶
type EmailMessage struct { From string `json:"from"` To string `json:"to"` Subject string `json:"subject"` Message string `json:"message"` ReplyTo string `json:"replyTo"` }
EmailMessage email message object
type EmailNotifier ¶
type EmailNotifier struct {
// contains filtered or unexported fields
}
EmailNotifier email notifier using payfazz messenger as library
func NewEmailNotifier ¶
func NewEmailNotifier( awsRegion string, awsAccessKeyID string, awsSecretAccessKey string, awsToken string, ) *EmailNotifier
NewEmailNotifier create new email notifier
func (*EmailNotifier) Notify ¶
func (en *EmailNotifier) Notify(message string) error
Notify Notify function are not implemented on email
type Notifier ¶
type Notifier interface { Notify(message string) error Send(ctx context.Context, data interface{}) error }
Notifier is the interface that wraps the Notify method.
Notify notifies the message to the output channel. The implementation channel can be slack/email/etc.
type SlackNotifier ¶
SlackNotifier represents the notifier that will notify to slack channel
func NewSlackNotifier ¶
func NewSlackNotifier(config SlackNotifierConfig) *SlackNotifier
NewSlackNotifier creates a new slack notifier
func (*SlackNotifier) Notify ¶
func (sn *SlackNotifier) Notify(message string) error
Notify notifies message to a slack channel
type SlackNotifierConfig ¶
SlackNotifierConfig represent the config needed when creating a new slack notifier
type TelegramNotifier ¶
type TelegramNotifier struct {
// contains filtered or unexported fields
}
TelegramNotifier telegram notifier
func NewTelegramNotifier ¶
func NewTelegramNotifier( telegramClient client.GenericHTTPClient, channelID string, secretToken string, ) *TelegramNotifier
NewTelegramNotifier create new telegram notifier
func (*TelegramNotifier) Notify ¶
func (tn *TelegramNotifier) Notify(message string) error
Notify send message to registered username