role

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2015 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEmptyPolicy

func NewEmptyPolicy(namespace string) *authorizationapi.Policy

func NewREST

func NewREST(registry policyregistry.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.

func (*REST) Create

func (r *REST) Create(ctx kapi.Context, obj runtime.Object) (runtime.Object, error)

Create registers a given new Role inside the Policy instance to r.registry.

func (*REST) Delete

func (r *REST) Delete(ctx kapi.Context, id string) (runtime.Object, error)

Delete asynchronously deletes the Policy specified by its id.

func (*REST) EnsurePolicy

func (r *REST) EnsurePolicy(ctx kapi.Context) (*authorizationapi.Policy, error)

EnsurePolicy returns the policy object for the specified namespace. If one does not exist, it is created for you. Permission to create, update, or delete roles in a namespace implies the ability to create a Policy object itself.

func (*REST) New

func (r *REST) New() runtime.Object

New creates a new Role object

func (*REST) Update

func (r *REST) Update(ctx kapi.Context, obj runtime.Object) (runtime.Object, bool, error)

Update replaces a given Role inside the Policy instance with an existing instance in r.registry.

Jump to

Keyboard shortcuts

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