rolebinding

package
v0.4.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type REST

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

REST implements the RESTStorage interface in terms of an Registry.

func NewREST

func NewREST(registry Registry) *REST

NewREST creates a new REST for policies.

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) Get added in v0.4.2

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

Get obtains the rolebinding specified by its id.

func (*REST) List added in v0.4.2

func (r *REST) List(ctx kapi.Context, label labels.Selector, field fields.Selector) (runtime.Object, error)

List obtains a list of rolebindings that match label.

func (*REST) New

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

New creates a new RoleBinding object

func (*REST) NewList added in v0.4.2

func (*REST) NewList() runtime.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, label labels.Selector, field fields.Selector) (*authorizationapi.RoleBindingList, error)
	// GetRoleBinding retrieves a specific policyRoleBinding.
	GetRoleBinding(ctx kapi.Context, id string) (*authorizationapi.RoleBinding, error)
	// CreateRoleBinding creates a new policyRoleBinding.  Skipping the escalation check should only be done during bootstrapping procedures where no users are currently bound.
	CreateRoleBinding(ctx kapi.Context, policyRoleBinding *authorizationapi.RoleBinding, allowEscalation bool) error
	// UpdateRoleBinding updates a policyRoleBinding.  Skipping the escalation check should only be done during bootstrapping procedures where no users are currently bound.
	UpdateRoleBinding(ctx kapi.Context, policyRoleBinding *authorizationapi.RoleBinding, allowEscalation bool) 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, allowEscalation bool) 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, label labels.Selector, field fields.Selector) (*authorizationapi.RoleBindingList, error)

TODO either add selector for fields ot eliminate the option

func (*VirtualRegistry) UpdateRoleBinding added in v0.3.2

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

Jump to

Keyboard shortcuts

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