Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var EmailSenderName = di.TypeInstanceToName(EmailSender{})
EmailSenderName contains the name of the channel.EmailSender implementation in the DIC.
var RESTSenderName = di.TypeInstanceToName(RESTSender{})
RESTSenderName contains the name of the channel.RESTSender implementation in the DIC.
Functions ¶
This section is empty.
Types ¶
type EmailSender ¶
type EmailSender struct {
// contains filtered or unexported fields
}
EmailSender is the implementation of the interfaces.ChannelSender, which is used to send the notifications via email
func (*EmailSender) Send ¶
func (sender *EmailSender) Send(notification models.Notification, address models.Address) (res string, err errors.EdgeX)
Send sends the email to the specified address
type RESTSender ¶
type RESTSender struct {
// contains filtered or unexported fields
}
RESTSender is the implementation of the interfaces.ChannelSender, which is used to send the notifications via REST
func (*RESTSender) Send ¶
func (sender *RESTSender) Send(notification models.Notification, address models.Address) (res string, err errors.EdgeX)
Send sends the REST request to the specified address
type Sender ¶
type Sender interface {
Send(notification models.Notification, address models.Address) (res string, err errors.EdgeX)
}
Sender abstracts the notification sending via specified channel
func EmailSenderFrom ¶
EmailSenderFrom helper function queries the DIC and returns the channel.Sender implementation.
func NewEmailSender ¶
NewEmailSender creates the EmailSender instance
func NewRESTSender ¶
NewRESTSender creates the RESTSender instance
func RESTSenderFrom ¶
RESTSenderFrom helper function queries the DIC and returns the channel.Sender implementation.