Documentation ¶
Index ¶
- func NewREST(bindingRegistry policybindingregistry.Registry, ...) apiserver.RESTStorage
- type REST
- func (r *REST) Create(ctx kapi.Context, obj runtime.Object) (<-chan apiserver.RESTResult, error)
- func (r *REST) Delete(ctx kapi.Context, id string) (<-chan apiserver.RESTResult, error)
- func (r *REST) EnsurePolicyBindingToMaster(ctx kapi.Context) (*authorizationapi.PolicyBinding, error)
- func (r *REST) GetPolicyBinding(ctx kapi.Context, policyNamespace string) (*authorizationapi.PolicyBinding, error)
- func (r *REST) GetRoleBinding(ctx kapi.Context, roleBindingName string) (*authorizationapi.RoleBinding, error)
- func (r *REST) LocatePolicyBinding(ctx kapi.Context, roleName string) (*authorizationapi.PolicyBinding, error)
- func (r *REST) New() runtime.Object
- func (r *REST) Update(ctx kapi.Context, obj runtime.Object) (<-chan apiserver.RESTResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewREST ¶
func NewREST(bindingRegistry policybindingregistry.Registry, policyRegistry policyregistry.Registry, userRegistry userregistry.Registry, masterAuthorizationNamespace string) 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.
func (*REST) Create ¶
Create registers a given new RoleBinding inside the Policy instance to r.bindingRegistry.
func (*REST) EnsurePolicyBindingToMaster ¶
func (r *REST) EnsurePolicyBindingToMaster(ctx kapi.Context) (*authorizationapi.PolicyBinding, error)
EnsurePolicyBindingToMaster returns a PolicyBinding object that has a PolicyRef pointing to the Policy in the passed namespace.
func (*REST) GetPolicyBinding ¶
func (r *REST) GetPolicyBinding(ctx kapi.Context, policyNamespace string) (*authorizationapi.PolicyBinding, error)
Returns a PolicyBinding that points to the specified policyNamespace. It will autocreate ONLY if policyNamespace equals the master namespace
func (*REST) GetRoleBinding ¶
func (r *REST) GetRoleBinding(ctx kapi.Context, roleBindingName string) (*authorizationapi.RoleBinding, error)
func (*REST) LocatePolicyBinding ¶
func (r *REST) LocatePolicyBinding(ctx kapi.Context, roleName string) (*authorizationapi.PolicyBinding, error)
Click to show internal directories.
Click to hide internal directories.