Documentation ¶
Overview ¶
Package backend implements the low-level primitives to manage the snaps and their installation on disk.
Index ¶
- func OpenSnapFile(snapPath string, sideInfo *snap.SideInfo) (*snap.Info, snap.Container, error)
- type Backend
- func (b Backend) Candidate(*snap.SideInfo)
- func (b Backend) CopySnapData(newSnap, oldSnap *snap.Info, meter progress.Meter) error
- func (b Backend) CurrentInfo(*snap.Info)
- func (b Backend) LinkSnap(info *snap.Info) error
- func (b Backend) RemoveSnapCommonData(snap *snap.Info) error
- func (b Backend) RemoveSnapData(snap *snap.Info) error
- func (b Backend) RemoveSnapFiles(s snap.PlaceInfo, typ snap.Type, meter progress.Meter) error
- func (b Backend) SetupSnap(snapFilePath string, sideInfo *snap.SideInfo, meter progress.Meter) error
- func (b Backend) UndoCopySnapData(newInfo *snap.Info, oldInfo *snap.Info, meter progress.Meter) error
- func (b Backend) UndoSetupSnap(s snap.PlaceInfo, typ snap.Type, meter progress.Meter) error
- func (b Backend) UnlinkSnap(info *snap.Info, meter progress.Meter) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OpenSnapFile ¶
OpenSnapFile opens a snap blob returning both a snap.Info completed with sideInfo (if not nil) and a corresponding snap.Container. Assumes the file was verified beforehand or the user asked for devmode.
Types ¶
type Backend ¶
type Backend struct{}
Backend exposes all the low-level primitives to manage snaps and their installation on disk.
func (Backend) CopySnapData ¶
CopySnapData makes a copy of oldSnap data for newSnap in its data directories.
func (Backend) LinkSnap ¶
LinkSnap makes the snap available by generating wrappers and setting the current symlinks.
func (Backend) RemoveSnapCommonData ¶
RemoveSnapCommonData removes the data common between versions of the given snap.
func (Backend) RemoveSnapData ¶
RemoveSnapData removes the data for the given version of the given snap.
func (Backend) RemoveSnapFiles ¶
RemoveSnapFiles removes the snap files from the disk after unmounting the snap.
func (Backend) SetupSnap ¶
func (b Backend) SetupSnap(snapFilePath string, sideInfo *snap.SideInfo, meter progress.Meter) error
SetupSnap does prepare and mount the snap for further processing.
func (Backend) UndoCopySnapData ¶
func (b Backend) UndoCopySnapData(newInfo *snap.Info, oldInfo *snap.Info, meter progress.Meter) error
UndoCopySnapData removes the copy that may have been done for newInfo snap of oldInfo snap data and also the data directories that may have been created for newInfo snap.
func (Backend) UndoSetupSnap ¶
UndoSetupSnap undoes the work of SetupSnap using RemoveSnapFiles.