Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type API ¶
type API interface { Send(vars map[string]interface{}, templates []string, dest services.Destination) error RunTrigger(triggerName string, vars map[string]interface{}) ([]triggers.ConditionResult, error) AddNotificationService(name string, service services.NotificationService) GetNotificationServices() map[string]services.NotificationService }
API provides high level interface to send notifications and manage notification services
type Config ¶
type Config struct { Services map[string]ServiceFactory Triggers map[string][]triggers.Condition Templates map[string]services.Notification }
Config holds settings required to create new api
type ServiceFactory ¶
type ServiceFactory func() (services.NotificationService, error)
type Subscriptions ¶
type Subscriptions map[string][]services.Destination
Subscriptions holds an information what explains when, where and how a notification should be sent
func (Subscriptions) Dedup ¶
func (s Subscriptions) Dedup() Subscriptions
func (Subscriptions) Merge ¶
func (s Subscriptions) Merge(other Subscriptions)
Click to show internal directories.
Click to hide internal directories.