Documentation
¶
Index ¶
- Variables
- func IdToBytes(id string) []byte
- func SafeWrite(name string, data []byte) error
- type AppConfig
- func (c AppConfig) CombinedConfig() (*toml.Tree, error)
- func (c AppConfig) Get(key string) string
- func (c AppConfig) GetDefault(key string, defval string) string
- func (c AppConfig) GetOrDie(key string) string
- func (c AppConfig) Has(key string) bool
- func (c AppConfig) SearchPaths() []string
- func (c AppConfig) UpdateKeys(keyVals map[string]string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var DEF_CONFIG_ORDER = []string{
"/usr/lib/sota/conf.d",
"/var/sota/sota.toml",
"/etc/sota/conf.d/",
}
View Source
var ErrNoWritableFound = errors.New("no writable TOML file found")
Functions ¶
Types ¶
type AppConfig ¶
type AppConfig struct {
// contains filtered or unexported fields
}
func NewAppConfig ¶
NewAppConfig parses config files as per: https://docs.ota.here.com/ota-client/latest/aktualizr-config-options.html#_how_toml_files_are_processed
func (AppConfig) SearchPaths ¶
SearchPaths returns the list of config paths used to build this AppConfig
Click to show internal directories.
Click to hide internal directories.