rolebinding

package
v0.3.2 Latest Latest
Warning

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

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

Documentation

Index

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.

func (*REST) Create

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

Create registers a given new RoleBinding inside the PolicyBinding instance to r.bindingRegistry.

func (*REST) Delete

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

Delete asynchronously deletes the PolicyBinding specified by its name.

func (*REST) New

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

New creates a new RoleBinding object

func (*REST) Update

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

Update replaces a given RoleBinding inside the PolicyBinding instance with an existing instance in r.bindingRegistry.

type Registry added in v0.3.2

type Registry interface {
	// ListRoleBindings obtains list of policyRoleBindings that match a selector.
	ListRoleBindings(ctx kapi.Context, labels, fields klabels.Selector) (*authorizationapi.RoleBindingList, error)
	// GetRoleBinding retrieves a specific policyRoleBinding.
	GetRoleBinding(ctx kapi.Context, id string) (*authorizationapi.RoleBinding, error)
	// CreateRoleBinding creates a new policyRoleBinding.
	CreateRoleBinding(ctx kapi.Context, policyRoleBinding *authorizationapi.RoleBinding) error
	// UpdateRoleBinding updates a policyRoleBinding.
	UpdateRoleBinding(ctx kapi.Context, policyRoleBinding *authorizationapi.RoleBinding) error
	// DeleteRoleBinding deletes a policyRoleBinding.
	DeleteRoleBinding(ctx kapi.Context, id string) error
}

Registry is an interface for things that know how to store RoleBindings.

func NewVirtualRegistry added in v0.3.2

func NewVirtualRegistry(bindingRegistry policybindingregistry.Registry, policyRegistry policyregistry.Registry, masterAuthorizationNamespace string) Registry

NewVirtualRegistry creates a new REST for policies.

type VirtualRegistry added in v0.3.2

type VirtualRegistry struct {
	// contains filtered or unexported fields
}

func (*VirtualRegistry) CreateRoleBinding added in v0.3.2

func (m *VirtualRegistry) CreateRoleBinding(ctx kapi.Context, roleBinding *authorizationapi.RoleBinding) error

func (*VirtualRegistry) DeleteRoleBinding added in v0.3.2

func (m *VirtualRegistry) DeleteRoleBinding(ctx kapi.Context, name string) error

func (*VirtualRegistry) GetRoleBinding added in v0.3.2

func (m *VirtualRegistry) GetRoleBinding(ctx kapi.Context, name string) (*authorizationapi.RoleBinding, error)

func (*VirtualRegistry) ListRoleBindings added in v0.3.2

func (m *VirtualRegistry) ListRoleBindings(ctx kapi.Context, labels, fields klabels.Selector) (*authorizationapi.RoleBindingList, error)

func (*VirtualRegistry) UpdateRoleBinding added in v0.3.2

func (m *VirtualRegistry) UpdateRoleBinding(ctx kapi.Context, roleBinding *authorizationapi.RoleBinding) error

Jump to

Keyboard shortcuts

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