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: 40 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddHandlers added in v1.9.1

func AddHandlers(h printers.PrintHandler)

AddHandlers adds print handlers for default TKE types dealing with internal versions. Refer kubernetes/pkg/printers/internalversion/printers.go:78

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 Message

Types

type FinalizeREST

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

FinalizeREST implements the REST endpoint for finalizing a chartgroup.

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 GenericREST

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

GenericREST implements a RESTStorage for application against etcd.

func (*GenericREST) Delete

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

Delete enforces life-cycle rules for cluster termination

func (*GenericREST) Get

func (r *GenericREST) 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 (*GenericREST) List

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

func (*GenericREST) ShortNames

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

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

func (*GenericREST) Update

func (r *GenericREST) 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 finds a resource in the storage and updates it.

type HistoryREST

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

HistoryREST adapts a service registry into apiserver's RESTStorage model.

func NewHistoryREST

func NewHistoryREST(
	application ApplicationStorage,
	applicationClient *applicationinternalclient.ApplicationClient,
	platformClient platformversionedclient.PlatformV1Interface,
) *HistoryREST

NewHistoryREST returns a wrapper around the underlying generic storage and performs allocations and deallocations of various helm releases related histories. TODO: all transactional behavior should be supported from within generic storage

or the strategy.

func (*HistoryREST) Get

func (rs *HistoryREST) 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 (*HistoryREST) New

func (rs *HistoryREST) New() runtime.Object

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

type REST

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

REST adapts a service registry into apiserver's RESTStorage model.

func NewREST

NewREST returns a wrapper around the underlying generic storage and performs allocations and deallocations of various helm releases related resources like ports. TODO: all transactional behavior should be supported from within generic storage

or the strategy.

func (*REST) ConvertToTable

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

func (*REST) Create

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

func (*REST) Delete

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

func (*REST) Get

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

func (*REST) List

func (*REST) NamespaceScoped

func (rs *REST) NamespaceScoped() bool

func (*REST) New

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

func (*REST) NewList

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

func (*REST) ShortNames

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

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

func (*REST) StorageVersion

func (rs *REST) StorageVersion() runtime.GroupVersioner

func (*REST) Update

func (rs *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)

func (*REST) Watch

type ResourceREST

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

ResourceREST adapts a service registry into apiserver's RESTStorage model.

func NewResourceREST

func NewResourceREST(
	application ApplicationStorage,
	applicationClient *applicationinternalclient.ApplicationClient,
	platformClient platformversionedclient.PlatformV1Interface,
) *ResourceREST

NewResourceREST returns a wrapper around the underlying generic storage and performs allocations and deallocations of various helm releases related resources like ports. TODO: all transactional behavior should be supported from within generic storage

or the strategy.

func (*ResourceREST) Get

func (rs *ResourceREST) 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 (*ResourceREST) New

func (rs *ResourceREST) New() runtime.Object

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

type RollbackREST

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

RollbackREST adapts a service registry into apiserver's RESTStorage model.

func NewRollbackREST

NewRollbackREST returns a wrapper around the underlying generic storage and performs rollback of helm releases. TODO: all transactional behavior should be supported from within generic storage

or the strategy.

func (*RollbackREST) Connect

func (r *RollbackREST) Connect(ctx context.Context, appName string, opts runtime.Object, responder rest.Responder) (http.Handler, error)

Connect returns a handler for the chart proxy

func (*RollbackREST) ConnectMethods

func (r *RollbackREST) ConnectMethods() []string

ConnectMethods returns the list of HTTP methods that can be proxied

func (*RollbackREST) New

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

New creates a new chart proxy options object

func (*RollbackREST) NewConnectOptions

func (r *RollbackREST) NewConnectOptions() (runtime.Object, bool, string)

NewConnectOptions returns versioned resource that represents proxy parameters

type StatusREST

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

StatusREST implements the GenericREST endpoint for changing the status of a application 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 {
	App      *GenericREST
	Status   *StatusREST
	Finalize *FinalizeREST
}

Storage includes storage for application and all sub resources.

func NewStorage

func NewStorage(optsGetter genericregistry.RESTOptionsGetter,
	applicationClient *applicationinternalclient.ApplicationClient) *Storage

NewStorage returns a Storage object that will work against application.

Jump to

Keyboard shortcuts

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