2025-12-26 17:45:37 +05:00
|
|
|
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"`
|
2026-01-16 17:44:03 +05:00
|
|
|
SpecialValue string `yaml:"special-value"`
|
2025-12-26 17:45:37 +05:00
|
|
|
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"`
|
|
|
|
|
}
|