Documentation ¶
Index ¶
- Variables
- func NewToBool() mapper.Mapper
- func NewToMap() mapper.Mapper
- func NewToSlice() mapper.Mapper
- func NewTypeConverter(fieldType string, converter Converter) mapper.Mapper
- func PrintInstall(cfg CloudConfig) ([]byte, error)
- func ToBytes(cfg CloudConfig) ([]byte, error)
- func ToEnv(cfg CloudConfig) ([]string, error)
- func Write(cfg CloudConfig, writer io.Writer) error
- type CloudConfig
- type Converter
- type File
- type FuzzyNames
- type HAOS
- type Install
- type Manifest
- type Wifi
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // SystemConfig is the default system configuration SystemConfig = system.RootPath("config.yaml") // LocalConfig is the local system configuration LocalConfig = system.LocalPath("config.yaml") )
Functions ¶
func NewToSlice ¶
func PrintInstall ¶
func PrintInstall(cfg CloudConfig) ([]byte, error)
func ToBytes ¶
func ToBytes(cfg CloudConfig) ([]byte, error)
func ToEnv ¶
func ToEnv(cfg CloudConfig) ([]string, error)
Types ¶
type CloudConfig ¶
type CloudConfig struct { SSHAuthorizedKeys []string `json:"sshAuthorizedKeys,omitempty"` BootManifests []Manifest `json:"bootManifests,omitempty"` WriteFiles []File `json:"writeFiles,omitempty"` Hostname string `json:"hostname,omitempty"` HAOS HAOS `json:"haos,omitempty"` Runcmd []string `json:"runCmd,omitempty"` Bootcmd []string `json:"bootCmd,omitempty"` Initcmd []string `json:"initCmd,omitempty"` Fs afero.Fs `json:"-"` }
Builds the cloud config object
func ReadConfig ¶
func ReadConfig() (CloudConfig, error)
func (*CloudConfig) InitFs ¶
func (c *CloudConfig) InitFs(fs afero.Fs)
type File ¶
type FuzzyNames ¶
type FuzzyNames struct { mappers.DefaultMapper Names map[string]string }
func (*FuzzyNames) AddName ¶
func (f *FuzzyNames) AddName(name, toName string)
func (*FuzzyNames) ToInternal ¶
func (f *FuzzyNames) ToInternal(data map[string]interface{}) error
TODO: the error is never set in this code, we don't use the return value
type HAOS ¶
type HAOS struct { DataSources []string `json:"dataSources,omitempty"` Modules []string `json:"modules,omitempty"` Sysctls map[string]string `json:"sysctls,omitempty"` NTPServers []string `json:"ntpServers,omitempty"` DNSNameservers []string `json:"dnsNameservers,omitempty"` Wifi []Wifi `json:"wifi,omitempty"` Password string `json:"password,omitempty"` ServerURL string `json:"serverUrl,omitempty"` Token string `json:"token,omitempty"` Labels map[string]string `json:"labels,omitempty"` K3sArgs []string `json:"k3sArgs,omitempty"` Environment map[string]string `json:"environment,omitempty"` Taints []string `json:"taints,omitempty"` Install *Install `json:"install,omitempty"` }
type Install ¶
type Install struct { ForceEFI bool `json:"forceEfi,omitempty"` Device string `json:"device,omitempty"` ConfigURL string `json:"configUrl,omitempty"` Silent bool `json:"silent,omitempty"` ISOURL string `json:"isoUrl,omitempty"` PowerOff bool `json:"powerOff,omitempty"` NoFormat bool `json:"noFormat,omitempty"` Debug bool `json:"debug,omitempty"` TTY string `json:"tty,omitempty"` }
Click to show internal directories.
Click to hide internal directories.