policy

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2015 License: Apache-2.0 Imports: 6 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) Delete

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

Delete asynchronously deletes the Policy specified by its id.

func (*REST) Get

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

Get obtains the policy specified by its id.

func (*REST) List

func (r *REST) List(ctx kapi.Context, selector, fields klabels.Selector) (runtime.Object, error)

List obtains a list of Policies that match selector.

func (*REST) New

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

New creates a new Policy object

func (*REST) NewList

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

func (*REST) Watch added in v0.3.1

func (r *REST) Watch(ctx kapi.Context, label, field klabels.Selector, resourceVersion string) (watch.Interface, error)

Watch begins watching for new, changed, or deleted PolicyBindings.

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.

Jump to

Keyboard shortcuts

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