Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadConfig ¶
Types ¶
type ArticlesConfig ¶
type ArticlesConfig struct {
Port int `toml:"port"` // HTTP 服务端口
}
ArticlesConfig articles 服务配置
type Config ¶
type Config struct {
Logger logger.Config `toml:"logger" json:"logger"`
Debug debug.Config `toml:"debug" json:"debug"`
Mysql db.Mysql `toml:"mysql" json:"mysql"`
Socks5 Socks5Config `toml:"socks5" json:"socks5"`
Reader ReaderConfig `toml:"reader" json:"reader"`
Official OfficialConfig `toml:"official" json:"official"`
Articles ArticlesConfig `toml:"articles" json:"articles"`
}
var Cfg *Config
type OfficialConfig ¶
type OfficialConfig struct {
Port string `toml:"port"` // HTTP 服务端口
}
OfficialConfig official 服务配置
type ReaderConfig ¶
type ReaderConfig struct {
Port int `toml:"port"`
TaskTimeout int `toml:"task_timeout"`
MaxConcurrentTasks int `toml:"max_concurrent_tasks"`
LogRetentionDays int `toml:"log_retention_days"`
}
ReaderConfig reader 服务配置
func (*ReaderConfig) GetTimeout ¶
func (c *ReaderConfig) GetTimeout() time.Duration
GetTimeout 获取超时时间
type Socks5Config ¶
type Socks5Config struct {
Enabled bool `toml:"enabled" json:"enabled"` // 是否启用代理
Host string `toml:"host" json:"host"` // 代理服务器地址
Port int `toml:"port" json:"port"` // 代理服务器端口
Username string `toml:"username" json:"username"` // 用户名(可选)
Password string `toml:"password" json:"password"` // 密码(可选)
}
Socks5Config SOCKS5代理配置
Click to show internal directories.
Click to hide internal directories.