mirror of
https://github.com/Baipyrus/ProxySwitcher.git
synced 2024-12-26 04:31:45 +00:00
extend and format config types
This commit is contained in:
parent
16d0bd7ca4
commit
67760c7bfc
@ -1,14 +1,21 @@
|
|||||||
package util
|
package util
|
||||||
|
|
||||||
type Config struct {
|
type Config struct {
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Cmd string `json:"cmd"`
|
Cmd string `json:"cmd"`
|
||||||
Set []Variant `json:"set,omitempty"`
|
Set []*Variant `json:"set,omitempty"`
|
||||||
Unset []Variant `json:"unset,omitempty"`
|
Unset []*Variant `json:"unset,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type Type string
|
||||||
|
|
||||||
|
const (
|
||||||
|
TEXT Type = "text"
|
||||||
|
VARIABLE Type = "variable"
|
||||||
|
)
|
||||||
|
|
||||||
type Variant struct {
|
type Variant struct {
|
||||||
Arguments []string `json:"args"`
|
Arguments []string `json:"args"`
|
||||||
Type string `json:"type,omitempty"`
|
Type Type `json:"type,omitempty"`
|
||||||
Equator string `json:"equator,omitempty"`
|
Equator string `json:"equator,omitempty"`
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user