Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultLogLevel = "info"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Notifications ¶
type Notifications struct { Service *Service `mapstructure:"service" toml:"service"` Postgres *Postgres `mapstructure:"postgres" toml:"postgres"` Secrets *Secrets `mapstructure:"secrets" toml:"secrets"` TLSConfig *certs.TLSConfig `mapstructure:"tls" toml:"tls"` Certs *certs.ServiceCerts `mapstructure:"-" toml:"-"` }
func FromFile ¶
func FromFile(path string) (*Notifications, error)
FromFile loads the config from the given path, load referenced files (e.g., certs), sets derived config and populates global state (e.g., log level, etc.)
func UnmarshalFromFile ¶
func UnmarshalFromFile(path string) (*Notifications, error)
func (*Notifications) FixupPGURI ¶
func (n *Notifications) FixupPGURI() error
func (*Notifications) ReadCerts ¶
func (n *Notifications) ReadCerts() error
func (*Notifications) SetLogLevel ¶
func (n *Notifications) SetLogLevel() error
type Postgres ¶
type Postgres struct { URI string `mapstructure:"uri" toml:"uri"` Database string `mapstructure:"database" toml:"database"` SchemaPath string `mapstructure:"schema_path" toml:"schema_path"` MaxOpenConns int `mapstructure:"max_open_conns" toml:"max_open_conns"` MaxIdleConns int `mapstructure:"max_idle_conns" toml:"max_idle_conns"` }
Click to show internal directories.
Click to hide internal directories.