Versions in this module Expand all Collapse all v0 v0.1.0 Nov 12, 2022 v0.0.1 Nov 10, 2022 Changes in this version + const DevKey + const DevKeyID + const DevKeyPGPFingerprint + func AddMany(db accuDB, assertions ...asserts.Assertion) + func FakeAssertion(headerLayers ...map[string]interface{}) asserts.Assertion + func FakeAssertionWithBody(body []byte, headerLayers ...map[string]interface{}) asserts.Assertion + func GPGImportKey(homedir, armoredKey string) + func GenerateKey(bits int) (asserts.PrivateKey, *rsa.PrivateKey) + func MockBuiltinBaseDeclaration(headers []byte) (restore func()) + func NewAccount(db SignerDB, username string, otherHeaders map[string]interface{}, ...) *asserts.Account + func NewAccountKey(db SignerDB, acct *asserts.Account, otherHeaders map[string]interface{}, ...) *asserts.AccountKey + func ReadPrivKey(pk string) (asserts.PrivateKey, *rsa.PrivateKey) + type SignerDB interface + Sign func(assertType *asserts.AssertionType, headers map[string]interface{}, body []byte, ...) (asserts.Assertion, error) + type SigningAccounts struct + func NewSigningAccounts(store *StoreStack) *SigningAccounts + func (sa *SigningAccounts) Account(accountID string) *asserts.Account + func (sa *SigningAccounts) AccountKey(accountID string) *asserts.AccountKey + func (sa *SigningAccounts) AccountsAndKeys(accountIDs ...string) []asserts.Assertion + func (sa *SigningAccounts) Model(accountID, model string, extras ...map[string]interface{}) *asserts.Model + func (sa *SigningAccounts) PublicKey(accountID string) asserts.PublicKey + func (sa *SigningAccounts) Register(accountID string, brandPrivKey asserts.PrivateKey, ...) *SigningDB + func (sa *SigningAccounts) Signing(accountID string) *SigningDB + type SigningDB struct + AuthorityID string + KeyID string + func NewSigningDB(authorityID string, privKey asserts.PrivateKey) *SigningDB + func (db *SigningDB) PublicKey(keyID string) (asserts.PublicKey, error) + func (db *SigningDB) Sign(assertType *asserts.AssertionType, headers map[string]interface{}, body []byte, ...) (asserts.Assertion, error) + type StoreKeys struct + Generic asserts.PrivateKey + GenericModels asserts.PrivateKey + Root asserts.PrivateKey + Store asserts.PrivateKey + type StoreStack struct + Generic []asserts.Assertion + GenericAccount *asserts.Account + GenericClassicModel *asserts.Model + GenericKey *asserts.AccountKey + GenericModelsKey *asserts.AccountKey + RootSigning *SigningDB + Trusted []asserts.Assertion + TrustedAccount *asserts.Account + TrustedKey *asserts.AccountKey + func NewStoreStack(authorityID string, keys *StoreKeys) *StoreStack + func (ss *StoreStack) StoreAccountKey(keyID string) *asserts.AccountKey