config

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2025 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	Debug    bool   `mapstructure:"debug" short:"d" description:"debug mode" default:"false"`
	Timezone string `mapstructure:"timezone" description:"timezone" default:"UTC"`

	Server Server `mapstructure:"server" group:"server"`

	Database map[string]Database `mapstructure:"database" group:"database" mapkey:"<dbkey>"`

	ParamAb string `mapstructure:"paramAb" description:"" default:""`
	ParamAC string `mapstructure:"paramAC" description:"" default:""`
	ParamAD string `mapstructure:"param_ad" short:"z" description:"" default:""`
	ParamAE string `mapstructure:"param-ae" description:"" default:""`
	// contains filtered or unexported fields
}

func (*AppConfig) GetParamInternal added in v1.0.2

func (ac *AppConfig) GetParamInternal() string

func (*AppConfig) SetParamInternal added in v1.0.2

func (ac *AppConfig) SetParamInternal(paramInternal string)

type Database

type Database struct {
	Host string `mapstructure:"host" description:"host" default:"localhost"`
	Port int    `mapstructure:"port" description:"port" default:"3306"`
	User string `mapstructure:"user" description:"user" default:"root"`
	Pass string `mapstructure:"pass" description:"pass"`
}

type Server

type Server struct {
	Port int `mapstructure:"port" description:"port" default:"8080"`
}

Jump to

Keyboard shortcuts

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