Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewService ¶
func StateItemKey ¶
func StateItemKey(trigger string, conditionResult ConditionResult, dest services.Destination) string
Types ¶
type Condition ¶
type Condition struct { OncePer string `json:"oncePer,omitempty"` When string `json:"when,omitempty"` Description string `json:"description,omitempty"` Send []string `json:"send,omitempty"` }
Condition holds expression and template that must be used to create notification is expression is returns true
type ConditionResult ¶
type Service ¶
type Service interface { // Executes given trigger name and return result of each condition Run(triggerName string, vars map[string]interface{}) ([]ConditionResult, error) }
type State ¶
State track notification triggers state (already notified/not notified)
func (State) SetAlreadyNotified ¶
func (s State) SetAlreadyNotified(trigger string, result ConditionResult, dest services.Destination, isNotified bool) bool
SetAlreadyNotified set the state of given trigger/destination and return if state has been changed
Click to show internal directories.
Click to hide internal directories.