Documentation ¶
Index ¶
- Variables
- func ApplyRoleBindingTaints(ctx context.Context, store RBACStore, rb *core.RoleBinding) error
- func NewRBACProvider(store SubjectAccessCapableStore) rbac.Provider
- type Backend
- type ClusterMutator
- type ClusterSelector
- type ClusterStore
- type CompositeBackend
- type KeyValueStore
- type KeyValueStoreBroker
- type KeyringStore
- type KeyringStoreBroker
- type MutatorFunc
- func NewAddCapabilityMutator[O core.MetadataAccessor[T], T core.Capability[T]](capability T) MutatorFunc[O]
- func NewCompositeMutator[T any](mutators ...MutatorFunc[T]) MutatorFunc[T]
- func NewIncrementUsageCountMutator() MutatorFunc[*core.BootstrapToken]
- func NewRemoveCapabilityMutator[O core.MetadataAccessor[T], T core.Capability[T]](capability T) MutatorFunc[O]
- type NotFoundError
- type RBACStore
- type SelectorPredicate
- type SubjectAccessCapableStore
- type TokenCreateOption
- type TokenCreateOptions
- type TokenMutator
- type TokenStore
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotFound = &NotFoundError{}
Functions ¶
func ApplyRoleBindingTaints ¶
func NewRBACProvider ¶
func NewRBACProvider(store SubjectAccessCapableStore) rbac.Provider
Types ¶
type Backend ¶
type Backend interface { TokenStore ClusterStore RBACStore KeyringStoreBroker KeyValueStoreBroker }
type ClusterMutator ¶
type ClusterMutator = MutatorFunc[*core.Cluster]
type ClusterSelector ¶
type ClusterSelector struct { ClusterIDs []string LabelSelector *core.LabelSelector MatchOptions core.MatchOptions }
func (ClusterSelector) Predicate ¶
func (p ClusterSelector) Predicate() SelectorPredicate
type ClusterStore ¶
type ClusterStore interface { CreateCluster(ctx context.Context, cluster *core.Cluster) error DeleteCluster(ctx context.Context, ref *core.Reference) error GetCluster(ctx context.Context, ref *core.Reference) (*core.Cluster, error) UpdateCluster(ctx context.Context, ref *core.Reference, mutator ClusterMutator) (*core.Cluster, error) ListClusters(ctx context.Context, matchLabels *core.LabelSelector, matchOptions core.MatchOptions) (*core.ClusterList, error) }
type CompositeBackend ¶
type CompositeBackend struct { TokenStore ClusterStore RBACStore KeyringStoreBroker KeyValueStoreBroker }
func (*CompositeBackend) IsValid ¶
func (cb *CompositeBackend) IsValid() bool
func (*CompositeBackend) Use ¶
func (cb *CompositeBackend) Use(store any)
type KeyValueStore ¶
type KeyValueStoreBroker ¶
type KeyValueStoreBroker interface {
KeyValueStore(namespace string) (KeyValueStore, error)
}
type KeyringStore ¶
type KeyringStoreBroker ¶
type MutatorFunc ¶
type MutatorFunc[T any] func(T)
func NewAddCapabilityMutator ¶
func NewAddCapabilityMutator[O core.MetadataAccessor[T], T core.Capability[T]](capability T) MutatorFunc[O]
func NewCompositeMutator ¶
func NewCompositeMutator[T any](mutators ...MutatorFunc[T]) MutatorFunc[T]
func NewIncrementUsageCountMutator ¶
func NewIncrementUsageCountMutator() MutatorFunc[*core.BootstrapToken]
func NewRemoveCapabilityMutator ¶
func NewRemoveCapabilityMutator[O core.MetadataAccessor[T], T core.Capability[T]](capability T) MutatorFunc[O]
type NotFoundError ¶
type NotFoundError struct{}
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
func (*NotFoundError) GRPCStatus ¶
func (e *NotFoundError) GRPCStatus() *status.Status
type RBACStore ¶
type RBACStore interface { CreateRole(context.Context, *core.Role) error DeleteRole(context.Context, *core.Reference) error GetRole(context.Context, *core.Reference) (*core.Role, error) CreateRoleBinding(context.Context, *core.RoleBinding) error DeleteRoleBinding(context.Context, *core.Reference) error GetRoleBinding(context.Context, *core.Reference) (*core.RoleBinding, error) ListRoles(context.Context) (*core.RoleList, error) ListRoleBindings(context.Context) (*core.RoleBindingList, error) }
type SelectorPredicate ¶
type SubjectAccessCapableStore ¶
type SubjectAccessCapableStore interface { ListClusters(ctx context.Context, matchLabels *core.LabelSelector, matchOptions core.MatchOptions) (*core.ClusterList, error) GetRole(ctx context.Context, ref *core.Reference) (*core.Role, error) ListRoleBindings(ctx context.Context) (*core.RoleBindingList, error) }
A store that can be used to compute subject access rules
type TokenCreateOption ¶
type TokenCreateOption func(*TokenCreateOptions)
func WithCapabilities ¶
func WithCapabilities(capabilities []*core.TokenCapability) TokenCreateOption
func WithLabels ¶
func WithLabels(labels map[string]string) TokenCreateOption
type TokenCreateOptions ¶
type TokenCreateOptions struct { Labels map[string]string Capabilities []*core.TokenCapability }
func NewTokenCreateOptions ¶
func NewTokenCreateOptions() TokenCreateOptions
func (*TokenCreateOptions) Apply ¶
func (o *TokenCreateOptions) Apply(opts ...TokenCreateOption)
type TokenMutator ¶
type TokenMutator = MutatorFunc[*core.BootstrapToken]
type TokenStore ¶
type TokenStore interface { CreateToken(ctx context.Context, ttl time.Duration, opts ...TokenCreateOption) (*core.BootstrapToken, error) DeleteToken(ctx context.Context, ref *core.Reference) error GetToken(ctx context.Context, ref *core.Reference) (*core.BootstrapToken, error) UpdateToken(ctx context.Context, ref *core.Reference, mutator TokenMutator) (*core.BootstrapToken, error) ListTokens(ctx context.Context) ([]*core.BootstrapToken, error) }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.