templatefile/pkg/configs/main.go

27 lines
676 B
Go

package configs
type SimpleCondition struct {
Var string `json:"var"`
Value bool `json:"value"`
}
type SystemUser struct {
UserName string `json:"username"`
Group string `json:"group"`
Home string `json:"home"`
Shell string `json:"shell"`
}
type Service struct {
EnabledBy SimpleCondition `json:"EnabledBy"`
ConfigFiles []ConfigFile `json:"ConfigFiles"`
Vars map[string]interface{} `json:"Vars"`
Daemon SystemService `json:"Daemon"`
Users map[string]SystemUser `json:"Users"`
}
type TemplaterConfig struct {
Name string `json:"Name"`
Services map[string]Service `json:"Services"`
}