Documentation ¶
Overview ¶
Package settings provides ...
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Conf = new(AppConfig)
Conf 全局变量,用来保存应用程序所有的配置信息
Functions ¶
Types ¶
type AppConfig ¶
type AppConfig struct { Name string `mapstructure:",name"` Mode string `mapstructure:",mode"` Version string `mapstructure:",version"` StartTime string `mapstructure:"start_time"` MachineID int64 `mapstructure:"machine_id"` Port int `mapstructure:"port"` *LogConfig `mapstructure:"log"` *MySQLConfig `mapstructure:"mysql"` *RedisConfig `mapstructure:"redis"` }
AppConfig 应用程序配置信息
type LogConfig ¶
type LogConfig struct { Level string `mapstructure:"level"` Filename string `mapstructure:"filename"` MaxSize int `mapstructure:"max_size"` MaxAge int `mapstructure:"max_age"` MaxBackups int `mapstructure:"max_backup"` }
LogConfig zap配置信息
type MySQLConfig ¶
type MySQLConfig struct { Host string `mapstructure:"host"` User string `mapstructure:"user"` Password string `mapstructure:"password"` DbName string `mapstructure:"dbname"` Port int `mapstructure:"port"` MaxOpenConns int `mapstructure:"max_open_conns"` MaxIdleConns int `mapstructure:"max_idel_conns"` }
MySQLConfig MySQL配置信息
Click to show internal directories.
Click to hide internal directories.