rest

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2018 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenericResourceProxy

func GenericResourceProxy(ws *restful.WebService, ctx context.Context, gvr schema.GroupVersionResource, objPointer runtime.Object, objKind string, objListPointer runtime.Object) (*restful.WebService, error)

func GroupBasePath

func GroupBasePath(gvr schema.GroupVersion) string

func GroupVersionBasePath

func GroupVersionBasePath(gvr schema.GroupVersion) string

func GroupVersionProxyBase

func GroupVersionProxyBase(ctx context.Context, gv schema.GroupVersion) (*restful.WebService, error)

func NameParam

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

func NamespaceParam

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

func NewAutodiscoveryEndpoint

func NewAutodiscoveryEndpoint(cli *rest.RESTClient) endpoint.Endpoint

func NewGenericDeleteListEndpoint

func NewGenericDeleteListEndpoint(cli *rest.RESTClient, gvr schema.GroupVersionResource, response ResponseHandlerFunc) endpoint.Endpoint

func NotImplementedYet

func NotImplementedYet(request *restful.Request, response *restful.Response)

func ResourceBasePath

func ResourceBasePath(gvr schema.GroupVersionResource) string

func ResourcePath

func ResourcePath(gvr schema.GroupVersionResource) string

func ResourceProxyAutodiscovery

func ResourceProxyAutodiscovery(ctx context.Context, gvr schema.GroupVersionResource) (*restful.WebService, error)

func SubResourcePath

func SubResourcePath(subResource string) string

Types

type ResponseHandlerFunc

type ResponseHandlerFunc func(rest.Result) (interface{}, error)

type SubresourceAPIApp added in v0.4.0

type SubresourceAPIApp struct {
	VirtCli kubecli.KubevirtClient
}

func (*SubresourceAPIApp) ConsoleRequestHandler added in v0.4.0

func (app *SubresourceAPIApp) ConsoleRequestHandler(request *restful.Request, response *restful.Response)

func (*SubresourceAPIApp) VNCRequestHandler added in v0.4.0

func (app *SubresourceAPIApp) VNCRequestHandler(request *restful.Request, response *restful.Response)

type VirtApiAuthorizor added in v0.4.0

type VirtApiAuthorizor interface {
	Authorize(req *restful.Request) (bool, string, error)
	AddUserHeaders(header []string)
	GetUserHeaders() []string
	AddGroupHeaders(header []string)
	GetGroupHeaders() []string
	AddExtraPrefixHeaders(header []string)
	GetExtraPrefixHeaders() []string
}

func NewAuthorizor added in v0.4.0

func NewAuthorizor() (VirtApiAuthorizor, error)

func NewAuthorizorFromConfig added in v0.4.0

func NewAuthorizorFromConfig(config *restclient.Config) (VirtApiAuthorizor, error)

Jump to

Keyboard shortcuts

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