Documentation
¶
Index ¶
Constants ¶
View Source
const ( MySQL = iota PgSQL )
DB enum
Variables ¶
View Source
var ( DB *sqlx.DB RedisClient *redis.Client )
Global
View Source
var C = struct { Port string `yaml:"port"` WaitTimeout int `yaml:"wait_timeout"` Log Log `yaml:"log"` MySQLConf *ConnConf `yaml:"mysql"` PgSQLConf *ConnConf `yaml:"pgsql"` RedisConf *ConnConf `yaml:"redis"` }{}
C 通用配置
Functions ¶
Types ¶
type ConnConf ¶
type ConnConf struct { Host string `yaml:"host"` User string `yaml:"user"` Password string `yaml:"password"` Port int `yaml:"port"` Database string `yaml:"database"` ConnTimeout int `yaml:"conn_timeout"` ReadTimeout int `yaml:"read_timeout"` WriteTimeout int `yaml:"write_timeout"` }
ConnConf ...
Click to show internal directories.
Click to hide internal directories.