resourcerest

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package resourcerest defines interfaces for resource REST implementations.

If a resource implements these interfaces directly on the object, then the resource itself may be used as the request handler, and will be registered as the REST handler by default when builder.APIServer.WithResource is called.

Alternatively, a REST struct may be defined separately from the object and explicitly registered to handle the object with builder.APIServer.WithResourceAndHandler.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CategoriesProvider

type CategoriesProvider = rest.CategoriesProvider

CategoriesProvider allows a resource to specify which groups of resources (categories) it's part of. Categories can be used by API clients to refer to a batch of resources by using a single name (e.g. "all" could translate to "pod,rc,svc,...").

type CollectionDeleter

type CollectionDeleter = rest.CollectionDeleter

CollectionDeleter if implemented will expose DELETE endpoints for resource collections and publish them in the Kubernetes discovery service and OpenAPI.

Required for `kubectl delete --all`

type Connecter

type Connecter = rest.Connecter

Connecter is a storage object that responds to a connection request.

type CreaterUpdater

type CreaterUpdater = rest.CreaterUpdater

CreaterUpdater is a storage object that must support both create and update. Go prevents embedded interfaces that implement the same method.

type Creator

type Creator = rest.Creater

Creator if implemented will expose PUT endpoints for the resource and publish them in the Kubernetes discovery service and OpenAPI.

Required for `kubectl apply`.

type FieldsIndexer

type FieldsIndexer interface {
	IndexingFields() []string
	GetField(fieldName string) string
}

FieldsIndexer indices resources by certain fields at the server-side. TODO: implement it

type Getter

type Getter = rest.Getter

Getter if implemented will expose GET endpoints for the resource and publish them in the Kubernetes discovery service and OpenAPI.

Required for `kubectl apply` and most operators.

type GracefulDeleter

type GracefulDeleter = rest.GracefulDeleter

GracefulDeleter knows how to pass deletion options to allow delayed deletion of a RESTful object.

type LabelsIndexer

type LabelsIndexer interface {
	IndexingLabelKeys() []string
}

LabelsIndexer indices resources by their labels at the server-side. TODO: implement it

type Lister

type Lister = rest.Lister

Lister if implemented will enable listing resources.

Required by `kubectl get` and most operators.

type Patcher

type Patcher = rest.Patcher

Patcher if implemented will expose POST and GET endpoints for the resource and publish them in the Kubernetes discovery service and OpenAPI.

Required by `kubectl apply` and most controllers.

type Redirector

type Redirector = rest.Redirector

Redirector know how to return a remote resource's location.

type Responder

type Responder = rest.Responder

Responder abstracts the normal response behavior for a REST method and is passed to callers that may wish to handle the response directly in some cases, but delegate to the normal error or object behavior in other cases.

type ShortNamesProvider

type ShortNamesProvider = rest.ShortNamesProvider

ShortNamesProvider is an interface for RESTful storage services. Delivers a list of short names for a resource. The list is used by kubectl to have short names representation of resources.

type StandardStorage

type StandardStorage = rest.StandardStorage

StandardStorage defines the standard endpoints for resources.

type TableConvertor

type TableConvertor = rest.TableConvertor

TableConvertor if implemented will return tabular data from the GET endpoint when requested.

Required by pretty printing `kubectl get`.

type Updater

type Updater = rest.Updater

Updater if implemented will expose POST endpoints for the resource and publish them in the Kubernetes discovery service and OpenAPI.

Required by `kubectl apply` and most controllers.

type Watcher

type Watcher = rest.Watcher

Watcher if implemented will enable watching resources.

Required by most controllers.

Jump to

Keyboard shortcuts

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