Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cfg = new(AppConfig)
Functions ¶
This section is empty.
Types ¶
type AppConfig ¶
type AppConfig struct { Name string `mapstructure:"name"` Mode string `mapstructure:"mode"` Port int `mapstructure:"port"` Version string `mapstructure:"version"` StartTime string `mapstructure:"start_time"` MachineId uint16 `mapstructure:"machine_id"` JwtKey string `mapstructure:"jwt_key"` *MysqlConfig `mapstructure:"mysql"` *RedisConfig `mapstructure:"redis"` *EtcdConfig `mapstructure:"etcd"` *LogConfig `mapstructure:"log"` *ServerConfig `mapstructure:"server"` }
type EtcdConfig ¶
type MysqlConfig ¶
type MysqlConfig struct { Host string `mapstructure:"host"` User string `mapstructure:"user"` Password string `mapstructure:"password"` DB string `mapstructure:"dbname"` Port int `mapstructure:"port"` SSLMode string `mapstructure:"sslmode"` MaxOpenConns int `mapstructure:"max_open_conns"` MaxIdleConns int `mapstructure:"max_idle_conns"` TimeZone string `mapstructure:"time_zone"` }
type RedisConfig ¶
type RedisConfig struct { Host string `mapstructure:"host"` Password string `mapstructure:"password"` Port int `mapstructure:"port"` DB int `mapstructure:"db"` PoolSize int `mapstructure:"pool_size"` MinIdleConns int `mapstructure:"min_idle_conns"` ConnectType string `mapstructure:"connect_type"` SSHRemoteHost string `mapstructure:"ssh_remote_host"` SSHFile string `mapstructure:"ssh_file"` }
type ServerConfig ¶
Click to show internal directories.
Click to hide internal directories.