Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AppConfig ¶
type AppConfig struct { Name string `json:"name"` RunMode string `json:"run_mode"` Addr string `json:"addr"` JwtSecret string `json:"jwt_secret"` // JWTExpirationTime day JwtExpirationTime int `json:"jwt_expiration_time"` }
AppConfig ...
type CacheConfig ¶
CacheConfig ...
type Config ¶
type Config struct { // common App AppConfig `json:"app"` MySQL MySQLConfig `json:"mysql"` Redis RedisConfig `json:"redis"` Cache CacheConfig `json:"cache"` SentinelRules []SentinelRuleConfig `json:"sentinel_rules"` }
Config global config include common and biz config
var ( // Conf ... Conf *Config )
type MySQLConfig ¶
type MySQLConfig struct { Name string `json:"name"` Addr string `json:"addr"` DB string `json:"db"` UserName string `json:"username"` Password string `json:"password"` MaxIdleConn int `json:"max_idel_conn"` MaxOpenConn int `json:"max_open_conn"` ConnMaxLifeTime int `json:"conn_max_lifetime"` }
MySQLConfig ...
Click to show internal directories.
Click to hide internal directories.