Add support for Twilio alerts (#7)

This commit is contained in:
Greg Holmes
2020-09-04 22:43:14 +01:00
committed by GitHub
parent f893c0ee7f
commit db7c516819
4 changed files with 68 additions and 2 deletions

View File

@ -19,5 +19,6 @@ type AlertType string
const (
SlackAlert AlertType = "slack"
TwilioAlert AlertType = "twilio"
CustomAlert AlertType = "custom"
)

View File

@ -10,9 +10,17 @@ import (
type AlertingConfig struct {
Slack string `yaml:"slack"`
Twilio *TwilioAlertProvider `yaml:"twilio"`
Custom *CustomAlertProvider `yaml:"custom"`
}
type TwilioAlertProvider struct {
SID string `yaml:"sid"`
Token string `yaml:"token"`
From string `yaml:"from"`
To string `yaml:"to"`
}
type CustomAlertProvider struct {
Url string `yaml:"url"`
Method string `yaml:"method,omitempty"`