Config loads the the base configuration values with defaults.
()
| 37 | |
| 38 | // Config loads the the base configuration values with defaults. |
| 39 | func (i *Instance) Config() (*conf.Configuration, error) { |
| 40 | if i.BaseConfig == nil { |
| 41 | return nil, errors.New("no configuration data available") |
| 42 | } |
| 43 | |
| 44 | baseConf := &conf.Configuration{} |
| 45 | *baseConf = *i.BaseConfig |
| 46 | baseConf.ApplyDefaults() |
| 47 | |
| 48 | return baseConf, nil |
| 49 | } |
| 50 | |
| 51 | // UpdateConfig updates the base config |
| 52 | func (i *Instance) UpdateConfig(tx *storage.Connection, config *conf.Configuration) error { |
no test coverage detected