Documentation
¶
Index ¶
- func Get(key string) interface{}
- func GetBool(key string) bool
- func GetInt(key string) int
- func GetString(key string) string
- func GetStringMap(key string) map[string]interface{}
- func GetStringMapString(key string) map[string]string
- func GetStringSlice(key string) []string
- func IsSet(key string) bool
- func ReadConfig()
- func Set(key string, value interface{})
- func SetConfigPath(path string)
- type CommonConfig
- type Config
- type DBConfig
- type SSLConfig
- type ServeConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetStringMap ¶
func GetStringMapString ¶
func GetStringSlice ¶
func ReadConfig ¶
func ReadConfig()
func SetConfigPath ¶
func SetConfigPath(path string)
Types ¶
type CommonConfig ¶
type Config ¶
type Config struct { Serve ServeConfig `mapstructure:"serve"` DbServer DBConfig `mapstructure:"postgresqlServer"` Common CommonConfig `mapstructure:"common"` }
type DBConfig ¶
type DBConfig struct { ReadHost string `mapstructure:"readhost"` ReadPort int `mapstructure:"readport"` WriteHost string `mapstructure:"writehost"` WritePort int `mapstructure:"writeport"` Username string `mapstructure:"username"` Password string `mapstructure:"password"` Database string `mapstructure:"database"` }
type ServeConfig ¶
Click to show internal directories.
Click to hide internal directories.