package
0.0.0-20250312152250-ea85ec9d2454
Repository: https://github.com/snapcore/snapd.git
Documentation: pkg.go.dev

# Functions

AddMany conveniently adds the given assertions to the db.
FakeAssertion builds a fake assertion with given layered headers and an empty body.
FakeAssertionWithBody builds a fake assertion with the given body and layered headers.
GenerateKey generates a private/public key pair of the given bits.
GPGImportKey imports the given PGP armored key into the GnuPG setup at homedir.
MockBuiltinBaseDeclaration mocks the builtin base-declaration exposed by asserts.BuiltinBaseDeclaration.
NewAccount creates an account assertion for username, it fills in values for other missing headers as needed.
NewAccountKey creates an account-key assertion for the account, it fills in values for missing headers as needed.
NewSigningAccounts creates a new SigningAccounts instance.
NewSigningDB creates a test signing assertion db with the given defaults.
NewStoreStack creates a new store assertion stack.
ReadPrivKey reads a PGP private key (either armored or simply base64 encoded).

# Constants

A sample developer key.
A sample developer key.
A sample developer key.

# Structs

SigningAccounts manages a set of brand or user accounts, with their keys that can sign models etc.
SigningDB embeds a signing assertion database with a default private key and assigned authority id.
StoreKeys holds a set of store private keys.
StoreStack realises a store-like set of founding trusted assertions and signing setup.

# Interfaces

A SignerDB can sign assertions using its key pairs.