storage

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: May 30, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 8 more Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 MessageRequest

Types

type REST

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

REST implements a RESTStorage for messages against etcd.

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) Get

func (r *REST) Get(ctx context.Context, messageName 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.

type StatusREST

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

StatusREST implements the REST endpoint for changing the status of a message request.

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 {
	MessageRequest *REST
	Status         *StatusREST
}

Storage includes storage for messages and all sub resources.

func NewStorage

func NewStorage(optsGetter genericregistry.RESTOptionsGetter, notifyClient *notifyinternalclient.NotifyClient, privilegedUsername string, messageTTL time.Duration) *Storage

NewStorage returns a Storage object that will work against messages.

Jump to

Keyboard shortcuts

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