handler3

package
v0.0.0-...-8948a66 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 19 Imported by: 19

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToV3ProtoBinary

func ToV3ProtoBinary(json []byte) ([]byte, error)

Types

type OpenAPIService

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

OpenAPIService is the service responsible for serving OpenAPI spec. It has the ability to safely change the spec while serving it.

func NewOpenAPIService

func NewOpenAPIService() *OpenAPIService

NewOpenAPIService builds an OpenAPIService starting with the given spec.

func (*OpenAPIService) DeleteGroupVersion

func (o *OpenAPIService) DeleteGroupVersion(group string)

func (*OpenAPIService) HandleDiscovery

func (o *OpenAPIService) HandleDiscovery(w http.ResponseWriter, r *http.Request)

func (*OpenAPIService) HandleGroupVersion

func (o *OpenAPIService) HandleGroupVersion(w http.ResponseWriter, r *http.Request)

func (*OpenAPIService) RegisterOpenAPIV3VersionedService

func (o *OpenAPIService) RegisterOpenAPIV3VersionedService(servePath string, handler common.PathHandlerByGroupVersion) error

func (*OpenAPIService) UpdateGroupVersion

func (o *OpenAPIService) UpdateGroupVersion(group string, openapi *spec3.OpenAPI)

func (*OpenAPIService) UpdateGroupVersionLazy

func (o *OpenAPIService) UpdateGroupVersionLazy(group string, openapi cached.Value[*spec3.OpenAPI])

UpdateGroupVersionLazy adds or updates an existing group with the new cached.

type OpenAPIV3Discovery

type OpenAPIV3Discovery struct {
	Paths map[string]OpenAPIV3DiscoveryGroupVersion `json:"paths"`
}

OpenAPIV3Discovery is the format of the Discovery document for OpenAPI V3 It maps Discovery paths to their corresponding URLs with a hash parameter included

type OpenAPIV3DiscoveryGroupVersion

type OpenAPIV3DiscoveryGroupVersion struct {
	// Path is an absolute path of an OpenAPI V3 document in the form of /openapi/v3/apis/apps/v1?hash=014fbff9a07c
	ServerRelativeURL string `json:"serverRelativeURL"`
}

OpenAPIV3DiscoveryGroupVersion includes information about a group version and URL for accessing the OpenAPI. The URL includes a hash parameter to support client side caching

Jump to

Keyboard shortcuts

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