Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Debug bool `toml:"debug"` APIKey string `toml:"api_key"` APISecret string `toml:"api_secret"` FacesetToken string `toml:"faceset_token"` FaceType string `toml:"face_type"` Cmd string `toml:"cmd"` Http *HTTPConfig `toml:"http"` MySQL *MySQLConfig `toml:"mysql"` }
Config 系统根配置
var CFG *Config
type Duration ¶
Duration 用于日志文件解析出时间段
func (*Duration) UnmarshalText ¶
UnmarshalText implements encoding.TextUnmarshaler
type HTTPConfig ¶
HTTPConfig http监听配置
type MySQLConfig ¶
type MySQLConfig struct { Debug bool `toml:"debug"` // 是否调试模式 Address string `toml:"address"` // 数据库连接地址 Port int `toml:"port"` // 数据库端口 MaxIdleConns int `toml:"max_idle_conns"` // 连接池最大连接数 MaxOpenConns int `toml:"max_open_conns"` // 默认打开连接数 User string `toml:"user"` // 数据库用户名 Passwd string `toml:"passwd"` // 数据库密码 DbName string `toml:"db_name"` // 数据库名 Prefix string `toml:"prefix"` // 数据库表前缀 PingInterval Duration `toml:"ping_interval"` // 定时保活定 }
MySQLConfig 数据库配置
Click to show internal directories.
Click to hide internal directories.