handler3

package
v0.0.0-...-9d3dc0a Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

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(spec *spec.Swagger) (*OpenAPIService, error)

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) (err error)

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

type OpenAPIV3Group

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

func (*OpenAPIV3Group) UpdateSpec

func (o *OpenAPIV3Group) UpdateSpec(openapi *spec3.OpenAPI) (err error)

Jump to

Keyboard shortcuts

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