Documentation ¶
Overview ¶
Package config provides a configuration interface.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
Builder is the builder config to build a notifier or handler.
func (Builder) BuildEmailHandler ¶
BuildEmailHandler builds an email handler.
type Controller ¶
type Controller struct { Delay int64 Timeout int64 Interval int64 Email Email Handlers []Builder Notifiers []Builder }
Controller is the controller config.
func (Controller) Controller ¶
func (c Controller) Controller() (*controller.Controller, error)
Controller creates a controller with itself.
func (Controller) Options ¶
func (c Controller) Options() ([]controller.Option, error)
Options converts itself to controller options.
type Email ¶
type Email struct { Address string `validate:"required"` Username string `validate:"required"` Password string `validate:"required"` Number uint32 UseTLS bool `json:"UseTls"` SkipTLSVerify bool `validate:"SkipTlsVerify"` }
Email is the email config.
func (Email) ControllerOptoin ¶
func (e Email) ControllerOptoin() controller.Option
ControllerOptoin converts itself to the controller option.
type Loader ¶
type Loader interface {
LoadController() ([]Controller, error)
}
Loader is used to load the config.
func FileLoader ¶
FileLoader returns a file loader to load the config from the given file.
Click to show internal directories.
Click to hide internal directories.