config

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 30, 2019 License: MIT Imports: 6 Imported by: 0

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

func NewRigConfig(r io.Reader) (*RigConfig, error)

NewRigConfig returns a new RigConfig instance.

func (*RigConfig) LogFormat

func (rc *RigConfig) LogFormat() log.Formatter

func (*RigConfig) LogLevel

func (rc *RigConfig) LogLevel() log.Level

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL