Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlertConfig ¶
type AlertConfig struct { AlertId string `yaml:"alert" json:"alert"` Schedule []RouterParms `yaml:"schedule" json:"schedule"` }
func LoadAlertConfig ¶
func LoadAlertConfig(r io.Reader) (*AlertConfig, error)
type Email ¶
type Email RouteProcessor
type RigConfig ¶
type RigConfig struct { Listen string `yaml:"listen"` Routers []*Routers `yaml:"routers"` AlertsPath string `yaml:"alerts_path"` LogLevelStr string `yaml:"log_level"` LogFormatStr string `yaml:"log_format"` }
func NewRigConfig ¶
NewRigConfig returns a new RigConfig instance.
type RouteProcessor ¶
type RouteProcessor string
const ( EMAIL_RP RouteProcessor = "email" WEBHOOK_RP RouteProcessor = "webhook" )
type RouterParms ¶
type RouterParms struct { Id string `yaml:"id" json:"id"` RouterId string `yaml:"router_id,omitempty" json:"router_id,omitempty"` Enabled bool `yaml:"enabled" json:"enabled,omitempty"` SmtpHost string `yaml:"smtphost,omitempty" json:"smtphost,omitempty"` SmtpPort int `yaml:"smtpport,omitempty" json:"smtpport,omitempty"` SmtpAuthUser string `yaml:"smtpauthuser,omitempty" json:"smtpauthuser,omitempty"` SmtpAuthPass string `yaml:"smtpauthpass,omitempty" json:"smtpauthpass,omitempty"` EmailAddrs []string `yaml:"email_addrs,omitempty" json:"email_addrs,omitempty"` Url string `yaml:"url,omitempty" json:"url,omitempty"` Username string `yaml:"username,omitempty" json:"username,omitempty"` Password string `yaml:"password,omitempty" json:"password,omitempty"` QueryParms []string `yaml:"query_parms,omitempty" json:"query_parms,omitempty"` ScheduleStart string `yaml:"start,omitempty" json:"start,omitempty"` ScheduleEnd string `yaml:"end,omitempty" json:"end,omitempty"` }
type Routers ¶
type Routers struct { Type RouteProcessor `yaml:"type"` Parms RouterParms `yaml:",inline"` }
type Webhook ¶
type Webhook RouteProcessor
Click to show internal directories.
Click to hide internal directories.