notification

package
v0.0.0-...-e582b95 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 14, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PostNotification

func PostNotification(edgexcontext *appcontext.Context, content string) error

This leverages EdgeX Alerts & notification service

func RegisterSubscriber

func RegisterSubscriber(emails []string) error

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 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL