Documentation ¶
Overview ¶
Package configstate implements the manager and state aspects responsible for the configuration of snaps.
Index ¶
- func Configure(st *state.State, snapName string, patch map[string]interface{}, flags int) *state.TaskSet
- func ConfigureHookTimeout() time.Duration
- func ConfigureInstalled(st *state.State, snapName string, patch map[string]interface{}, flags int) (*state.TaskSet, error)
- func ContextTransaction(context *hookstate.Context) *config.Transaction
- func Init(st *state.State, hookManager *hookstate.HookManager) error
- func MockConfigcoreExportExperimentalFlags(mock func(tr config.Conf) error) (restore func())
- func MockConfigcoreRun(f func(config.Conf) error) (restore func())
- func RemapSnapFromRequest(snapName string) string
- func RemapSnapToResponse(snapName string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Configure ¶
func Configure(st *state.State, snapName string, patch map[string]interface{}, flags int) *state.TaskSet
Configure returns a taskset to apply the given configuration patch.
func ConfigureHookTimeout ¶
func ConfigureInstalled ¶
func ConfigureInstalled(st *state.State, snapName string, patch map[string]interface{}, flags int) (*state.TaskSet, error)
ConfigureInstalled returns a taskset to apply the given configuration patch for an installed snap. It returns snap.NotInstalledError if the snap is not installed.
func ContextTransaction ¶
func ContextTransaction(context *hookstate.Context) *config.Transaction
ContextTransaction retrieves the transaction cached within the context (and creates one if it hasn't already been cached).
func MockConfigcoreRun ¶
func RemapSnapFromRequest ¶
RemapSnapFromRequest renames a snap as received from an API request
func RemapSnapToResponse ¶
RemapSnapToResponse renames a snap as about to be sent from an API response
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.