Notifier consist of all the sub components required to send E-mail notifications
| 15 | |
| 16 | // Notifier consist of all the sub components required to send E-mail notifications |
| 17 | type Notifier struct { |
| 18 | // From contains the e-mail address notifications are sent from |
| 19 | From string `json:"from"` |
| 20 | |
| 21 | // To contains a list of e-mail address destinations |
| 22 | To []string `json:"to"` |
| 23 | |
| 24 | // Subject contains customizable subject line |
| 25 | Subject string `json:"subject,omitempty"` |
| 26 | |
| 27 | // SMTP contains all relevant mail server settings |
| 28 | SMTP struct { |
| 29 | Server string `json:"server"` |
| 30 | Port int `json:"port,omitempty"` |
| 31 | Username string `json:"username,omitempty"` |
| 32 | Password string `json:"password,omitempty"` |
| 33 | } `json:"smtp"` |
| 34 | } |
| 35 | |
| 36 | // New creates a new Notifier instance based on json config |
| 37 | func New(config json.RawMessage) (Notifier, error) { |
nothing calls this directly
no outgoing calls
no test coverage detected