Versions in this module Expand all Collapse all v0 v0.1.0 Nov 12, 2022 v0.0.1 Nov 10, 2022 Changes in this version + func DeleteSnapConfig(st *state.State, snapName string) error + func DiscardRevisionConfig(st *state.State, snapName string, rev snap.Revision) error + func GetSnapConfig(st *state.State, snapName string) (*json.RawMessage, error) + func IsNoOption(err error) bool + func ParseKey(key string) (subkeys []string, err error) + func Patch(cfg Conf, snapName string, patch map[string]interface{}) error + func PatchConfig(snapName string, subkeys []string, pos int, config interface{}, ...) (interface{}, error) + func RegisterExternalConfig(snapName, key string, vf ExternalCfgFunc) error + func RestoreRevisionConfig(st *state.State, snapName string, rev snap.Revision) error + func SaveRevisionConfig(st *state.State, snapName string, rev snap.Revision) error + func SetSnapConfig(st *state.State, snapName string, snapcfg *json.RawMessage) error + type Conf interface + Changes func() []string + Get func(snapName, key string, result interface{}) error + GetMaybe func(snapName, key string, result interface{}) error + GetPristine func(snapName, key string, result interface{}) error + Set func(snapName, key string, value interface{}) error + State func() *state.State + type ConfGetter interface + Get func(snapName, key string, result interface{}) error + GetMaybe func(snapName, key string, result interface{}) error + GetPristine func(snapName, key string, result interface{}) error + type ExternalCfgFunc func(key string) (result interface{}, err error) + type NoOptionError struct + Key string + SnapName string + func (e *NoOptionError) Error() string + type Transaction struct + func NewTransaction(st *state.State) *Transaction + func (t *Transaction) Changes() []string + func (t *Transaction) Commit() + func (t *Transaction) Get(snapName, key string, result interface{}) error + func (t *Transaction) GetMaybe(instanceName, key string, result interface{}) error + func (t *Transaction) GetPristine(snapName, key string, result interface{}) error + func (t *Transaction) GetPristineMaybe(instanceName, key string, result interface{}) error + func (t *Transaction) Set(instanceName, key string, value interface{}) error + func (t *Transaction) State() *state.State