Documentation
¶
Index ¶
- func NewREST(registry Registry) apiserver.RESTStorage
- type REST
- func (r *REST) Delete(ctx kapi.Context, id string) (runtime.Object, error)
- func (r *REST) Get(ctx kapi.Context, id string) (runtime.Object, error)
- func (r *REST) List(ctx kapi.Context, selector, fields klabels.Selector) (runtime.Object, error)
- func (r *REST) New() runtime.Object
- func (r *REST) NewList() runtime.Object
- func (r *REST) Watch(ctx kapi.Context, label, field klabels.Selector, resourceVersion string) (watch.Interface, error)
- type Registry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewREST ¶
func NewREST(registry Registry) apiserver.RESTStorage
NewREST creates a new REST for policies.
Types ¶
type REST ¶
type REST struct {
// contains filtered or unexported fields
}
REST implements the RESTStorage interface in terms of an Registry.
type Registry ¶
type Registry interface {
// ListPolicies obtains list of policies that match a selector.
ListPolicies(ctx kapi.Context, labels, fields klabels.Selector) (*authorizationapi.PolicyList, error)
// GetPolicy retrieves a specific policy.
GetPolicy(ctx kapi.Context, id string) (*authorizationapi.Policy, error)
// CreatePolicy creates a new policy.
CreatePolicy(ctx kapi.Context, policy *authorizationapi.Policy) error
// UpdatePolicy updates a policy.
UpdatePolicy(ctx kapi.Context, policy *authorizationapi.Policy) error
// DeletePolicy deletes a policy.
DeletePolicy(ctx kapi.Context, id string) error
// WatchPolicyBindings watches policyBindings.
WatchPolicies(ctx kapi.Context, label, field klabels.Selector, resourceVersion string) (watch.Interface, error)
}
Registry is an interface for things that know how to store Policies.
Click to show internal directories.
Click to hide internal directories.