patch

package
v0.0.0-...-7cedb2b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2016 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Level = 2

Level is the current implemented patch level of the state format and content.

Functions

func Apply

func Apply(s *state.State) error

Apply applies any necessary patches to update the provided state to conventions required by the current patch level of the system.

func Init

func Init(s *state.State)

Init initializes an empty state to the current implemented patch level.

func Mock

func Mock(level int, p map[int]func(*state.State) error) (restore func())

Mock mocks the current patch level and available patches.

Types

type OldSnapSetup

type OldSnapSetup struct {
	Name     string        `json:"name,omitempty"`
	Revision snap.Revision `json:"revision,omitempty"`
	Channel  string        `json:"channel,omitempty"`
	UserID   int           `json:"user-id,omitempty"`

	Flags snapstate.SnapSetupFlags `json:"flags,omitempty"`

	SnapPath string `json:"snap-path,omitempty"`

	DownloadInfo *snap.DownloadInfo `json:"download-info,omitempty"`
	SideInfo     *snap.SideInfo     `json:"side-info,omitempty"`
}

type OldSnapState

type OldSnapState struct {
	SnapType string           `json:"type"` // Use Type and SetType
	Sequence []*snap.SideInfo `json:"sequence"`
	Active   bool             `json:"active,omitempty"`
	// Current indicates the current active revision if Active is
	// true or the last active revision if Active is false
	// (usually while a snap is being operated on or disabled)
	Current   snap.Revision            `json:"current"`
	Candidate *snap.SideInfo           `json:"candidate,omitempty"`
	Channel   string                   `json:"channel,omitempty"`
	Flags     snapstate.SnapStateFlags `json:"flags,omitempty"`

	// incremented revision used for local installs
	LocalRevision snap.Revision `json:"local-revision,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL