Documentation ¶
Index ¶
- type ByFederatesWith
- type BySelectors
- type DataConsistency
- type DataStore
- type DeleteMode
- type Health
- type HealthDetails
- type JoinToken
- type ListAttestedNodesRequest
- type ListAttestedNodesResponse
- type ListBundlesRequest
- type ListBundlesResponse
- type ListNodeSelectorsRequest
- type ListNodeSelectorsResponse
- type ListRegistrationEntriesRequest
- type ListRegistrationEntriesResponse
- type MatchBehavior
- type Pagination
- type Repository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ByFederatesWith ¶
type ByFederatesWith struct { TrustDomains []string Match MatchBehavior }
type BySelectors ¶
type BySelectors struct { Selectors []*common.Selector Match MatchBehavior }
type DataConsistency ¶
type DataConsistency int32
DataConsistency indicates the required data consistency for a read operation.
const ( // Require data from a primary database instance (default) RequireCurrent DataConsistency = iota // Allow access from available secondary database instances // Data staleness may be observed in the responses TolerateStale )
type DataStore ¶
type DataStore interface { // Bundles AppendBundle(context.Context, *common.Bundle) (*common.Bundle, error) CountBundles(context.Context) (int32, error) CreateBundle(context.Context, *common.Bundle) (*common.Bundle, error) DeleteBundle(ctx context.Context, trustDomainID string, mode DeleteMode) error FetchBundle(ctx context.Context, trustDomainID string) (*common.Bundle, error) ListBundles(context.Context, *ListBundlesRequest) (*ListBundlesResponse, error) PruneBundle(ctx context.Context, trustDomainID string, expiresBefore time.Time) (changed bool, err error) SetBundle(context.Context, *common.Bundle) (*common.Bundle, error) UpdateBundle(context.Context, *common.Bundle, *common.BundleMask) (*common.Bundle, error) // Entries CountRegistrationEntries(context.Context) (int32, error) CreateRegistrationEntry(context.Context, *common.RegistrationEntry) (*common.RegistrationEntry, error) DeleteRegistrationEntry(ctx context.Context, entryID string) (*common.RegistrationEntry, error) FetchRegistrationEntry(ctx context.Context, entryID string) (*common.RegistrationEntry, error) ListRegistrationEntries(context.Context, *ListRegistrationEntriesRequest) (*ListRegistrationEntriesResponse, error) PruneRegistrationEntries(ctx context.Context, expiresBefore time.Time) error UpdateRegistrationEntry(context.Context, *common.RegistrationEntry, *common.RegistrationEntryMask) (*common.RegistrationEntry, error) // Nodes CountAttestedNodes(context.Context) (int32, error) CreateAttestedNode(context.Context, *common.AttestedNode) (*common.AttestedNode, error) DeleteAttestedNode(ctx context.Context, spiffeID string) (*common.AttestedNode, error) FetchAttestedNode(ctx context.Context, spiffeID string) (*common.AttestedNode, error) ListAttestedNodes(context.Context, *ListAttestedNodesRequest) (*ListAttestedNodesResponse, error) UpdateAttestedNode(context.Context, *common.AttestedNode, *common.AttestedNodeMask) (*common.AttestedNode, error) // Node selectors GetNodeSelectors(ctx context.Context, spiffeID string, dataConsistency DataConsistency) ([]*common.Selector, error) ListNodeSelectors(context.Context, *ListNodeSelectorsRequest) (*ListNodeSelectorsResponse, error) SetNodeSelectors(ctx context.Context, spiffeID string, selectors []*common.Selector) error // Tokens CreateJoinToken(context.Context, *JoinToken) error DeleteJoinToken(ctx context.Context, token string) error FetchJoinToken(ctx context.Context, token string) (*JoinToken, error) PruneJoinTokens(context.Context, time.Time) error }
DataStore defines the data storage interface.
type DeleteMode ¶
type DeleteMode int32
DeleteMode defines delete behavior if associated records exist.
const ( // Restrict the bundle from being deleted in the presence of associated entries Restrict DeleteMode = iota // Delete the bundle and associated entries Delete // Dissociate deletes the bundle and dissociates associated entries Dissociate )
func (DeleteMode) String ¶
func (mode DeleteMode) String() string
type HealthDetails ¶
type HealthDetails struct {
ListBundleErr string `json:"list_bundle_err,omitempty"`
}
type ListAttestedNodesRequest ¶
type ListAttestedNodesRequest struct { ByAttestationType string ByBanned *bool ByExpiresBefore time.Time BySelectorMatch *BySelectors FetchSelectors bool Pagination *Pagination }
type ListAttestedNodesResponse ¶
type ListAttestedNodesResponse struct { Nodes []*common.AttestedNode Pagination *Pagination }
type ListBundlesRequest ¶
type ListBundlesRequest struct {
Pagination *Pagination
}
type ListBundlesResponse ¶
type ListBundlesResponse struct { Bundles []*common.Bundle Pagination *Pagination }
type ListNodeSelectorsRequest ¶
type ListNodeSelectorsRequest struct { DataConsistency DataConsistency ValidAt time.Time }
type ListRegistrationEntriesRequest ¶
type ListRegistrationEntriesRequest struct { DataConsistency DataConsistency ByParentID string BySelectors *BySelectors BySpiffeID string Pagination *Pagination ByFederatesWith *ByFederatesWith }
type ListRegistrationEntriesResponse ¶
type ListRegistrationEntriesResponse struct { Entries []*common.RegistrationEntry Pagination *Pagination }
type MatchBehavior ¶
type MatchBehavior int32
const ( Exact MatchBehavior = 0 Subset MatchBehavior = 1 Superset MatchBehavior = 2 MatchAny MatchBehavior = 3 )
type Pagination ¶
type Repository ¶
type Repository struct {
DataStore DataStore
}
func (*Repository) GetDataStore ¶
func (repo *Repository) GetDataStore() DataStore
func (*Repository) SetDataStore ¶
func (repo *Repository) SetDataStore(dataStore DataStore)
Click to show internal directories.
Click to hide internal directories.