fakedatastore

package
v1.9.4 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataStore

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

func New

func New(tb testing.TB) *DataStore

func (*DataStore) AppendBundle

func (s *DataStore) AppendBundle(ctx context.Context, bundle *common.Bundle) (*common.Bundle, error)

func (*DataStore) AppendNextError added in v0.11.0

func (s *DataStore) AppendNextError(err error)

func (*DataStore) CountAttestedNodes added in v0.12.0

func (s *DataStore) CountAttestedNodes(ctx context.Context) (int32, error)

func (*DataStore) CountBundles added in v0.12.0

func (s *DataStore) CountBundles(ctx context.Context) (int32, error)

func (*DataStore) CountRegistrationEntries added in v0.12.0

func (s *DataStore) CountRegistrationEntries(ctx context.Context) (int32, error)

func (*DataStore) CreateAttestedNode

func (s *DataStore) CreateAttestedNode(ctx context.Context, node *common.AttestedNode) (*common.AttestedNode, error)

func (*DataStore) CreateBundle

func (s *DataStore) CreateBundle(ctx context.Context, bundle *common.Bundle) (*common.Bundle, error)

func (*DataStore) CreateFederationRelationship added in v1.1.0

func (s *DataStore) CreateFederationRelationship(c context.Context, fr *datastore.FederationRelationship) (*datastore.FederationRelationship, error)

func (*DataStore) CreateJoinToken

func (s *DataStore) CreateJoinToken(ctx context.Context, token *datastore.JoinToken) error

func (*DataStore) CreateOrReturnRegistrationEntry added in v1.1.0

func (s *DataStore) CreateOrReturnRegistrationEntry(ctx context.Context, entry *common.RegistrationEntry) (*common.RegistrationEntry, bool, error)

func (*DataStore) CreateRegistrationEntry

func (s *DataStore) CreateRegistrationEntry(ctx context.Context, entry *common.RegistrationEntry) (*common.RegistrationEntry, error)

func (*DataStore) DeleteAttestedNode

func (s *DataStore) DeleteAttestedNode(ctx context.Context, spiffeID string) (*common.AttestedNode, error)

func (*DataStore) DeleteBundle

func (s *DataStore) DeleteBundle(ctx context.Context, trustDomain string, mode datastore.DeleteMode) error

func (*DataStore) DeleteFederationRelationship added in v1.1.0

func (s *DataStore) DeleteFederationRelationship(c context.Context, trustDomain spiffeid.TrustDomain) error

func (*DataStore) DeleteJoinToken

func (s *DataStore) DeleteJoinToken(ctx context.Context, token string) error

func (*DataStore) DeleteRegistrationEntry

func (s *DataStore) DeleteRegistrationEntry(ctx context.Context, entryID string) (*common.RegistrationEntry, error)

func (*DataStore) FetchAttestedNode

func (s *DataStore) FetchAttestedNode(ctx context.Context, spiffeID string) (*common.AttestedNode, error)

func (*DataStore) FetchBundle

func (s *DataStore) FetchBundle(ctx context.Context, trustDomain string) (*common.Bundle, error)

func (*DataStore) FetchCAJournal added in v1.9.0

func (s *DataStore) FetchCAJournal(ctx context.Context, activeX509AuthorityID string) (*datastore.CAJournal, error)

func (*DataStore) FetchFederationRelationship added in v1.1.0

func (s *DataStore) FetchFederationRelationship(c context.Context, trustDomain spiffeid.TrustDomain) (*datastore.FederationRelationship, error)

func (*DataStore) FetchJoinToken

func (s *DataStore) FetchJoinToken(ctx context.Context, token string) (*datastore.JoinToken, error)

func (*DataStore) FetchRegistrationEntry

func (s *DataStore) FetchRegistrationEntry(ctx context.Context, entryID string) (*common.RegistrationEntry, error)

func (*DataStore) GetLatestAttestedNodeEventID added in v1.8.7

func (s *DataStore) GetLatestAttestedNodeEventID(ctx context.Context) (uint, error)

