snapasserts

package
v0.0.0-...-677ed08 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2016 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package snapasserts offers helpers to handle snap assertions and their checking for installation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CrossCheck

func CrossCheck(name, snapSHA3_384 string, snapSize uint64, si *snap.SideInfo, db asserts.RODatabase) error

CrossCheck tries to cross check the name, hash digest and size of a snap plus its metadata in a SideInfo with the relevant snap assertions in a database that should have been populated with them.

func DeriveSideInfo

func DeriveSideInfo(snapPath string, db asserts.RODatabase) (*snap.SideInfo, error)

DeriveSideInfo tries to construct a SideInfo for the given snap using its digest to find the relevant snap assertions with the information in the given database. It will fail with asserts.ErrNotFound if it cannot find them.

func FetchSnapAssertions

func FetchSnapAssertions(f asserts.Fetcher, snapSHA3_384 string) error

FetchSnapAssertions fetches the assertions matching the snap file digest using the given fetcher.

func FetchSnapDeclaration

func FetchSnapDeclaration(f asserts.Fetcher, snapID string) error

FetchSnapDeclaration fetches the snap declaration and its prerequisites for the given snap id using the given fetcher.

Types

This section is empty.

Jump to

Keyboard shortcuts

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