Documentation ¶
Index ¶
- Constants
- type MixConfig
- func (config *MixConfig) Convert(filename string) error
- func (config *MixConfig) CreateDefaultConfig() error
- func (config *MixConfig) GetConfigFileName() string
- func (config *MixConfig) InitConfigPath(fullpath string) error
- func (config *MixConfig) LoadConfig(filename string) error
- func (config *MixConfig) LoadDefaults() error
- func (config *MixConfig) LoadDefaultsForPath(path string)
- func (config *MixConfig) Print() error
- func (config *MixConfig) SaveConfig() error
- func (config *MixConfig) SetProperty(propertyStr string, value string) error
- type MixState
Constants ¶
const CurrentConfigVersion = "1.2"
CurrentConfigVersion holds the current version of the config file
const CurrentStateVersion = "1.1"
CurrentStateVersion is the current revision for the state file structure
const DefaultFormatPath = "/usr/share/defaults/swupd/format"
DefaultFormatPath is the default path for the format file specified by swupd
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MixConfig ¶
type MixConfig struct { Builder builderConf Swupd swupdConf Server serverConf Mixer mixerConf // contains filtered or unexported fields }
MixConfig represents the config parameters found in the builder config file.
func (*MixConfig) CreateDefaultConfig ¶
CreateDefaultConfig creates a default builder.conf using the active directory as base path for the variables values.
func (*MixConfig) GetConfigFileName ¶
GetConfigFileName returns the file name of current config
func (*MixConfig) InitConfigPath ¶
InitConfigPath sets the main config name to what was passed in, or defaults to the current working directory + builder.conf
func (*MixConfig) LoadConfig ¶
LoadConfig loads a configuration file from a provided path or from local directory if none is provided
func (*MixConfig) LoadDefaults ¶
LoadDefaults sets sane values for the config properties
func (*MixConfig) LoadDefaultsForPath ¶
LoadDefaultsForPath sets sane values for config properties using `path` as base directory
func (*MixConfig) SaveConfig ¶
SaveConfig saves the properties in MixConfig to a TOML config file