Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CosInfo ¶
type CosInfo struct { SecretID string `yaml:"secret_id"` SecretKey string `yaml:"secret_key"` Domain string `yaml:"domain"` Region string `yaml:"region"` DisableSSL bool `yaml:"disable_ssl"` ForcePathStyle bool `yaml:"force_path_style"` AvatarBucket string `yaml:"avatar_bucket"` // 头像专用 MediaBucket string `yaml:"media_bucket"` // 媒体消息专用,包含图片,语音,文件 Expire int64 `yaml:"expire"` // 单位小时 SignFlag bool `yaml:"sign"` // 是否需要签名,默认需要 }
type DBInfo ¶
type DBInfo struct { // user:pass@tcp(127.0.0.1:3306)/dbname?charset=utf8mb4&parseTime=True&loc=Local Dsn string `yaml:"dsn"` MaxIdleConns int `yaml:"max_idle_conns"` MaxOpenConns int `yaml:"max_open_conns"` MaxLifeTime int `yaml:"max_life_time"` // 单位秒 }
DBInfo db信息
type ServerCfg ¶
type ServerCfg struct { ServerInfo *ServerInfo `yaml:"server"` DBInfo *DBInfo `yaml:"db"` ConnInfo *ConnInfo `yaml:"conn"` CosInfo *CosInfo `yaml:"cos"` LogInfo *LogInfo `yaml:"log"` }
type ServerInfo ¶
type ServerInfo struct { Name string `yaml:"name"` Listen string `yaml:"listen"` Timeout int `yaml:"timeout"` Secret string `yaml:"secret"` TokenExpire int `yaml:"token_expire"` DataCenterId int64 `yaml:"data_center_id"` DebugReqRsp bool `yaml:"debug_req_rsp"` ResourceRoot string `yaml:"resource_root"` RemoteUrlRoot string `yaml:"remote_url_root"` Mode string `yaml:"mode"` // debug, release, test }
Click to show internal directories.
Click to hide internal directories.