storage

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2021 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 8 more Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateExportObjectAndTenantID

func ValidateExportObjectAndTenantID(ctx context.Context, store *registry.Store, name string, options metav1.ExportOptions) (runtime.Object, error)

ValidateExportObjectAndTenantID validate name and tenantID, if success return Role

func ValidateGetObjectAndTenantID

func ValidateGetObjectAndTenantID(ctx context.Context, store *registry.Store, name string, options *metav1.GetOptions) (runtime.Object, error)

ValidateGetObjectAndTenantID validate name and tenantID, if success return Role

Types

type BindingREST

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

BindingREST implements the REST endpoint.

func (*BindingREST) Create

func (r *BindingREST) Create(ctx context.Context, obj runtime.Object, createValidation rest.ValidateObjectFunc, options *metav1.CreateOptions) (runtime.Object, error)

func (*BindingREST) New

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

New returns an empty object that can be used with Create after request data has been put into it.

type FinalizeREST

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

FinalizeREST implements the REST endpoint for finalizing a role.

func (*FinalizeREST) Export

func (r *FinalizeREST) Export(ctx context.Context, name string, options metav1.ExportOptions) (runtime.Object, error)

Export an object. Fields that are not user specified are stripped out Returns the stripped object.

func (*FinalizeREST) Get

func (r *FinalizeREST) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error)

Get retrieves the object from the storage. It is required to support Patch.

func (*FinalizeREST) New

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

New returns an empty object that can be used with Create and Update after request data has been put into it.

func (*FinalizeREST) Update

func (r *FinalizeREST) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo, createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdateFunc, forceAllowCreate bool, options *metav1.UpdateOptions) (runtime.Object, bool, error)

Update alters the status finalizers subset of an object.

type GroupREST

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

GroupREST implements the REST endpoint.

func (*GroupREST) ConvertToTable added in v1.3.1

func (r *GroupREST) ConvertToTable(ctx context.Context, object runtime.Object, tableOptions runtime.Object) (*metav1.Table, error)

ConvertToTable converts objects to metav1.Table objects using default table convertor.

func (*GroupREST) List

List selects resources in the storage which match to the selector. 'options' can be nil.

func (*GroupREST) New

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

New returns an empty object that can be used with Create after request data has been put into it.

func (*GroupREST) NewList

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

NewList returns an empty object that can be used with the List call.

type PolicyBindingREST

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

PolicyBindingREST implements the REST endpoint.

func (*PolicyBindingREST) Create

func (r *PolicyBindingREST) Create(ctx context.Context, obj runtime.Object, createValidation rest.ValidateObjectFunc, options *metav1.CreateOptions) (runtime.Object, error)

func (*PolicyBindingREST) New

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

New returns an empty object that can be used with Create after request data has been put into it.

type PolicyREST

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

PolicyREST implements the REST endpoint, list policies bound to the user.

func (*PolicyREST) ConvertToTable added in v1.3.1

func (r *PolicyREST) ConvertToTable(ctx context.Context, object runtime.Object, tableOptions runtime.Object) (*metav1.Table, error)

ConvertToTable converts objects to metav1.Table objects using default table convertor.

func (*PolicyREST) List

func (*PolicyREST) New

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

New returns an empty object that can be used with Create after request data has been put into it.

func (*PolicyREST) NewList

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

NewList returns an empty object that can be used with the List call.

type PolicyUnbindingREST

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

PolicyUnbindingREST implements the REST endpoint.

func (*PolicyUnbindingREST) Create

func (r *PolicyUnbindingREST) Create(ctx context.Context, obj runtime.Object, createValidation rest.ValidateObjectFunc, options *metav1.CreateOptions) (runtime.Object, error)

func (*PolicyUnbindingREST) New

New returns an empty object that can be used with Create after request data has been put into it.

type REST

type REST struct {
	*registry.Store
	// contains filtered or unexported fields
}

REST implements a RESTStorage for clusters against etcd.

func (*REST) Delete

