rest

package
v1.4.0-dev-20240802 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2024 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AggregatedWebServices

func AggregatedWebServices() []*restful.WebService

func DeleteAction

func DeleteAction(gr *GenericResource, ws *restful.WebService) *restful.RouteBuilder

func GetAction

func GetAction(gr *GenericResource, ws *restful.WebService) *restful.RouteBuilder

func GetAll

func GetAll(gr *GenericResource, ws *restful.WebService) *restful.RouteBuilder

func GetNamespacedAll

func GetNamespacedAll(gr *GenericResource, ws *restful.WebService) *restful.RouteBuilder

func GroupVersionBasePath

func GroupVersionBasePath(gvr schema.GroupVersion) string

func MetaRequired

func MetaRequired(definitions map[string]common.OpenAPIDefinition)

MetaRequired sets name, kind, and apiVersion to be required

func NameParam

func NameParam(ws *restful.WebService) *restful.Parameter

func NamespaceParam

func NamespaceParam(ws *restful.WebService) *restful.Parameter

func NewGenericResource

func NewGenericResource(ws *restful.WebService, resource string, objPointer runtime.Object, objKind string, objListPointer runtime.Object, namespaced bool, actions []Action)

func NewGroupVersionWebService

func NewGroupVersionWebService(gv schema.GroupVersion) *restful.WebService

func Noop

func Noop(*restful.Request, *restful.Response)

func PatchAction

func PatchAction(gr *GenericResource, ws *restful.WebService) *restful.RouteBuilder

func PostAction

func PostAction(gr *GenericResource, ws *restful.WebService) *restful.RouteBuilder

func PutAction

func PutAction(gr *GenericResource, ws *restful.WebService) *restful.RouteBuilder

func ResourceBasePath

func ResourceBasePath(resource string, namespaced bool) string

func ResourcePath

func ResourcePath(resource string, namespaced bool) string

func SetDefinitions

func SetDefinitions(definitions map[string]common.OpenAPIDefinition) map[string]common.OpenAPIDefinition

Types

type Action

type Action func(gr *GenericResource, ws *restful.WebService) *restful.RouteBuilder

type DefinitionsChain

type DefinitionsChain []DefinitionsFunc

type DefinitionsFunc

type DefinitionsFunc func(map[string]common.OpenAPIDefinition)

type GenericResource

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

func (*GenericResource) Build

func (gr *GenericResource) Build()

Jump to

Keyboard shortcuts

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