v1

package
v0.0.0-...-8f0ba9e Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Overview

Package v1 provides primitives to interact with the openapi HTTP API.

Code generated by github.com/deepmap/oapi-codegen/v2 version v2.1.0 DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSwagger

func GetSwagger() (swagger *openapi3.T, err error)

GetSwagger returns the Swagger specification corresponding to the generated code in this file. The external references of Swagger specification are resolved. The logic of resolving external references is tightly connected to "import-mapping" feature. Externally referenced files must be embedded in the corresponding golang packages. Urls can be supported but this task was out of the scope.

func Handler

func Handler(si ServerInterface) http.Handler

Handler creates http.Handler with routing matching OpenAPI spec.

func HandlerFromMux

func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler

HandlerFromMux creates http.Handler with routing matching OpenAPI spec based on the provided mux.

func HandlerFromMuxWithBaseURL

func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler

func HandlerWithOptions

func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler

HandlerWithOptions creates http.Handler with additional options

func PathToRawSpec

func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)

Constructs a synthetic filesystem for resolving external references when loading openapi specifications.

Types

type ChiServerOptions

type ChiServerOptions struct {
	BaseURL          string
	BaseRouter       chi.Router
	Middlewares      []MiddlewareFunc
	ErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type ConnectPluginTransportRequestObject

type ConnectPluginTransportRequestObject struct {
}

type ConnectPluginTransportResponseObject

type ConnectPluginTransportResponseObject interface {
	VisitConnectPluginTransportResponse(w http.ResponseWriter) error
}

type ErrorResponse

type ErrorResponse struct {
	Error   string `json:"error"`
	Message string `json:"message"`
}

ErrorResponse defines model for ErrorResponse.

type GetTranscodeManifestM3u8RequestObject

type GetTranscodeManifestM3u8RequestObject struct {
	TranscodeId openapi_types.UUID `json:"transcodeId"`
}

type GetTranscodeManifestM3u8ResponseObject

type GetTranscodeManifestM3u8ResponseObject interface {
	VisitGetTranscodeManifestM3u8Response(w http.ResponseWriter) error
}

type GetTranscodeManifestM3u8200ApplicationvndAppleMpegurlResponse

type GetTranscodeManifestM3u8200ApplicationvndAppleMpegurlResponse struct {
	Body          io.Reader
	ContentLength int64
}

func (GetTranscodeManifestM3u8200ApplicationvndAppleMpegurlResponse) VisitGetTranscodeManifestM3u8Response

func (response GetTranscodeManifestM3u8200ApplicationvndAppleMpegurlResponse) VisitGetTranscodeManifestM3u8Response(w http.ResponseWriter) error

type GetTranscodeSegment200VideoResponse

type GetTranscodeSegment200VideoResponse struct {
	Body          io.Reader
	ContentType   string
	ContentLength int64
}

func (GetTranscodeSegment200VideoResponse) VisitGetTranscodeSegmentResponse

func (response GetTranscodeSegment200VideoResponse) VisitGetTranscodeSegmentResponse(w http.ResponseWriter) error

type GetTranscodeSegmentRequestObject

type GetTranscodeSegmentRequestObject struct {
	TranscodeId openapi_types.UUID `json:"transcodeId"`
	Segment     string             `json:"segment"`
}

type GetTranscodeSegmentResponseObject

type GetTranscodeSegmentResponseObject interface {
	VisitGetTranscodeSegmentResponse(w http.ResponseWriter) error
}

type InvalidParamFormatError

type InvalidParamFormatError struct {
	ParamName string
	Err       error
}

func (*InvalidParamFormatError) Error

func (e *InvalidParamFormatError) Error() string

func (*InvalidParamFormatError) Unwrap

func (e *InvalidParamFormatError) Unwrap() error

type MiddlewareFunc

type MiddlewareFunc func(http.Handler) http.Handler

type RequiredHeaderError

type RequiredHeaderError struct {
	ParamName string
	Err       error
}

func (*RequiredHeaderError) Error

func (e *RequiredHeaderError) Error() string

func (*RequiredHeaderError) Unwrap

func (e *RequiredHeaderError) Unwrap() error

type RequiredParamError

type RequiredParamError struct {
	ParamName string
}

func (*RequiredParamError) Error

func (e *RequiredParamError) Error() string

type ServerInterface

type ServerInterface interface {
	// Plugin Transport Connect
	// (CONNECT /plugin/transport)
	ConnectPluginTransport(w http.ResponseWriter, r *http.Request)
	// Transcode Manifest M3U8
	// (GET /transcode/{transcodeId}/manifest.m3u8)
	GetTranscodeManifestM3u8(w http.ResponseWriter, r *http.Request, transcodeId openapi_types.UUID)
	// Transcode Segment
	// (GET /transcode/{transcodeId}/{segment})
	GetTranscodeSegment(w http.ResponseWriter, r *http.Request, transcodeId openapi_types.UUID, segment string)
}

ServerInterface represents all server handlers.

func NewStrictHandler

func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface

func NewStrictHandlerWithOptions

func NewStrictHandlerWithOptions(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc, options StrictHTTPServerOptions) ServerInterface

type ServerInterfaceWrapper

type ServerInterfaceWrapper struct {
	Handler            ServerInterface
	HandlerMiddlewares []MiddlewareFunc
	ErrorHandlerFunc   func(w http.ResponseWriter, r *http.Request, err error)
}

ServerInterfaceWrapper converts contexts to parameters.

func (*ServerInterfaceWrapper) ConnectPluginTransport

func (siw *ServerInterfaceWrapper) ConnectPluginTransport(w http.ResponseWriter, r *http.Request)

ConnectPluginTransport operation middleware

func (*ServerInterfaceWrapper) GetTranscodeManifestM3u8

func (siw *ServerInterfaceWrapper) GetTranscodeManifestM3u8(w http.ResponseWriter, r *http.Request)

GetTranscodeManifestM3u8 operation middleware

func (*ServerInterfaceWrapper) GetTranscodeSegment

func (siw *ServerInterfaceWrapper) GetTranscodeSegment(w http.ResponseWriter, r *http.Request)

GetTranscodeSegment operation middleware

type StrictHTTPServerOptions

type StrictHTTPServerOptions struct {
	RequestErrorHandlerFunc  func(w http.ResponseWriter, r *http.Request, err error)
	ResponseErrorHandlerFunc func(w http.ResponseWriter, r *http.Request, err error)
}

type StrictServerInterface

type StrictServerInterface interface {
	// Plugin Transport Connect
	// (CONNECT /plugin/transport)
	ConnectPluginTransport(ctx context.Context, request ConnectPluginTransportRequestObject) (ConnectPluginTransportResponseObject, error)
	// Transcode Manifest M3U8
	// (GET /transcode/{transcodeId}/manifest.m3u8)
	GetTranscodeManifestM3u8(ctx context.Context, request GetTranscodeManifestM3u8RequestObject) (GetTranscodeManifestM3u8ResponseObject, error)
	// Transcode Segment
	// (GET /transcode/{transcodeId}/{segment})
	GetTranscodeSegment(ctx context.Context, request GetTranscodeSegmentRequestObject) (GetTranscodeSegmentResponseObject, error)
}

StrictServerInterface represents all server handlers.

type TooManyValuesForParamError

type TooManyValuesForParamError struct {
	ParamName string
	Count     int
}

func (*TooManyValuesForParamError) Error

type UnescapedCookieParamError

type UnescapedCookieParamError struct {
	ParamName string
	Err       error
}

func (*UnescapedCookieParamError) Error

func (e *UnescapedCookieParamError) Error() string

func (*UnescapedCookieParamError) Unwrap

func (e *UnescapedCookieParamError) Unwrap() error

type Unimplemented

type Unimplemented struct{}

func (Unimplemented) ConnectPluginTransport

func (_ Unimplemented) ConnectPluginTransport(w http.ResponseWriter, r *http.Request)

Plugin Transport Connect (CONNECT /plugin/transport)

func (Unimplemented) GetTranscodeManifestM3u8

func (_ Unimplemented) GetTranscodeManifestM3u8(w http.ResponseWriter, r *http.Request, transcodeId openapi_types.UUID)

Transcode Manifest M3U8 (GET /transcode/{transcodeId}/manifest.m3u8)

func (Unimplemented) GetTranscodeSegment

func (_ Unimplemented) GetTranscodeSegment(w http.ResponseWriter, r *http.Request, transcodeId openapi_types.UUID, segment string)

Transcode Segment (GET /transcode/{transcodeId}/{segment})

type UnmarshalingParamError

type UnmarshalingParamError struct {
	ParamName string
	Err       error
}

func (*UnmarshalingParamError) Error

func (e *UnmarshalingParamError) Error() string

func (*UnmarshalingParamError) Unwrap

func (e *UnmarshalingParamError) Unwrap() error

Jump to

Keyboard shortcuts

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