Documentation
¶
Index ¶
- func SendEmail(recipient string, message string, subject string) error
- func SendEmailErrorMock(recipient string, message string, subject string) error
- func SendEmailMock(recipient string, message string, subject string) error
- func SendSms(smsNumber string, message string) error
- func SendSmsErrorMock(smsNumber string, message string) error
- func SendSmsMock(smsNumber string, message string) error
- type EmailSender
- type Notifier
- type SmsSender
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SendEmailErrorMock ¶
SendEmailErrorMock mocks an error response about no response from the server.
func SendEmailMock ¶
SendEmailMock mocks the normal response of a successful send with no error.
func SendSmsErrorMock ¶
SendSmsErrorMock mocks an error response about no response from the server.
func SendSmsMock ¶
SendSmsMock mocks the normal response of a successful send with no error.
Types ¶
type EmailSender ¶
EmailSender defines a function to do the work to send an email.
type Notifier ¶
type Notifier struct { Site database.Site Message string Subject string SendEmail EmailSender SendSms SmsSender }
Notifier sends the notifications to the recipients on a status change.
func NewNotifier ¶
func NewNotifier(site database.Site, message string, subject string, sendEmail EmailSender, sendSms SmsSender) *Notifier
NewNotifier returns a new Notifier object to perform notifications about status change
Click to show internal directories.
Click to hide internal directories.