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 OssConfig
- type RabbitmqConfig
- 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 CommonConfig struct {
StaticPath string `mapstructure:"staticPath"`
}
type Config ¶
type Config struct { Serve ServeConfig `mapstructure:"serve"` DbServer DBConfig `mapstructure:"dbServer"` Common CommonConfig `mapstructure:"common"` Rabbitmq RabbitmqConfig `mapstructure:"rabbitmq"` Oss OssConfig `mapstructure:"oss"` }
type RabbitmqConfig ¶
type RabbitmqConfig struct { HostPort string `mapstructure:"hostPort"` Username string `mapstructure:"username"` Password string `mapstructure:"password"` Prefetch int `mapstructure:"prefetch"` VHost string `mapstructure:"vHost"` Exchanges []map[string]string `mapstructure:"exchanges"` QueuePrefix string `mapstructure:"queuePrefix"` }
type ServeConfig ¶
type ServeConfig struct {
HostPort string `mapstructure:"hostPort"`
}
Click to show internal directories.
Click to hide internal directories.