Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Mysql MysqlConfig System SystemConfig Log LogConfig Mgo Mongodb JWT JWTConfig )
Functions ¶
func InitConfig ¶
Types ¶
type Config ¶
type Config struct { Mysql MysqlConfig `mapstructure:"mysql"` System SystemConfig `mapstructure:"system"` Log LogConfig `mapstructure:"log"` Mongodb Mongodb `mapstructure:"mongodb"` Redis RedisConfig `mapstructure:"redis"` JWT JWTConfig `mapstructure:"jwt"` }
type EnvironmentType ¶
type EnvironmentType int
const ( Dev EnvironmentType = iota Docker Test )
func RunEnvironment ¶
func RunEnvironment() EnvironmentType
type MysqlConfig ¶
type MysqlConfig struct { DockerHost string `mapstructure:"docker_host"` Host string `mapstructure:"host"` Port string `mapstructure:"port"` User string `mapstructure:"user"` Password string `mapstructure:"password"` MaxOpenConns int `mapstructure:"max_open_conns"` MaxIdleConns int `mapstructure:"max_idle_conns"` Database string `mapstructure:"database"` }
type RedisConfig ¶
type SystemConfig ¶
Click to show internal directories.
Click to hide internal directories.