fakedatastore

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2021 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBundleAlreadyExists       = errors.New("bundle already exists")
	ErrAttestedNodeAlreadyExists = errors.New("attested node entry already exists")
	ErrTokenAlreadyExists        = errors.New("token already exists")

	ErrNoSuchBundle            = status.Error(codes.NotFound, "no such bundle")
	ErrNoSuchAttestedNode      = status.Error(codes.NotFound, "no such attested node entry")
	ErrNoSuchRegistrationEntry = status.Error(codes.NotFound, "no such registration entry")
	ErrNoSuchToken             = status.Error(codes.NotFound, "no such token")
)

Functions

This section is empty.

Types

type DataStore

type DataStore struct {
	// contains filtered or unexported fields
}

func New

func New() *DataStore

func (*DataStore) AppendBundle

AppendBundle updates an existing bundle with the given CAs. Overwrites any existing certificates.

func (*DataStore) Configure

func (*DataStore) CreateBundle

CreateBundle stores the given bundle

func (*DataStore) CreateJoinToken

CreateJoinToken takes a Token message and stores it

func (*DataStore) DeleteBundle

DeleteBundle deletes the bundle with the matching TrustDomainId. Any CACert data passed is ignored.

func (*DataStore) FetchBundle

FetchBundle returns the bundle matching the specified Trust Domain.

func (*DataStore) FetchJoinToken

FetchToken takes a Token message and returns one, populating the fields we have knowledge of

func (*DataStore) ListBundles

ListBundles can be used to fetch all existing bundles.

func (*DataStore) PruneBundle

PruneBundle removes expired certs from a bundle

func (*DataStore) SetBundle

SetBundle sets bundle contents. If no bundle exists for the trust domain, it is created.

func (*DataStore) UpdateBundle

UpdateBundle updates an existing bundle with the given CAs. Overwrites any existing certificates.

Jump to

Keyboard shortcuts

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