lib

package
v1.12.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderOpenAPISpec

func RenderOpenAPISpec(cfg Config) (string, error)

RenderOpenAPISpec create openapi spec of swagger.

Types

type Config

type Config struct {
	Scheme             *runtime.Scheme
	Codecs             serializer.CodecFactory
	Info               spec.InfoProps
	OpenAPIDefinitions []common.GetOpenAPIDefinitions
	Resources          []ResourceWithNamespaceScoped
	Mapper             *meta.DefaultRESTMapper
}

Config is used to configure swagger information.

func (*Config) GetOpenAPIDefinitions

func (c *Config) GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenAPIDefinition

GetOpenAPIDefinitions get openapi definitions.

type ProxyREST

type ProxyREST struct{}

ProxyREST define proxy endpoint for resources.

func (*ProxyREST) Connect

Connect implement Connect interface.

func (*ProxyREST) ConnectMethods

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

ConnectMethods returns the list of HTTP methods handled by Connect.

func (*ProxyREST) Destroy added in v1.4.0

func (r *ProxyREST) Destroy()

Destroy cleans up its resources on shutdown.

func (*ProxyREST) New

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

New returns an empty cluster proxy subresource.

func (*ProxyREST) NewConnectOptions

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

NewConnectOptions returns versioned resource that represents proxy parameters.

type ResourceInfo

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

ResourceInfo is content of StandardREST.

type ResourceWithNamespaceScoped

type ResourceWithNamespaceScoped struct {
	GVR             schema.GroupVersionResource
	NamespaceScoped bool
}

ResourceWithNamespaceScoped contain gvr and NamespaceScoped of a resource.

type StandardREST

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

StandardREST define CRUD api for resources.

func (*StandardREST) ConvertToTable

func (r *StandardREST) ConvertToTable(_ context.Context, _ runtime.Object, _ runtime.Object) (*metav1.Table, error)

ConvertToTable implement ConvertToTable interface.

func (*StandardREST) Create

Create implement Create interface.

func (*StandardREST) Delete

Delete implement Delete interface.

func (*StandardREST) DeleteCollection

DeleteCollection implement DeleteCollection interface.

func (*StandardREST) Destroy added in v1.4.0

func (r *StandardREST) Destroy()

Destroy cleans up its resources on shutdown.

func (*StandardREST) Get

Get implement Get interface.

func (*StandardREST) GetSingularName added in v1.7.0

func (r *StandardREST) GetSingularName() string

GetSingularName implements the SingularNameProvider interfaces.

func (*StandardREST) GroupVersionKind

func (r *StandardREST) GroupVersionKind(_ schema.GroupVersion) schema.GroupVersionKind

GroupVersionKind implement GroupVersionKind interface.

func (*StandardREST) List

List implement List interface.

func (*StandardREST) NamespaceScoped

func (r *StandardREST) NamespaceScoped() bool

NamespaceScoped implement NamespaceScoped interface.

func (*StandardREST) New

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

New implement New interface.

func (*StandardREST) NewList

func (r *StandardREST) NewList() runtime.Object

NewList implement NewList interface.

func (*StandardREST) Update

Update implement Update interface.

func (*StandardREST) Watch

Watch implement Watch interface.

type StatusInfo

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

StatusInfo is content of StatusREST.

type StatusREST

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

StatusREST define status endpoint for resources.

func (*StatusREST) Destroy added in v1.4.0

func (r *StatusREST) Destroy()

Destroy cleans up its resources on shutdown.

func (*StatusREST) Get

Get retrieves the status object.

func (*StatusREST) GroupVersionKind

func (r *StatusREST) GroupVersionKind(_ schema.GroupVersion) schema.GroupVersionKind

GroupVersionKind implement GroupVersionKind interface.

func (*StatusREST) New

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

New returns Cluster object.

func (*StatusREST) Update

Update alters the status subset of an object.

Jump to

Keyboard shortcuts

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