2022-06-07 08:31:28 +00:00
|
|
|
package driver
|
|
|
|
|
|
|
|
type Config struct {
|
2022-08-30 06:39:10 +00:00
|
|
|
Name string `json:"name"`
|
|
|
|
LocalSort bool `json:"local_sort"`
|
|
|
|
OnlyLocal bool `json:"only_local"`
|
|
|
|
OnlyProxy bool `json:"only_proxy"`
|
|
|
|
NoCache bool `json:"no_cache"`
|
|
|
|
NoUpload bool `json:"no_upload"`
|
|
|
|
NeedMs bool `json:"need_ms"` // if need get message from user, such as validate code
|
|
|
|
DefaultRoot string `json:"default_root"`
|
2023-02-23 14:00:17 +00:00
|
|
|
CheckStatus bool `json:"-"`
|
|
|
|
Alert string `json:"alert"` //info,success,warning,danger
|
2022-06-07 08:31:28 +00:00
|
|
|
}
|
2022-06-28 10:00:11 +00:00
|
|
|
|
|
|
|
func (c Config) MustProxy() bool {
|
|
|
|
return c.OnlyProxy || c.OnlyLocal
|
|
|
|
}
|