Documentation ¶
Overview ¶
Package config contains application config code
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppConfig ¶
type AppConfig struct { Port int `mapstructure:"port"` LogLevel string `mapstructure:"logLevel"` Db DbConfig `mapstructure:"db"` }
AppConfig root app config
func NewConfig ¶
func NewConfig(logger logger.Logger, fn OnConfigChange) *AppConfig
NewConfig loads new config or run panic on error
func (*AppConfig) PrintConfig ¶
PrintConfig returns print current config into log output
type DbConfig ¶
type DbConfig struct { Type string `mapstructure:"type"` ConnectionString string `mapstructure:"connectionString"` }
DbConfig service database configuration
type OnConfigChange ¶
type OnConfigChange func(*AppConfig)
OnConfigChange callback for config changes
Click to show internal directories.
Click to hide internal directories.