Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetConfigFilePath ¶
func SetConfigFilePath(path string)
Types ¶
type ConfigOptions ¶
type ConfigOptions struct {
Log struct {
ConsoleLevel string `json:"console-level" yaml:"console-level"`
FileLevel string `json:"file-level" yaml:"file-level"`
FilePath string `json:"file-path" yaml:"file-path"`
} `json:"log" yaml:"log"`
Web struct {
Port string `json:"port" yaml:"port"`
}
SourceFiles []string `json:"source-files" yaml:"source-files"`
// DatabaseUrl string `json:"database-url" yaml:"database-url"`
// TGApiUrl string `json:"TG-api-url" yaml:"TG-api-url"`
CrawlInterval uint64 `json:"crawl-interval" yaml:"crawl-interval"`
HealthCheck struct {
Url string `json:"url" yaml:"url"`
} `json:"healthcheck" yaml:"healthcheck"`
// RenameFormat 重命名格式
RenameFormat string `json:"rename-format" yaml:"rename-format"`
LocalCheck struct {
Url string `json:"url" yaml:"url"`
JsonPath string `json:"json-path" yaml:"json-path"`
Timeout int `json:"timeout" yaml:"timeout"`
MaxConnection int `json:"max-conn" yaml:"max-conn"`
} `json:"localcheck" yaml:"localcheck"`
SpeedTest struct {
Url string `json:"url" yaml:"url"`
IsUsed bool `json:"is-used" yaml:"is-used"`
Interval uint64 `json:"interval" yaml:"interval"`
Timeout int `json:"timeout" yaml:"timeout"`
MaxConnection int `json:"max-conn" yaml:"max-conn"`
} `json:"speedtest" yaml:"speedtest"`
}
var Config ConfigOptions
Config 配置
Click to show internal directories.
Click to hide internal directories.