func (r *REST) Delete(ctx context.Context, name string, deleteValidation rest.ValidateObjectFunc, options *metav1.DeleteOptions) (runtime.Object, bool, error)

Delete enforces life-cycle rules for role termination

func (*REST) DeleteCollection

func (r *REST) DeleteCollection(ctx context.Context, deleteValidation rest.ValidateObjectFunc, options *metav1.DeleteOptions, listOptions *metainternal.ListOptions) (runtime.Object, error)

DeleteCollection selects all resources in the storage matching given 'listOptions' and deletes them.

func (*REST) Export

func (r *REST) Export(ctx context.Context, name string, options metav1.ExportOptions) (runtime.Object, error)

Export an object. Fields that are not user specified are stripped out Returns the stripped object.

func (*REST) Get

func (r *REST) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error)

Get finds a resource in the storage by name and returns it.

func (*REST) List

func (r *REST) List(ctx context.Context, options *metainternal.ListOptions) (runtime.Object, error)

List selects resources in the storage which match to the selector. 'options' can be nil.

func (*REST) ShortNames

func (r *REST) ShortNames() []string

ShortNames implements the ShortNamesProvider interface. Returns a list of short names for a resource.

func (*REST) Update

func (r *REST) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo, createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdateFunc, forceAllowCreate bool, options *metav1.UpdateOptions) (runtime.Object, bool, error)

Update alters the object subset of an object.

type StatusREST

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

StatusREST implements the REST endpoint for changing the status of a replication controller.

func (*StatusREST) Export

func (r *StatusREST) Export(ctx context.Context, name string, options metav1.ExportOptions) (runtime.Object, error)

Export an object. Fields that are not user specified are stripped out Returns the stripped object.

func (*StatusREST) Get

func (r *StatusREST) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error)

Get retrieves the object from the storage. It is required to support Patch.

func (*StatusREST) New

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

New returns an empty object that can be used with Create and Update after request data has been put into it.

func (*StatusREST) Update

func (r *StatusREST) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo, createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdateFunc, forceAllowCreate bool, options *metav1.UpdateOptions) (runtime.Object, bool, error)

Update alters the status subset of an object.

type Storage

type Storage struct {
	Role *REST

	Status          *StatusREST
	Finalize        *FinalizeREST
	Binding         *BindingREST
	Unbinding       *UnbindingREST
	PolicyBinding   *PolicyBindingREST
	PolicyUnbinding *PolicyUnbindingREST
	User            *UserREST
	Group           *GroupREST
	Policy          *PolicyREST
}

Storage includes storage for roles and all sub resources.

func NewStorage

func NewStorage(optsGetter generic.RESTOptionsGetter, authClient authinternalclient.AuthInterface, enforcer *casbin.SyncedEnforcer, privilegedUsername string) *Storage

NewStorage returns a Storage object that will work against roles.

type UnbindingREST

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

UnbindingREST implements the REST endpoint.

func (*UnbindingREST) Create

func (r *UnbindingREST) Create(ctx context.Context, obj runtime.Object, createValidation rest.ValidateObjectFunc, options *metav1.CreateOptions) (runtime.Object, error)

func (*UnbindingREST) New

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

New returns an empty object that can be used with Create after request data has been put into it.

type UserREST

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

UserREST implements the REST endpoint.

func (*UserREST) ConvertToTable added in v1.3.1

func (r *UserREST) ConvertToTable(ctx context.Context, object runtime.Object, tableOptions runtime.Object) (*metav1.Table, error)

ConvertToTable converts objects to metav1.Table objects using default table convertor.

func (*UserREST) List

func (r *UserREST) List(ctx context.Context, options *metainternal.ListOptions) (runtime.Object, error)

List selects resources in the storage which match to the selector. 'options' can be nil.

func (*UserREST) New

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

New returns an empty object that can be used with Create after request data has been put into it.

func (*UserREST) NewList

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

NewList returns an empty object that can be used with the List call.

Jump to

Keyboard shortcuts

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