Documentation ¶
Index ¶
- Constants
- Variables
- func LoadConfig(path string, destConfig *Config) error
- func LoadDefault(config *Config)
- func LoadFromSetting(setting setting.Setting) error
- func ParseConfig(data []byte, props map[string]string, destConfig *Config) error
- func ResetConfig(config Config)
- type Config
- type LogConfig
- type ServerConfig
Constants ¶
View Source
const ( DEFAULT_LogResponse = true DEFAULT_LogRequestBody = true DEFAULT_LogLevel = 1 //info DEFAULT_LogInnerLevel = 1 DEFAULT_LogClient = true DEFAULT_ServerPort = 8080 DEFAULT_DB_Charset = "utf8" DEFAULT_DB_MaxConn = 1000 DEFAULT_DB_MaxIdleConn = 500 )
View Source
const ( BuildinValueLog = "Value.Log" BuildinValueLogResponse = "Value.Log.ResponseBody" BuildinValueLogRequestBody = "Value.Log.RequestBody" BuildinValueLogLevel = "Value.Log.Level" BuildinValueLogInnerLevel = "Value.Log.InnerLevel" BuildinValueLogClient = "Value.Log.Client" BuildinValueServer = "Value.Server" BuildinValueServerPort = "Value.Server.Port" )
Variables ¶
View Source
var GConfig = gDefaultConfig
Functions ¶
func LoadConfig ¶
func LoadDefault ¶
func LoadDefault(config *Config)
func LoadFromSetting ¶ added in v0.0.11
func ParseConfig ¶ added in v0.0.9
func ResetConfig ¶
func ResetConfig(config Config)
Types ¶
type Config ¶
type ServerConfig ¶ added in v0.0.11
type ServerConfig struct {
Port int
}
Click to show internal directories.
Click to hide internal directories.