Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDuration ¶
NewDuration returns a duration pointer
Types ¶
type Config ¶
type Config struct { Timezone string `yaml:"timezone,omitempty" json:"timezone,omitempty"` LogLevel string `yaml:"logLevel,omitempty" json:"logLevel,omitempty"` LogJSON bool `yaml:"logJSON,omitempty" json:"logJSON,omitempty"` Db *Db `yaml:"db,omitempty" json:"db,omitempty"` Server *Server `yaml:"server,omitempty" json:"server,omitempty"` Download *Download `yaml:"download,omitempty" json:"download,omitempty" validate:"required"` Notif *Notif `yaml:"notif,omitempty" json:"notif,omitempty"` }
Config holds configuration details
type Db ¶
type Db struct {
Path string `yaml:"path,omitempty" json:"path,omitempty"`
}
Db holds data necessary for database configuration
type Download ¶ added in v0.7.1
type Download struct { Output string `yaml:"output,omitempty" json:"output,omitempty" validate:"required,dir"` UID int `yaml:"uid,omitempty" json:"uid,omitempty"` GID int `yaml:"gid,omitempty" json:"gid,omitempty"` ChmodFile os.FileMode `yaml:"chmodFile,omitempty" json:"chmodFile,omitempty"` ChmodDir os.FileMode `yaml:"chmodDir,omitempty" json:"chmodDir,omitempty"` Include []string `yaml:"include,omitempty" json:"include,omitempty"` Exclude []string `yaml:"exclude,omitempty" json:"exclude,omitempty"` Since string `yaml:"since,omitempty" json:"since,omitempty"` SinceTime time.Time `yaml:"-" json:"-" label:"-" file:"-"` Retry int `yaml:"retry,omitempty" json:"retry,omitempty"` HideSkipped *bool `yaml:"hideSkipped,omitempty" json:"hideSkipped,omitempty"` TempFirst *bool `yaml:"tempFirst,omitempty" json:"tempFirst,omitempty"` CreateBaseDir *bool `yaml:"createBaseDir,omitempty" json:"createBaseDir,omitempty"` }
Download holds download configuration details
func (*Download) GetDefaults ¶ added in v0.7.1
GetDefaults gets the default values
func (*Download) SetDefaults ¶ added in v0.7.1
func (s *Download) SetDefaults()
SetDefaults sets the default values
type Notif ¶
type Notif struct { Mail *NotifMail `yaml:"mail,omitempty" json:"mail,omitempty"` Webhook *NotifWebhook `yaml:"webhook,omitempty" json:"webhook,omitempty"` }
Notif holds data necessary for notification configuration
type NotifMail ¶
type NotifMail struct { Host string `yaml:"host,omitempty" json:"host,omitempty"` Port int `yaml:"port,omitempty" json:"port,omitempty"` SSL *bool `yaml:"ssl,omitempty" json:"ssl,omitempty"` InsecureSkipVerify *bool `yaml:"insecureSkipVerify,omitempty" json:"insecureSkipVerify,omitempty"` Username string `yaml:"username,omitempty" json:"username,omitempty"` UsernameFile string `yaml:"usernameFile,omitempty" json:"usernameFile,omitempty"` Password string `yaml:"password,omitempty" json:"password,omitempty"` PasswordFile string `yaml:"passwordFile,omitempty" json:"passwordFile,omitempty"` From string `yaml:"from,omitempty" json:"from,omitempty"` To string `yaml:"to,omitempty" json:"to,omitempty"` }
NotifMail holds mail notification configuration details
func (*NotifMail) GetDefaults ¶
GetDefaults gets the default values
func (*NotifMail) SetDefaults ¶
func (s *NotifMail) SetDefaults()
SetDefaults sets the default values
type NotifWebhook ¶
type NotifWebhook struct { Endpoint string `yaml:"endpoint,omitempty" json:"endpoint,omitempty"` Method string `yaml:"method,omitempty" json:"method,omitempty"` Headers map[string]string `yaml:"headers,omitempty" json:"headers,omitempty"` Timeout *time.Duration `yaml:"timeout,omitempty" json:"timeout,omitempty"` }
NotifWebhook holds webhook notification configuration details
func (*NotifWebhook) GetDefaults ¶
func (s *NotifWebhook) GetDefaults() *NotifWebhook
GetDefaults gets the default values
func (*NotifWebhook) SetDefaults ¶
func (s *NotifWebhook) SetDefaults()
SetDefaults sets the default values
type Server ¶
type Server struct {
FTP *ServerFTP `yaml:"ftp,omitempty" json:"ftp,omitempty"`
}
Server represents a server configuration
func (*Server) GetDefaults ¶
GetDefaults gets the default values
type ServerFTP ¶
type ServerFTP struct { Host string `yaml:"host,omitempty" json:"host,omitempty" validate:"required"` Port int `yaml:"port,omitempty" json:"port,omitempty" validate:"required,min=1"` Username string `yaml:"username,omitempty" json:"username,omitempty"` UsernameFile string `yaml:"usernameFile,omitempty" json:"usernameFile,omitempty" validate:"omitempty,file"` Password string `yaml:"password,omitempty" json:"password,omitempty"` PasswordFile string `yaml:"passwordFile,omitempty" json:"passwordFile,omitempty" validate:"omitempty,file"` Sources []string `yaml:"sources,omitempty" json:"sources,omitempty"` Timeout *time.Duration `yaml:"timeout,omitempty" json:"timeout,omitempty"` DisableUTF8 *bool `yaml:"disableUTF8,omitempty" json:"disableUTF8,omitempty"` DisableEPSV *bool `yaml:"disableEPSV,omitempty" json:"disableEPSV,omitempty"` DisableMLSD *bool `yaml:"disableMLSD,omitempty" json:"disableMLSD,omitempty"` EscapeRegexpMeta *bool `yaml:"escapeRegexpMeta,omitempty" json:"escapeRegexpMeta,omitempty"` TLS *bool `yaml:"tls,omitempty" json:"tls,omitempty"` InsecureSkipVerify *bool `yaml:"insecureSkipVerify,omitempty" json:"insecureSkipVerify,omitempty"` LogTrace *bool `yaml:"logTrace,omitempty" json:"logTrace,omitempty"` }
ServerFTP holds ftp server configuration
func (*ServerFTP) GetDefaults ¶
GetDefaults gets the default values
func (*ServerFTP) SetDefaults ¶
func (s *ServerFTP) SetDefaults()
SetDefaults sets the default values