Documentation ¶
Overview ¶
Package spec_base provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version (devel) DO NOT EDIT.
Index ¶
- func Handler(si ServerInterface) http.Handler
- func HandlerFromMux(si ServerInterface, r chi.Router) http.Handler
- func HandlerFromMuxWithBaseURL(si ServerInterface, r chi.Router, baseURL string) http.Handler
- func HandlerWithOptions(si ServerInterface, options ChiServerOptions) http.Handler
- type ChiServerOptions
- type DirectBar
- type InvalidParamFormatError
- type MiddlewareFunc
- type PackedBar
- type PostInvalidExtRefTrouble300JSONResponse
- type PostInvalidExtRefTroubleRequestObject
- type PostInvalidExtRefTroubleResponseObject
- type PostNoTrouble200JSONResponse
- type PostNoTroubleRequestObject
- type PostNoTroubleResponseObject
- type RequiredHeaderError
- type RequiredParamError
- type ServerInterface
- type ServerInterfaceWrapper
- type StrictHTTPServerOptions
- type StrictHandlerFunc
- type StrictMiddlewareFunc
- type StrictServerInterface
- type TooManyValuesForParamError
- type UnescapedCookieParamError
- type UnmarshallingParamError
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 InvalidParamFormatError ¶
func (*InvalidParamFormatError) Error ¶
func (e *InvalidParamFormatError) Error() string
func (*InvalidParamFormatError) Unwrap ¶
func (e *InvalidParamFormatError) Unwrap() error
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 ¶
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 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 ¶
func (*TooManyValuesForParamError) Error ¶
func (e *TooManyValuesForParamError) Error() string
type UnescapedCookieParamError ¶
func (*UnescapedCookieParamError) Error ¶
func (e *UnescapedCookieParamError) Error() string
func (*UnescapedCookieParamError) Unwrap ¶
func (e *UnescapedCookieParamError) Unwrap() error
type UnmarshallingParamError ¶
func (*UnmarshallingParamError) Error ¶
func (e *UnmarshallingParamError) Error() string
func (*UnmarshallingParamError) Unwrap ¶
func (e *UnmarshallingParamError) Unwrap() error