Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateBodyContent ¶
CreateBodyContent composes the body for the notification message
func PostNotification ¶
PostNotification sends a notification when group of tags reach freezer area This leverages EdgeX Alerts & notification service
func RegisterSubscriber ¶
RegisterSubscriber registers a subscriber to EdgeX Alerts & notification service using email as channel
Types ¶
type Channels ¶
type Channels struct { Type string `json:"type"` URL string `json:"url,omitempty"` MailAddresses []string `json:"mailAddresses,omitempty"` }
Channels holds the body schema to specify different type of notification channels (email, SMS, REST post call)
type Notification ¶
type Notification struct { Slug string `json:"slug"` Sender string `json:"sender"` Category string `json:"category"` Severity string `json:"severity"` Content string `json:"content"` Labels []string `json:"labels"` }
Notification holds the body schema to post a notification event to EdgeX
type Subscriber ¶
type Subscriber struct { Slug string `json:"slug"` Receiver string `json:"receiver"` SubscribedCategories []string `json:"subscribedCategories"` SubscribedLabels []string `json:"subscribedLabels"` Channels []Channels `json:"channels"` }
Subscriber holds the body schema to register a subscriber to EdgeX
Click to show internal directories.
Click to hide internal directories.