Documentation
¶
Index ¶
Constants ¶
View Source
const ( EncodingForm encoding = "application/x-www-form-urlencoded" EncodingJson encoding = "application/json" )
Variables ¶
This section is empty.
Functions ¶
func BroadcastNotification ¶
func SetupNotifiers ¶
Types ¶
type HttpNotifier ¶
type HttpNotifier struct {
Cfg Config
URL string
Method string
Encoding encoding
BodyTemplate string
}
func NewHttpNotifier ¶
func NewHttpNotifier(cfg Config) *HttpNotifier
func (*HttpNotifier) Target ¶
func (h *HttpNotifier) Target() string
type MailNotifier ¶
type MailNotifier struct {
Cfg Config
To string
From string
Server string
Login string
Password string
MinAmount uint64
}
func NewMailNotifier ¶
func NewMailNotifier(cfg Config) *MailNotifier
func (*MailNotifier) Notify ¶
func (m *MailNotifier) Notify(amount uint64, comment string) (err error)
func (*MailNotifier) Target ¶
func (m *MailNotifier) Target() string
type SignalNotifier ¶
func NewSignalNotifier ¶
func NewSignalNotifier(cfg Config) *SignalNotifier
func (*SignalNotifier) Notify ¶
func (s *SignalNotifier) Notify(amount uint64, comment string) error
func (*SignalNotifier) Target ¶
func (s *SignalNotifier) Target() string
type TelegramNotifier ¶
func NewTelegramNotifier ¶
func NewTelegramNotifier(cfg Config) *TelegramNotifier
func (*TelegramNotifier) Notify ¶
func (t *TelegramNotifier) Notify(amount uint64, comment string) (err error)
func (*TelegramNotifier) Target ¶
func (t *TelegramNotifier) Target() string
Click to show internal directories.
Click to hide internal directories.