71 lines
2.3 KiB
Go
71 lines
2.3 KiB
Go
|
|
package types
|
||
|
|
|
||
|
|
type PackageApplication struct {
|
||
|
|
Name string `yaml:"name"`
|
||
|
|
Version string `yaml:"version"`
|
||
|
|
Description string `yaml:"description"`
|
||
|
|
Icon string `yaml:"icon"`
|
||
|
|
Type string `yaml:"type"`
|
||
|
|
ConfFiles []ConfFile `yaml:"conf-files"`
|
||
|
|
Variables []Variable `yaml:"variables"`
|
||
|
|
Sections []Section `yaml:"sections"`
|
||
|
|
Changed bool `yaml:"-"`
|
||
|
|
}
|
||
|
|
|
||
|
|
type ConfFile struct {
|
||
|
|
File string `yaml:"file"`
|
||
|
|
Type string `yaml:"type"`
|
||
|
|
Name string `yaml:"name"`
|
||
|
|
}
|
||
|
|
|
||
|
|
type Variable struct {
|
||
|
|
Name string `yaml:"name"`
|
||
|
|
Type string `yaml:"type"`
|
||
|
|
Default string `yaml:"default"`
|
||
|
|
Value interface{} `yaml:"-"`
|
||
|
|
}
|
||
|
|
|
||
|
|
type Section struct {
|
||
|
|
Name string `yaml:"name"`
|
||
|
|
Type string `yaml:"type"`
|
||
|
|
Description string `yaml:"description"`
|
||
|
|
Fields []SectionField `yaml:"fields"`
|
||
|
|
Paragraphs []string `yaml:"paragraphs"`
|
||
|
|
Parent []string `yaml:"parent"`
|
||
|
|
Condition string `yaml:"condition"`
|
||
|
|
Actions []SectionAction `yaml:"actions"`
|
||
|
|
}
|
||
|
|
|
||
|
|
type SectionField struct {
|
||
|
|
Name string `yaml:"name"`
|
||
|
|
VariableName string `yaml:"variable-name"`
|
||
|
|
FieldType string `yaml:"field-type"`
|
||
|
|
FileFieldExtensions []string `yaml:"file-field-extensions"`
|
||
|
|
Description string `yaml:"description"`
|
||
|
|
Condition string `yaml:"condition"`
|
||
|
|
Options []interface{} `yaml:"options"`
|
||
|
|
SpecialValue string `yaml:"special-Value"`
|
||
|
|
Compute string `yaml:"compute"`
|
||
|
|
Validate []FieldValidate `yaml:"validate"`
|
||
|
|
Parent []string `yaml:"parent"`
|
||
|
|
Variable *Variable `yaml:"-"`
|
||
|
|
Active bool `yaml:"-"`
|
||
|
|
}
|
||
|
|
|
||
|
|
type FieldValidate struct {
|
||
|
|
Rule string `yaml:"rule"`
|
||
|
|
Message string `yaml:"message"`
|
||
|
|
}
|
||
|
|
|
||
|
|
type SectionAction struct {
|
||
|
|
Name string `yaml:"name"`
|
||
|
|
Type string `yaml:"type"`
|
||
|
|
Command string `yaml:"command"`
|
||
|
|
FileTarget string `yaml:"file-target"`
|
||
|
|
FileSource string `yaml:"file-source"`
|
||
|
|
Condition string `yaml:"condition"`
|
||
|
|
RunAs string `yaml:"run-as"`
|
||
|
|
RequirePackages []string `yaml:"require-packages"`
|
||
|
|
Error string `yaml:"error"`
|
||
|
|
}
|