sysdb

package
v0.0.0-...-c7fba9c Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package sysdb supports the system-wide assertion database with ways to open it and to manage the trusted set of assertions founding it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generic

func Generic() []asserts.Assertion

Generic returns a copy of the current set of predefined assertions for the 'generic' authority as used by Open.

func GenericClassicModel

func GenericClassicModel() *asserts.Model

GenericClassicModel returns the model assertion for the "generic"'s "generic-classic" fallback model.

func InjectGeneric

func InjectGeneric(extra []asserts.Assertion) (restore func())

InjectGeneric injects further predefined assertions into the set used Open. Returns a restore function to reinstate the previous set. Useful for tests or called globally without worrying about restoring.

func InjectTrusted

func InjectTrusted(extra []asserts.Assertion) (restore func())

InjectTrusted injects further assertions into the trusted set for Open. Returns a restore function to reinstate the previous set. Useful for tests or called globally without worrying about restoring.

func MockGenericClassicModel

func MockGenericClassicModel(mod *asserts.Model) (restore func())

MockGenericClassicModel mocks the predefined generic-classic model returned by GenericClassicModel.

func Open

func Open() (*asserts.Database, error)

Open opens the system-wide assertion database with the trusted assertions set configured.

func OpenAt

func OpenAt(path string) (*asserts.Database, error)

OpenAt opens a system assertion database at the given location with the trusted assertions set configured.

func Trusted

func Trusted() []asserts.Assertion

Trusted returns a copy of the current set of trusted assertions as used by Open.

Types

This section is empty.

Jump to

Keyboard shortcuts

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