Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Core *ConfigCore `yaml:"core"` Log *ConfigLog `yaml:"log"` Db *ConfigDb `yaml:"db"` Mail *ConfigMail `yaml:"mail"` Cache *ConfigCache `yaml:"cache"` }
Config 配置对象
type ConfigAutoTLS ¶
type ConfigAutoTLS struct { Enabled bool `yaml:"enabled"` Folder string `yaml:"folder"` Host string `yaml:"host"` }
ConfigAutoTLS support Let's Encrypt setting.
type ConfigCache ¶
type ConfigCache struct { Type string `yaml:"type"` Timeout int32 `yaml:"timeout"` Redis *ConfigCacheRedis `yaml:"redis"` }
ConfigCache is sub section of config
type ConfigCacheRedis ¶
type ConfigCacheRedis struct { Host string `yaml:"host"` Port int `yaml:"port"` Password string `yaml:"password"` DB int `yaml:"db"` KeyPrefix string `yaml:"keyprefix"` }
ConfigCacheRedis is sub section of config
type ConfigCore ¶
type ConfigCore struct { Enabled bool `yaml:"enabled"` Mode string `yaml:"mode"` Name string `yaml:"name"` Host string `yaml:"host"` Port string `yaml:"port"` MaxPingCount int `yaml:"max_ping_count"` JwtSecret string `yaml:"jwt_secret"` TLS *ConfigTLS `yaml:"tls"` AutoTLS *ConfigAutoTLS `yaml:"auto_tls"` }
ConfigCore ...
type ConfigDb ¶
type ConfigDb struct { Unix string `yaml:"unix"` Host string `yaml:"host"` Port string `yaml:"port"` Charset string `yaml:"charset"` Dialect string `yaml:"dialect"` DbName string `yaml:"db_name"` Username string `yaml:"username"` Password string `yaml:"password"` TablePrefix string `yaml:"table_prefix"` MaxIdleConns int `yaml:"max_idle_conns"` MaxOpenConns int `yaml:"max_open_conns"` ConnMaxLifeTime int `yaml:"conn_max_lift_time"` LogMode bool `yaml:"log_mode"` }
ConfigDb is sub section of config.
type ConfigLog ¶
type ConfigLog struct { DefaultDir string `yaml:"default_dir"` Console *ConfigLogConsole `yaml:"console"` Zap *ConfigLogZap `yaml:"zap"` }
ConfigLog is sub section of config.
type ConfigLogConsole ¶
type ConfigLogZap ¶
Click to show internal directories.
Click to hide internal directories.