Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrorNotifierSendMessage = errors.New(errors.LevelError, 1, "error sending message [notifier: %s, error: %s]") ErrorNotifierStatus = errors.New(errors.LevelError, 1, "error sending message [notifier: %s, status: %d, error: %s]") ErrorMarshalMessage = errors.New(errors.LevelError, 1, "error marshall message [notifier: %s, message: %s]") )
Functions ¶
This section is empty.
Types ¶
type NotificationsOption ¶
type NotificationsOption func(client *Notifier)
NotificationsOption ...
func WithConfiguration ¶
func WithConfiguration(config *NotifierConfig) NotificationsOption
WithConfiguration ...
type Notifier ¶
type Notifier struct {
// contains filtered or unexported fields
}
func (*Notifier) NewSlackNotifier ¶
func (n *Notifier) NewSlackNotifier(config ...*SlackConfig) INotifier
func (*Notifier) Reconfigure ¶
func (n *Notifier) Reconfigure(options ...NotificationsOption)
Reconfigure ...
type NotifierConfig ¶
type NotifierConfig struct { Slack *SlackConfig `json:"slack"` Log struct { Level string `json:"level"` } `json:"log"` }
NotifierConfig ...
type SlackConfig ¶
type SlackConfig struct {
Webhook string `json:"webhook"`
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.