Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct { Mail MailConfig `koanf:"mail"` Retry RetryConfig `koanf:"retry"` DiffMethod string `koanf:"diff_method" validate:"required,oneof=git internal"` Useragent string `koanf:"useragent"` Timeout time.Duration `koanf:"timeout"` Database string `koanf:"database" validate:"required"` NoErrorMailOnStatusCode []int `koanf:"no_errormail_on_statuscode" validate:"dive,gte=100,lte=999"` RetryOnMatch []string `koanf:"retry_on_match"` Watches []WatchConfig `koanf:"watches" validate:"dive"` GracefulTimeout time.Duration `koanf:"graceful_timeout"` }
func GetConfig ¶
func GetConfig(f string) (Configuration, error)
type MailConfig ¶
type MailConfig struct { Server string `koanf:"server" validate:"required"` Port int `koanf:"port" validate:"required,gt=0,lte=65535"` From struct { Name string `koanf:"name" validate:"required"` Mail string `koanf:"mail" validate:"required,email"` } `koanf:"from"` To []string `koanf:"to" validate:"required,dive,email"` User string `koanf:"user"` Password string `koanf:"password"` TLS bool `koanf:"tls"` StartTLS bool `koanf:"starttls"` SkipTLS bool `koanf:"skiptls"` Retries int `koanf:"retries" validate:"required"` Timeout time.Duration `koanf:"timeout"` }
type ReplaceConfig ¶
type RetryConfig ¶
type WatchConfig ¶
type WatchConfig struct { Cron string `koanf:"cron" validate:"required,cron"` Name string `koanf:"name" validate:"required"` Description string `koanf:"description"` URL string `koanf:"url" validate:"required,url"` Method string `koanf:"method" validate:"required,uppercase"` Body string `koanf:"body"` Header map[string]string `koanf:"header"` AdditionalTo []string `koanf:"additional_to" validate:"dive,email"` NoErrorMailOnStatusCode []int `koanf:"no_errormail_on_statuscode" validate:"dive,gte=100,lte=999"` Disabled bool `koanf:"disabled"` Pattern string `koanf:"pattern"` Replaces []ReplaceConfig `koanf:"replaces" validate:"dive"` RetryOnMatch []string `koanf:"retry_on_match"` SkipSofterrorPatterns bool `koanf:"skip_soft_error_patterns"` JQ string `koanf:"jq"` Useragent string `koanf:"useragent"` }
Click to show internal directories.
Click to hide internal directories.