config

package
v0.5.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2025 License: GPL-3.0 Imports: 8 Imported by: 0

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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL