Documentation ¶
Overview ¶
Package api provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen DO NOT EDIT.
Package api provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen DO NOT EDIT.
Package api provides primitives to interact with the openapi HTTP API.
Code generated by github.com/deepmap/oapi-codegen DO NOT EDIT.
Index ¶
- func GetSwagger() (swagger *openapi3.Swagger, 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 Card
- type DeckReturnCard2Params
- type DeckReturnCardJSONBody
- type DeckReturnCardJSONRequestBody
- type EchoRouter
- type Error
- type ServerInterface
- type ServerInterfaceWrapper
- func (w *ServerInterfaceWrapper) DeckDealCard(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) DeckDealCard2(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) DeckReturnCard(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) DeckReturnCard2(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) DeckShow(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) DeckShuffle(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) DeckShuffle2(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) Index(ctx echo.Context) error
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 DeckReturnCard2Params ¶
type DeckReturnCard2Params struct { // Short-form or long-form encoding of the card to return to the deck Card *string `json:"card,omitempty"` }
DeckReturnCard2Params defines parameters for DeckReturnCard2.
type DeckReturnCardJSONBody ¶
type DeckReturnCardJSONBody Card
DeckReturnCardJSONBody defines parameters for DeckReturnCard.
type DeckReturnCardJSONRequestBody ¶
type DeckReturnCardJSONRequestBody DeckReturnCardJSONBody
DeckReturnCardJSONRequestBody defines body for DeckReturnCard for application/json ContentType.
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 ServerInterface ¶
type ServerInterface interface { // Get documentation index.html that describes this api // (GET /) Index(ctx echo.Context) error // Get the current state of the deck // (GET /cards) DeckShow(ctx echo.Context) error // Deal the top card by removing it from the deck (in-browser testing helper) // (GET /cards/deal) DeckDealCard2(ctx echo.Context) error // Deal the top card by removing it from the deck // (POST /cards/deal) DeckDealCard(ctx echo.Context) error // Return the card specified in the '?card=' parameter to the back of the deck (in-browser testing helper) // (GET /cards/return) DeckReturnCard2(ctx echo.Context, params DeckReturnCard2Params) error // Return the card specified in the body to the back of the deck // (POST /cards/return) DeckReturnCard(ctx echo.Context) error // Permute the deck in an unbiased way (in-browser testing helper) // (GET /cards/shuffle) DeckShuffle2(ctx echo.Context) error // Permute the deck in an unbiased way // (POST /cards/shuffle) DeckShuffle(ctx echo.Context) error }
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
}
ServerInterfaceWrapper converts echo contexts to parameters.
func (*ServerInterfaceWrapper) DeckDealCard ¶
func (w *ServerInterfaceWrapper) DeckDealCard(ctx echo.Context) error
DeckDealCard converts echo context to params.
func (*ServerInterfaceWrapper) DeckDealCard2 ¶
func (w *ServerInterfaceWrapper) DeckDealCard2(ctx echo.Context) error
DeckDealCard2 converts echo context to params.
func (*ServerInterfaceWrapper) DeckReturnCard ¶
func (w *ServerInterfaceWrapper) DeckReturnCard(ctx echo.Context) error
DeckReturnCard converts echo context to params.
func (*ServerInterfaceWrapper) DeckReturnCard2 ¶
func (w *ServerInterfaceWrapper) DeckReturnCard2(ctx echo.Context) error
DeckReturnCard2 converts echo context to params.
func (*ServerInterfaceWrapper) DeckShow ¶
func (w *ServerInterfaceWrapper) DeckShow(ctx echo.Context) error
DeckShow converts echo context to params.
func (*ServerInterfaceWrapper) DeckShuffle ¶
func (w *ServerInterfaceWrapper) DeckShuffle(ctx echo.Context) error
DeckShuffle converts echo context to params.
func (*ServerInterfaceWrapper) DeckShuffle2 ¶
func (w *ServerInterfaceWrapper) DeckShuffle2(ctx echo.Context) error
DeckShuffle2 converts echo context to params.
func (*ServerInterfaceWrapper) Index ¶
func (w *ServerInterfaceWrapper) Index(ctx echo.Context) error
Index converts echo context to params.