func (*DataStore) GetLatestRegistrationEntryEventID added in v1.8.7

func (s *DataStore) GetLatestRegistrationEntryEventID(ctx context.Context) (uint, error)

func (*DataStore) GetNodeSelectors

func (s *DataStore) GetNodeSelectors(ctx context.Context, spiffeID string, dataConsistency datastore.DataConsistency) ([]*common.Selector, error)

func (*DataStore) ListAttestedNodesEvents added in v1.8.3

func (*DataStore) ListBundles

func (*DataStore) ListCAJournalsForTesting added in v1.9.0

func (s *DataStore) ListCAJournalsForTesting(ctx context.Context) ([]*datastore.CAJournal, error)

func (*DataStore) ListFederationRelationships added in v1.1.0

func (*DataStore) ListNodeSelectors added in v0.12.0

func (*DataStore) ListRegistrationEntriesEvents added in v1.8.0

func (*DataStore) PruneAttestedNodesEvents added in v1.8.3

func (s *DataStore) PruneAttestedNodesEvents(ctx context.Context, olderThan time.Duration) error

func (*DataStore) PruneBundle

func (s *DataStore) PruneBundle(ctx context.Context, trustDomainID string, expiresBefore time.Time) (bool, error)

func (*DataStore) PruneCAJournals added in v1.9.0

func (s *DataStore) PruneCAJournals(ctx context.Context, allCAsExpireBefore int64) error

func (*DataStore) PruneJoinTokens

func (s *DataStore) PruneJoinTokens(ctx context.Context, expiresBefore time.Time) error

func (*DataStore) PruneRegistrationEntries

func (s *DataStore) PruneRegistrationEntries(ctx context.Context, expiresBefore time.Time) error

func (*DataStore) PruneRegistrationEntriesEvents added in v1.8.0

func (s *DataStore) PruneRegistrationEntriesEvents(ctx context.Context, olderThan time.Duration) error

func (*DataStore) RevokeJWTKey added in v1.6.3

func (s *DataStore) RevokeJWTKey(ctx context.Context, trustDomainID string, authorityID string) (*common.PublicKey, error)

func (*DataStore) RevokeX509CA added in v1.6.3

func (s *DataStore) RevokeX509CA(ctx context.Context, trustDomainID string, publicKeyToRevoke crypto.PublicKey) error

func (*DataStore) SetBundle

func (s *DataStore) SetBundle(ctx context.Context, bundle *common.Bundle) (*common.Bundle, error)

func (*DataStore) SetCAJournal added in v1.9.0

func (s *DataStore) SetCAJournal(ctx context.Context, caJournal *datastore.CAJournal) (*datastore.CAJournal, error)

func (*DataStore) SetNextError added in v0.11.0

func (s *DataStore) SetNextError(err error)

func (*DataStore) SetNodeSelectors

func (s *DataStore) SetNodeSelectors(ctx context.Context, spiffeID string, selectors []*common.Selector) error

func (*DataStore) TaintJWTKey added in v1.6.3

func (s *DataStore) TaintJWTKey(ctx context.Context, trustDomainID string, authorityID string) (*common.PublicKey, error)

func (*DataStore) TaintX509CA added in v1.6.3

func (s *DataStore) TaintX509CA(ctx context.Context, trustDomainID string, publicKeyToTaint crypto.PublicKey) error

func (*DataStore) UpdateAttestedNode

func (s *DataStore) UpdateAttestedNode(ctx context.Context, node *common.AttestedNode, mask *common.AttestedNodeMask) (*common.AttestedNode, error)

func (*DataStore) UpdateBundle

func (s *DataStore) UpdateBundle(ctx context.Context, bundle *common.Bundle, mask *common.BundleMask) (*common.Bundle, error)

func (*DataStore) UpdateFederationRelationship added in v1.1.0

func (*DataStore) UpdateRegistrationEntry

func (s *DataStore) UpdateRegistrationEntry(ctx context.Context, entry *common.RegistrationEntry, mask *common.RegistrationEntryMask) (*common.RegistrationEntry, error)

Jump to

Keyboard shortcuts

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