Documentation ¶
Index ¶
- Variables
- func ClearAllNotifiers()
- func RegisterBackend(backend NotificationBackend)
- func RegisterNotifier(n Notifier)
- func UnregisterNotifier(name string)
- type ChannelNotFound
- type EmailViaSMTPConfig
- type EmailViaSMTPNotifier
- func (n *EmailViaSMTPNotifier) Name() string
- func (n *EmailViaSMTPNotifier) Send(notifications []Notification, subscriber Subscriber) error
- func (n *EmailViaSMTPNotifier) SendMany(notifications []Notification, subscriber Subscriber) error
- func (n *EmailViaSMTPNotifier) SendOne(notification Notification, subscriber Subscriber) error
- type Notification
- type NotificationBackend
- type Notifier
- type Priority
- type Subscriber
Constants ¶
This section is empty.
Variables ¶
View Source
var PriorityMap map[string]Priority = map[string]Priority{ "low": LowPriority, "normal": NormalPriority, "urgent": UrgentPriority, }
Functions ¶
func ClearAllNotifiers ¶
func ClearAllNotifiers()
func RegisterBackend ¶
func RegisterBackend(backend NotificationBackend)
func RegisterNotifier ¶
func RegisterNotifier(n Notifier)
func UnregisterNotifier ¶
func UnregisterNotifier(name string)
Types ¶
type ChannelNotFound ¶
type ChannelNotFound struct {
ChannelName string
}
func (ChannelNotFound) Error ¶
func (err ChannelNotFound) Error() string
type EmailViaSMTPConfig ¶
func (EmailViaSMTPConfig) ToNotifier ¶
func (c EmailViaSMTPConfig) ToNotifier() *EmailViaSMTPNotifier
type EmailViaSMTPNotifier ¶
type EmailViaSMTPNotifier struct { Hostname string Port int SelfEmailAddr string Authenticator smtp.Auth // contains filtered or unexported fields }
func NewEmailViaGmailNotifier ¶
func NewEmailViaGmailNotifier(username string, password string, selfEmail string) *EmailViaSMTPNotifier
func NewEmailViaSMTPNotifier ¶
func (*EmailViaSMTPNotifier) Name ¶
func (n *EmailViaSMTPNotifier) Name() string
func (*EmailViaSMTPNotifier) Send ¶
func (n *EmailViaSMTPNotifier) Send(notifications []Notification, subscriber Subscriber) error
func (*EmailViaSMTPNotifier) SendMany ¶
func (n *EmailViaSMTPNotifier) SendMany(notifications []Notification, subscriber Subscriber) error
func (*EmailViaSMTPNotifier) SendOne ¶
func (n *EmailViaSMTPNotifier) SendOne(notification Notification, subscriber Subscriber) error
type Notification ¶
type NotificationBackend ¶
type NotificationBackend interface { Name() string QueueNotification(notification Notification) error Initialize(openString string) error Start(wg *sync.WaitGroup) BlockUntilReady() Shutdown() }
func GetBackend ¶
func GetBackend(name string) NotificationBackend
func InitializeNotificationBackend ¶
func InitializeNotificationBackend(name, openString string) (NotificationBackend, error)
type Notifier ¶
type Notifier interface { Name() string Send(notifications []Notification, subscriber Subscriber) error }
func GetNotifier ¶
Click to show internal directories.
Click to hide internal directories.