Documentation
¶
Overview ¶
Package api provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version (devel) DO NOT EDIT.
Package api provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen version (devel) DO NOT EDIT.
Index ¶
- func GetSwagger() (swagger *openapi3.T, err error)
- func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error)
- func RegisterHandlers(router EchoRouter, si ServerInterface)
- func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)
- type BadrequestResponse
- type EchoRouter
- type Example
- type HeadersExample200JSONResponse
- type HeadersExample200ResponseHeaders
- type HeadersExample400Response
- type HeadersExampleJSONRequestBody
- type HeadersExampleParams
- type HeadersExampleRequestObject
- type HeadersExampledefaultResponse
- type JSONExample200JSONResponse
- type JSONExample400Response
- type JSONExampleJSONRequestBody
- type JSONExampleRequestObject
- type JSONExampledefaultResponse
- type MultipartExample200MultipartResponse
- type MultipartExample400Response
- type MultipartExampleMultipartRequestBody
- type MultipartExampleRequestObject
- type MultipartExampledefaultResponse
- type MultipleRequestAndResponseTypes200FormdataResponse
- type MultipleRequestAndResponseTypes200ImagepngResponse
- type MultipleRequestAndResponseTypes200JSONResponse
- type MultipleRequestAndResponseTypes200MultipartResponse
- type MultipleRequestAndResponseTypes200TextResponse
- type MultipleRequestAndResponseTypes400Response
- type MultipleRequestAndResponseTypesFormdataRequestBody
- type MultipleRequestAndResponseTypesJSONRequestBody
- type MultipleRequestAndResponseTypesMultipartRequestBody
- type MultipleRequestAndResponseTypesRequestObject
- type MultipleRequestAndResponseTypesTextBody
- type MultipleRequestAndResponseTypesTextRequestBody
- type ReusableResponses200JSONResponse
- type ReusableResponses400Response
- type ReusableResponsesJSONRequestBody
- type ReusableResponsesRequestObject
- type ReusableResponsesdefaultResponse
- type Reusableresponse
- type ReusableresponseJSONResponse
- type ReusableresponseResponseHeaders
- type ServerInterface
- type ServerInterfaceWrapper
- func (w *ServerInterfaceWrapper) HeadersExample(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) JSONExample(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) MultipartExample(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) MultipleRequestAndResponseTypes(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) ReusableResponses(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) TextExample(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) URLEncodedExample(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) UnknownExample(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) UnspecifiedContentType(ctx echo.Context) error
- type StrictHandlerFunc
- type StrictMiddlewareFunc
- type StrictServer
- func (s StrictServer) HeadersExample(ctx context.Context, request HeadersExampleRequestObject) interface{}
- func (s StrictServer) JSONExample(ctx context.Context, request JSONExampleRequestObject) interface{}
- func (s StrictServer) MultipartExample(ctx context.Context, request MultipartExampleRequestObject) interface{}
- func (s StrictServer) MultipleRequestAndResponseTypes(ctx context.Context, request MultipleRequestAndResponseTypesRequestObject) interface{}
- func (s StrictServer) ReusableResponses(ctx context.Context, request ReusableResponsesRequestObject) interface{}
- func (s StrictServer) TextExample(ctx context.Context, request TextExampleRequestObject) interface{}
- func (s StrictServer) URLEncodedExample(ctx context.Context, request URLEncodedExampleRequestObject) interface{}
- func (s StrictServer) UnknownExample(ctx context.Context, request UnknownExampleRequestObject) interface{}
- func (s StrictServer) UnspecifiedContentType(ctx context.Context, request UnspecifiedContentTypeRequestObject) interface{}
- type StrictServerInterface
- type TextExample200TextResponse
- type TextExample400Response
- type TextExampleRequestObject
- type TextExampleTextBody
- type TextExampleTextRequestBody
- type TextExampledefaultResponse
- type URLEncodedExample200FormdataResponse
- type URLEncodedExample400Response
- type URLEncodedExampleFormdataRequestBody
- type URLEncodedExampleRequestObject
- type URLEncodedExampledefaultResponse
- type UnknownExample200Videomp4Response
- type UnknownExample400Response
- type UnknownExampleRequestObject
- type UnknownExampledefaultResponse
- type UnspecifiedContentType200VideoResponse
- type UnspecifiedContentType400Response
- type UnspecifiedContentType401Response
- type UnspecifiedContentType403Response
- type UnspecifiedContentTypeRequestObject
- type UnspecifiedContentTypedefaultResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSwagger ¶
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 PathToRawSpec ¶
Constructs a synthetic filesystem for resolving external references when loading openapi specifications.
func RegisterHandlers ¶
func RegisterHandlers(router EchoRouter, si ServerInterface)
RegisterHandlers adds each server route to the EchoRouter.
func RegisterHandlersWithBaseURL ¶
func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)
Registers handlers, and prepends BaseURL to the paths, so that the paths can be served under a prefix.
Types ¶
type BadrequestResponse ¶
type BadrequestResponse struct { }
type EchoRouter ¶
type EchoRouter interface { CONNECT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route DELETE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route GET(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route HEAD(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route OPTIONS(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route PATCH(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route POST(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route PUT(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route TRACE(path string, h echo.HandlerFunc, m ...echo.MiddlewareFunc) *echo.Route }
This is a simple interface which specifies echo.Route addition functions which are present on both echo.Echo and echo.Group, since we want to allow using either of them for path registration
type Example ¶
type Example struct {
Value *string `json:"value,omitempty"`
}
Example defines model for example.
type HeadersExample200JSONResponse ¶
type HeadersExample200JSONResponse struct { Body Example Headers HeadersExample200ResponseHeaders }
func (HeadersExample200JSONResponse) MarshalJSON ¶
func (t HeadersExample200JSONResponse) MarshalJSON() ([]byte, error)
type HeadersExample400Response ¶
type HeadersExample400Response = BadrequestResponse
type HeadersExampleJSONRequestBody ¶
type HeadersExampleJSONRequestBody = Example
HeadersExampleJSONRequestBody defines body for HeadersExample for application/json ContentType.
type HeadersExampleParams ¶
type HeadersExampleParams struct { Header1 string `json:"header1"` Header2 *int `json:"header2,omitempty"` }
HeadersExampleParams defines parameters for HeadersExample.
type HeadersExampleRequestObject ¶
type HeadersExampleRequestObject struct { Params HeadersExampleParams Body *HeadersExampleJSONRequestBody }
type HeadersExampledefaultResponse ¶
type HeadersExampledefaultResponse struct {
StatusCode int
}
type JSONExample200JSONResponse ¶
type JSONExample200JSONResponse Example
func (JSONExample200JSONResponse) MarshalJSON ¶
func (t JSONExample200JSONResponse) MarshalJSON() ([]byte, error)
type JSONExample400Response ¶
type JSONExample400Response = BadrequestResponse
type JSONExampleJSONRequestBody ¶
type JSONExampleJSONRequestBody = Example
JSONExampleJSONRequestBody defines body for JSONExample for application/json ContentType.
type JSONExampleRequestObject ¶
type JSONExampleRequestObject struct {
Body *JSONExampleJSONRequestBody
}
type JSONExampledefaultResponse ¶
type JSONExampledefaultResponse struct {
StatusCode int
}
type MultipartExample400Response ¶
type MultipartExample400Response = BadrequestResponse
type MultipartExampleMultipartRequestBody ¶
type MultipartExampleMultipartRequestBody = Example
MultipartExampleMultipartRequestBody defines body for MultipartExample for multipart/form-data ContentType.
type MultipartExampledefaultResponse ¶
type MultipartExampledefaultResponse struct {
StatusCode int
}
type MultipleRequestAndResponseTypes200FormdataResponse ¶
type MultipleRequestAndResponseTypes200FormdataResponse Example
type MultipleRequestAndResponseTypes200JSONResponse ¶
type MultipleRequestAndResponseTypes200JSONResponse Example
func (MultipleRequestAndResponseTypes200JSONResponse) MarshalJSON ¶
func (t MultipleRequestAndResponseTypes200JSONResponse) MarshalJSON() ([]byte, error)
type MultipleRequestAndResponseTypes200TextResponse ¶
type MultipleRequestAndResponseTypes200TextResponse string
type MultipleRequestAndResponseTypes400Response ¶
type MultipleRequestAndResponseTypes400Response = BadrequestResponse
type MultipleRequestAndResponseTypesFormdataRequestBody ¶
type MultipleRequestAndResponseTypesFormdataRequestBody = Example
MultipleRequestAndResponseTypesFormdataRequestBody defines body for MultipleRequestAndResponseTypes for application/x-www-form-urlencoded ContentType.
type MultipleRequestAndResponseTypesJSONRequestBody ¶
type MultipleRequestAndResponseTypesJSONRequestBody = Example
MultipleRequestAndResponseTypesJSONRequestBody defines body for MultipleRequestAndResponseTypes for application/json ContentType.
type MultipleRequestAndResponseTypesMultipartRequestBody ¶
type MultipleRequestAndResponseTypesMultipartRequestBody = Example
MultipleRequestAndResponseTypesMultipartRequestBody defines body for MultipleRequestAndResponseTypes for multipart/form-data ContentType.
type MultipleRequestAndResponseTypesRequestObject ¶
type MultipleRequestAndResponseTypesRequestObject struct { JSONBody *MultipleRequestAndResponseTypesJSONRequestBody FormdataBody *MultipleRequestAndResponseTypesFormdataRequestBody Body io.Reader MultipartBody *multipart.Reader TextBody *MultipleRequestAndResponseTypesTextRequestBody }
type MultipleRequestAndResponseTypesTextBody ¶
type MultipleRequestAndResponseTypesTextBody = string
MultipleRequestAndResponseTypesTextBody defines parameters for MultipleRequestAndResponseTypes.
type MultipleRequestAndResponseTypesTextRequestBody ¶
type MultipleRequestAndResponseTypesTextRequestBody = MultipleRequestAndResponseTypesTextBody
MultipleRequestAndResponseTypesTextRequestBody defines body for MultipleRequestAndResponseTypes for text/plain ContentType.
type ReusableResponses200JSONResponse ¶
type ReusableResponses200JSONResponse = ReusableresponseJSONResponse
type ReusableResponses400Response ¶
type ReusableResponses400Response = BadrequestResponse
type ReusableResponsesJSONRequestBody ¶
type ReusableResponsesJSONRequestBody = Example
ReusableResponsesJSONRequestBody defines body for ReusableResponses for application/json ContentType.
type ReusableResponsesRequestObject ¶
type ReusableResponsesRequestObject struct {
Body *ReusableResponsesJSONRequestBody
}
type ReusableResponsesdefaultResponse ¶
type ReusableResponsesdefaultResponse struct {
StatusCode int
}
type Reusableresponse ¶
type Reusableresponse = Example
Reusableresponse defines model for reusableresponse.
type ReusableresponseJSONResponse ¶
type ReusableresponseJSONResponse struct { Body Example Headers ReusableresponseResponseHeaders }
func (ReusableresponseJSONResponse) MarshalJSON ¶
func (t ReusableresponseJSONResponse) MarshalJSON() ([]byte, error)
type ServerInterface ¶
type ServerInterface interface { // (POST /json) JSONExample(ctx echo.Context) error // (POST /multipart) MultipartExample(ctx echo.Context) error // (POST /multiple) MultipleRequestAndResponseTypes(ctx echo.Context) error // (POST /reusable-responses) ReusableResponses(ctx echo.Context) error // (POST /text) TextExample(ctx echo.Context) error // (POST /unknown) UnknownExample(ctx echo.Context) error // (POST /unspecified-content-type) UnspecifiedContentType(ctx echo.Context) error // (POST /urlencoded) URLEncodedExample(ctx echo.Context) error // (POST /with-headers) HeadersExample(ctx echo.Context, params HeadersExampleParams) error }
ServerInterface represents all server handlers.
func NewStrictHandler ¶
func NewStrictHandler(ssi StrictServerInterface, middlewares []StrictMiddlewareFunc) ServerInterface
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
}
ServerInterfaceWrapper converts echo contexts to parameters.
func (*ServerInterfaceWrapper) HeadersExample ¶
func (w *ServerInterfaceWrapper) HeadersExample(ctx echo.Context) error
HeadersExample converts echo context to params.
func (*ServerInterfaceWrapper) JSONExample ¶
func (w *ServerInterfaceWrapper) JSONExample(ctx echo.Context) error
JSONExample converts echo context to params.
func (*ServerInterfaceWrapper) MultipartExample ¶
func (w *ServerInterfaceWrapper) MultipartExample(ctx echo.Context) error
MultipartExample converts echo context to params.
func (*ServerInterfaceWrapper) MultipleRequestAndResponseTypes ¶
func (w *ServerInterfaceWrapper) MultipleRequestAndResponseTypes(ctx echo.Context) error
MultipleRequestAndResponseTypes converts echo context to params.
func (*ServerInterfaceWrapper) ReusableResponses ¶
func (w *ServerInterfaceWrapper) ReusableResponses(ctx echo.Context) error
ReusableResponses converts echo context to params.
func (*ServerInterfaceWrapper) TextExample ¶
func (w *ServerInterfaceWrapper) TextExample(ctx echo.Context) error
TextExample converts echo context to params.
func (*ServerInterfaceWrapper) URLEncodedExample ¶
func (w *ServerInterfaceWrapper) URLEncodedExample(ctx echo.Context) error
URLEncodedExample converts echo context to params.
func (*ServerInterfaceWrapper) UnknownExample ¶
func (w *ServerInterfaceWrapper) UnknownExample(ctx echo.Context) error
UnknownExample converts echo context to params.
func (*ServerInterfaceWrapper) UnspecifiedContentType ¶
func (w *ServerInterfaceWrapper) UnspecifiedContentType(ctx echo.Context) error
UnspecifiedContentType converts echo context to params.
type StrictHandlerFunc ¶
type StrictHandlerFunc func(ctx echo.Context, args interface{}) interface{}
type StrictMiddlewareFunc ¶
type StrictMiddlewareFunc func(f StrictHandlerFunc, operationID string) StrictHandlerFunc
type StrictServer ¶
type StrictServer struct { }
func (StrictServer) HeadersExample ¶
func (s StrictServer) HeadersExample(ctx context.Context, request HeadersExampleRequestObject) interface{}
func (StrictServer) JSONExample ¶
func (s StrictServer) JSONExample(ctx context.Context, request JSONExampleRequestObject) interface{}
func (StrictServer) MultipartExample ¶
func (s StrictServer) MultipartExample(ctx context.Context, request MultipartExampleRequestObject) interface{}
func (StrictServer) MultipleRequestAndResponseTypes ¶
func (s StrictServer) MultipleRequestAndResponseTypes(ctx context.Context, request MultipleRequestAndResponseTypesRequestObject) interface{}
func (StrictServer) ReusableResponses ¶
func (s StrictServer) ReusableResponses(ctx context.Context, request ReusableResponsesRequestObject) interface{}
func (StrictServer) TextExample ¶
func (s StrictServer) TextExample(ctx context.Context, request TextExampleRequestObject) interface{}
func (StrictServer) URLEncodedExample ¶
func (s StrictServer) URLEncodedExample(ctx context.Context, request URLEncodedExampleRequestObject) interface{}
func (StrictServer) UnknownExample ¶
func (s StrictServer) UnknownExample(ctx context.Context, request UnknownExampleRequestObject) interface{}
func (StrictServer) UnspecifiedContentType ¶
func (s StrictServer) UnspecifiedContentType(ctx context.Context, request UnspecifiedContentTypeRequestObject) interface{}
type StrictServerInterface ¶
type StrictServerInterface interface { // (POST /json) JSONExample(ctx context.Context, request JSONExampleRequestObject) interface{} // (POST /multipart) MultipartExample(ctx context.Context, request MultipartExampleRequestObject) interface{} // (POST /multiple) MultipleRequestAndResponseTypes(ctx context.Context, request MultipleRequestAndResponseTypesRequestObject) interface{} // (POST /reusable-responses) ReusableResponses(ctx context.Context, request ReusableResponsesRequestObject) interface{} // (POST /text) TextExample(ctx context.Context, request TextExampleRequestObject) interface{} // (POST /unknown) UnknownExample(ctx context.Context, request UnknownExampleRequestObject) interface{} // (POST /unspecified-content-type) UnspecifiedContentType(ctx context.Context, request UnspecifiedContentTypeRequestObject) interface{} // (POST /urlencoded) URLEncodedExample(ctx context.Context, request URLEncodedExampleRequestObject) interface{} // (POST /with-headers) HeadersExample(ctx context.Context, request HeadersExampleRequestObject) interface{} }
StrictServerInterface represents all server handlers.
type TextExample200TextResponse ¶
type TextExample200TextResponse string
type TextExample400Response ¶
type TextExample400Response = BadrequestResponse
type TextExampleRequestObject ¶
type TextExampleRequestObject struct {
Body *TextExampleTextRequestBody
}
type TextExampleTextBody ¶
type TextExampleTextBody = string
TextExampleTextBody defines parameters for TextExample.
type TextExampleTextRequestBody ¶
type TextExampleTextRequestBody = TextExampleTextBody
TextExampleTextRequestBody defines body for TextExample for text/plain ContentType.
type TextExampledefaultResponse ¶
type TextExampledefaultResponse struct {
StatusCode int
}
type URLEncodedExample200FormdataResponse ¶
type URLEncodedExample200FormdataResponse Example
type URLEncodedExample400Response ¶
type URLEncodedExample400Response = BadrequestResponse
type URLEncodedExampleFormdataRequestBody ¶
type URLEncodedExampleFormdataRequestBody = Example
URLEncodedExampleFormdataRequestBody defines body for URLEncodedExample for application/x-www-form-urlencoded ContentType.
type URLEncodedExampleRequestObject ¶
type URLEncodedExampleRequestObject struct {
Body *URLEncodedExampleFormdataRequestBody
}
type URLEncodedExampledefaultResponse ¶
type URLEncodedExampledefaultResponse struct {
StatusCode int
}
type UnknownExample400Response ¶
type UnknownExample400Response = BadrequestResponse
type UnknownExampledefaultResponse ¶
type UnknownExampledefaultResponse struct {
StatusCode int
}
type UnspecifiedContentType400Response ¶
type UnspecifiedContentType400Response = BadrequestResponse
type UnspecifiedContentType401Response ¶
type UnspecifiedContentType401Response struct { }
type UnspecifiedContentType403Response ¶
type UnspecifiedContentType403Response struct { }
type UnspecifiedContentTypedefaultResponse ¶
type UnspecifiedContentTypedefaultResponse struct {
StatusCode int
}