Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EmailNotifier ¶
type EmailNotifier struct { Settings *EmailSettings // contains filtered or unexported fields }
func (*EmailNotifier) Initialize ¶
func (e *EmailNotifier) Initialize()
func (*EmailNotifier) Notify ¶
func (e *EmailNotifier) Notify(text string) error
func (*EmailNotifier) String ¶
func (e *EmailNotifier) String() string
type EmailSettings ¶
type EmailSettings struct { SMTP string Port int Username string Password string From string To []string }
func (*EmailSettings) Validate ¶
func (es *EmailSettings) Validate() error
type Initializer ¶
type Initializer interface {
Initialize()
}
Initializer is used to initialize something
type Notifier ¶
type Notifier interface { // Notify sends text over notifier, returns error message if failed Notify(text string) error }
Notifier is used to send messages
type PushoverNotifier ¶
type PushoverNotifier struct {
Settings *PushoverSettings
}
func (*PushoverNotifier) Initialize ¶
func (e *PushoverNotifier) Initialize()
func (*PushoverNotifier) Notify ¶
func (s *PushoverNotifier) Notify(text string) error
func (*PushoverNotifier) String ¶
func (t *PushoverNotifier) String() string
type PushoverSettings ¶
func (*PushoverSettings) Validate ¶
func (ts *PushoverSettings) Validate() error
type SlackNotifier ¶
type SlackNotifier struct {
Settings *SlackSettings
}
func (*SlackNotifier) Initialize ¶
func (s *SlackNotifier) Initialize()
func (*SlackNotifier) Notify ¶
func (s *SlackNotifier) Notify(text string) error
func (*SlackNotifier) String ¶
func (s *SlackNotifier) String() string
type SlackSettings ¶
type SlackSettings struct { BearerToken string `json:"bearerToken"` ChannelID string `json:"channelId"` }
func (*SlackSettings) Validate ¶
func (ss *SlackSettings) Validate() error
type SmsNotifier ¶
type SmsNotifier struct {
Settings *SmsSettings
}
func (*SmsNotifier) Notify ¶
func (s *SmsNotifier) Notify(text string) error
func (*SmsNotifier) String ¶
func (s *SmsNotifier) String() string
type SmsSettings ¶
type SmsSettings struct {
Sms string `json:"sms"`
}
func (*SmsSettings) Validate ¶
func (ss *SmsSettings) Validate() error
type TelegramNotifier ¶
type TelegramNotifier struct {
Settings *TelegramSettings
}
func (*TelegramNotifier) Initialize ¶
func (e *TelegramNotifier) Initialize()
func (*TelegramNotifier) Notify ¶
func (s *TelegramNotifier) Notify(text string) error
func (*TelegramNotifier) String ¶
func (t *TelegramNotifier) String() string
type TelegramSettings ¶
func (*TelegramSettings) Validate ¶
func (ts *TelegramSettings) Validate() error
type WebhookNotifier ¶
type WebhookNotifier struct {
Settings *WebhookSettings
}
func (*WebhookNotifier) Initialize ¶
func (w *WebhookNotifier) Initialize()
func (*WebhookNotifier) Notify ¶
func (w *WebhookNotifier) Notify(srv string) error
func (*WebhookNotifier) String ¶
func (w *WebhookNotifier) String() string
type WebhookSettings ¶
func (*WebhookSettings) Validate ¶
func (ws *WebhookSettings) Validate() error
Click to show internal directories.
Click to hide internal directories.