spec_base

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

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

Code generated by github.com/SealNTibbers/oapi-codegen version (devel) DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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

Types

type ChiServerOptions

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

type DirectBar

type DirectBar = externalRef0.Foo

DirectBar defines model for DirectBar.

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 PackedBar

type PackedBar struct {
	Core    *externalRef0.Foo `json:"core,omitempty"`
	Directd *DirectBar        `json:"directd,omitempty"`
	Id      *string           `json:"id,omitempty"`
}

PackedBar defines model for PackedBar.

type PostInvalidExtRefTrouble300JSONResponse

type PostInvalidExtRefTrouble300JSONResponse struct {
	externalRef0.PascalJSONResponse
}

func (PostInvalidExtRefTrouble300JSONResponse) VisitPostInvalidExtRefTroubleResponse

func (response PostInvalidExtRefTrouble300JSONResponse) VisitPostInvalidExtRefTroubleResponse(w http.ResponseWriter) error

type PostInvalidExtRefTroubleRequestObject

type PostInvalidExtRefTroubleRequestObject struct {
}

type PostInvalidExtRefTroubleResponseObject

type PostInvalidExtRefTroubleResponseObject interface {
	VisitPostInvalidExtRefTroubleResponse(w http.ResponseWriter) error
}

type PostNoTrouble200JSONResponse

type PostNoTrouble200JSONResponse struct {
	DirectBar   *DirectBar        `json:"directBar,omitempty"`
	DirectFoo   *externalRef0.Foo `json:"directFoo,omitempty"`
	IndirectFoo *PackedBar        `json:"indirectFoo,omitempty"`
	Name        *string           `json:"name,omitempty"`
}

func (PostNoTrouble200JSONResponse) VisitPostNoTroubleResponse

func (response PostNoTrouble200JSONResponse) VisitPostNoTroubleResponse(w http.ResponseWriter) error

type PostNoTroubleRequestObject

type PostNoTroubleRequestObject struct {
}

type PostNoTroubleResponseObject

type PostNoTroubleResponseObject interface {
	VisitPostNoTroubleResponse(w http.ResponseWriter) error
}

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 {

	// (POST /invalidExtRefTrouble)
	PostInvalidExtRefTrouble(w http.ResponseWriter, r *http.Request)

	// (POST /noTrouble)
	PostNoTrouble(w http.ResponseWriter, r *http.Request)
}

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) PostInvalidExtRefTrouble

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

PostInvalidExtRefTrouble operation middleware

func (*ServerInterfaceWrapper) PostNoTrouble

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

PostNoTrouble 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 StrictHandlerFunc

type StrictHandlerFunc func(ctx context.Context, w http.ResponseWriter, r *http.Request, args interface{}) (interface{}, error)

type StrictMiddlewareFunc

type StrictMiddlewareFunc func(f StrictHandlerFunc, operationID string) StrictHandlerFunc

type StrictServerInterface

type StrictServerInterface interface {

	// (POST /invalidExtRefTrouble)
	PostInvalidExtRefTrouble(ctx context.Context, request PostInvalidExtRefTroubleRequestObject) (PostInvalidExtRefTroubleResponseObject, error)

	// (POST /noTrouble)
	PostNoTrouble(ctx context.Context, request PostNoTroubleRequestObject) (PostNoTroubleResponseObject, 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 UnmarshallingParamError

type UnmarshallingParamError struct {
	ParamName string
	Err       error
}

func (*UnmarshallingParamError) Error

func (e *UnmarshallingParamError) Error() string

func (*UnmarshallingParamError) Unwrap

func (e *UnmarshallingParamError) Unwrap() error

Jump to

Keyboard shortcuts

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