Documentation
¶
Index ¶
- func GetConfigValue(cfg interface{}, key string) (*reflect.Value, error)
- func GetDefaultServerConfigPath() string
- func SetConfigValue(cfg interface{}, key, value string) error
- func WriteServerConfig(path string, config *ServerConfigStruct) error
- type ServerConfigStruct
- type ServerLogConfig
- type ServerMongoDBConfig
- type ServerSecurityConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConfigValue ¶
GetConfigValue 获取配置值
func GetDefaultServerConfigPath ¶
func GetDefaultServerConfigPath() string
func SetConfigValue ¶
SetConfigValue 设置配置值
func WriteServerConfig ¶
func WriteServerConfig(path string, config *ServerConfigStruct) error
WriteServerConfig 写入配置
Types ¶
type ServerConfigStruct ¶
type ServerConfigStruct struct { Listen string `yaml:"listen" json:"listen"` PublicUrl string `yaml:"public_url" json:"public_url"` Security ServerSecurityConfig `yaml:"security" json:"security"` Debug bool `yaml:"debug" json:"debug"` Log ServerLogConfig `yaml:"log" json:"log"` MongoDB ServerMongoDBConfig `yaml:"mongodb" json:"mongodb"` }
func GetDefaultServerConfig ¶
func GetDefaultServerConfig() ServerConfigStruct
func ReadServerConfig ¶
func ReadServerConfig(path string) (*ServerConfigStruct, error)
ReadServerConfig 读取配置
type ServerLogConfig ¶
type ServerMongoDBConfig ¶
type ServerSecurityConfig ¶
Click to show internal directories.
Click to hide internal directories.