ADInfo changing
This commit is contained in:
parent
1283154f32
commit
7ad9135063
31
config.go
31
config.go
|
@ -99,18 +99,9 @@ func (proxies *YamlProxies) MarshalYAML() (interface{}, error) {
|
|||
return content, nil
|
||||
}
|
||||
|
||||
// Config 任务加载的默认配置
|
||||
type Config struct {
|
||||
// Session int `yaml:"session"`
|
||||
Mode int `yaml:"mode"`
|
||||
Proxies *YamlProxies `yaml:"proxies"`
|
||||
Retry int `yaml:"retry"`
|
||||
// ADInfo ad 的一些属性,基础信息等
|
||||
type ADInfo struct {
|
||||
Priority int `yaml:"priority"`
|
||||
Curls YamlCurls `yaml:"curls"`
|
||||
|
||||
Crontab string `yaml:"crontab"`
|
||||
ITask string `yaml:"task"`
|
||||
|
||||
Device string `yaml:"device"`
|
||||
Platform string `yaml:"platform"`
|
||||
AreaCC string `yaml:"area_cc"`
|
||||
|
@ -120,15 +111,30 @@ type Config struct {
|
|||
CatchAccountID int `yaml:"catch_account_id"`
|
||||
}
|
||||
|
||||
// Config 任务加载的默认配置
|
||||
type Config struct {
|
||||
// Session int `yaml:"session"`
|
||||
Mode int `yaml:"mode"`
|
||||
Proxies *YamlProxies `yaml:"proxies"`
|
||||
Retry int `yaml:"retry"`
|
||||
|
||||
Curls YamlCurls `yaml:"curls"`
|
||||
|
||||
Crontab string `yaml:"crontab"`
|
||||
ITask string `yaml:"task"`
|
||||
|
||||
ADInfo `yaml:",inline"`
|
||||
}
|
||||
|
||||
// newDefaultConfig create a default config
|
||||
func newDefaultConfig() *Config {
|
||||
conf := &Config{
|
||||
// Session: 1,
|
||||
Mode: 0,
|
||||
Retry: 0,
|
||||
Priority: 10000,
|
||||
Crontab: "",
|
||||
|
||||
ADInfo: ADInfo{
|
||||
Device: "",
|
||||
Platform: "",
|
||||
AreaCC: "",
|
||||
|
@ -136,6 +142,7 @@ func newDefaultConfig() *Config {
|
|||
Media: -1,
|
||||
SpiderID: -1,
|
||||
CatchAccountID: -1,
|
||||
},
|
||||
}
|
||||
return conf
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user