fakedatastore

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2020 License: Apache-2.0 Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBundleAlreadyExists       = status.Error(codes.AlreadyExists, "bundle already exists")
	ErrAttestedNodeAlreadyExists = status.Error(codes.AlreadyExists, "attested node entry already exists")
	ErrTokenAlreadyExists        = status.Error(codes.AlreadyExists, "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) SetError added in v0.10.1

func (s *DataStore) SetError(err error)

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