Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Contact ¶
type Contact struct { database.Object `storm:"inline"` Name string `json:"name" validate:"required"` Notifier string `json:"notifier" validate:"required"` Arguments json.RawMessage `json:"arguments"` }
Contact is a person or service capable of receiving notifications.
func LoadContact ¶
LoadContact will read a contact from db.
type ContactGroup ¶
type ContactGroup struct { database.Object `storm:"inline"` Name string `json:"name" validate:"required"` Members []string `json:"members"` }
ContactGroup is a group of contacts.
func LoadContactGroup ¶
func LoadContactGroup(db database.Reader, id string) (*ContactGroup, error)
LoadContactGroup will read a contact from db.
func (*ContactGroup) GetContacts ¶
func (g *ContactGroup) GetContacts(db database.Reader) ([]*Contact, error)
GetContacts returns the list of contacts in g.
type Notifier ¶
type Notifier struct {
// contains filtered or unexported fields
}
Notifier takes care of notifying all contacts in a relevant ContactGroup.
func NewNotifier ¶
NewNotifier will start a new notifier service.
Click to show internal directories.
Click to hide internal directories.