Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cfg = &BaseConfig{}
Functions ¶
func LoadAppConfig ¶
func LoadAppConfig[T HasBaseConfig]( config T, serviceName, version string, ) error
Types ¶
type BaseConfig ¶
type BaseConfig struct {
HumanReadableOutput bool `mapstructure:"human_readable_output" validate:""`
LogLevel string `mapstructure:"log_level" validate:"oneof=debug info warn error"`
ProductionEnvironment bool `mapstructure:"production_environment" validate:""`
Port int `mapstructure:"port" validate:"numeric,min=1,max=65535"`
}
func (*BaseConfig) GetBase ¶
func (b *BaseConfig) GetBase() *BaseConfig
type HasBaseConfig ¶
type HasBaseConfig interface {
GetBase() *BaseConfig
}
Click to show internal directories.
Click to hide internal directories.