Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NotificationMDField ¶
type NotificationMDField struct { Name string // contains filtered or unexported fields }
NotificationMDField is used to represented a Metadata parameter used for templating a message
func (NotificationMDField) Is ¶
func (n NotificationMDField) Is(value string) NotificationMDField
Is sets the 'Value' field of the notificationMDField
func (NotificationMDField) TemplateName ¶
func (n NotificationMDField) TemplateName() string
TemplateName returns the template version of the MDField's name
type NotificationPayload ¶
type NotificationPayload struct { ToEntity string `json:"toEntity"` FromEntity string `json:"fromEntity"` Template string `json:"template"` Metadata map[string]string `json:"metadata"` Code string `json:"code"` }
NotificationPayload is a struct to represent an instantiated notification of a specific type
type NotificationType ¶
type NotificationType struct { Code string //IsEnabled bool Fields []NotificationMDField Template string }
NotificationType is a struct to represent a non-instantiated notification
func (NotificationType) Send ¶
func (n NotificationType) Send(rh models.RequestHandler, to, from string, mdFields ...NotificationMDField)
Send creates a new instantiation of the given notification type with the supplied metadata and sends it
Click to show internal directories.
Click to hide internal directories.