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.
Index ¶
- func GetSwagger() (*openapi3.Swagger, error)
- func RegisterHandlers(router EchoRouter, si ServerInterface)
- func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL string)
- type AddPetJSONBody
- type AddPetJSONRequestBody
- type EchoRouter
- type Error
- type Pet
- type PetRequest
- type ServerInterface
- type ServerInterfaceWrapper
- func (w *ServerInterfaceWrapper) AddPet(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) DeletePet(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetPetById(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) GetPets(ctx echo.Context) error
- func (w *ServerInterfaceWrapper) UpdatePetById(ctx echo.Context) error
- type UpdatePetByIdJSONBody
- type UpdatePetByIdJSONRequestBody
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.
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 AddPetJSONRequestBody ¶
type AddPetJSONRequestBody AddPetJSONBody
AddPetJSONRequestBody defines body for AddPet 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 Pet ¶
type Pet struct { // Embedded struct due to allOf(#/components/schemas/PetRequest) PetRequest `yaml:",inline"` // Unique id of the pet Id int64 `json:"id"` }
Pet defines model for Pet.
type PetRequest ¶
type PetRequest struct { Name string `json:"name"` // pet status in the store Status *string `json:"status,omitempty"` }
PetRequest defines model for PetRequest.
type ServerInterface ¶
type ServerInterface interface { // Return all pets in the store // (GET /pet) GetPets(ctx echo.Context) error // Add a new pet to the store // (POST /pet) AddPet(ctx echo.Context) error // Deletes a pet // (DELETE /pet/{petId}) DeletePet(ctx echo.Context, petId int64) error // Find pet by ID // (GET /pet/{petId}) GetPetById(ctx echo.Context, petId int64) error // Updates a pet in the store with form data // (PUT /pet/{petId}) UpdatePetById(ctx echo.Context, petId int64) error }
ServerInterface represents all server handlers.
type ServerInterfaceWrapper ¶
type ServerInterfaceWrapper struct {
Handler ServerInterface
}
ServerInterfaceWrapper converts echo contexts to parameters.
func (*ServerInterfaceWrapper) AddPet ¶
func (w *ServerInterfaceWrapper) AddPet(ctx echo.Context) error
AddPet converts echo context to params.
func (*ServerInterfaceWrapper) DeletePet ¶
func (w *ServerInterfaceWrapper) DeletePet(ctx echo.Context) error
DeletePet converts echo context to params.
func (*ServerInterfaceWrapper) GetPetById ¶
func (w *ServerInterfaceWrapper) GetPetById(ctx echo.Context) error
GetPetById converts echo context to params.
func (*ServerInterfaceWrapper) GetPets ¶
func (w *ServerInterfaceWrapper) GetPets(ctx echo.Context) error
GetPets converts echo context to params.
func (*ServerInterfaceWrapper) UpdatePetById ¶
func (w *ServerInterfaceWrapper) UpdatePetById(ctx echo.Context) error
UpdatePetById converts echo context to params.
type UpdatePetByIdJSONBody ¶
type UpdatePetByIdJSONBody PetRequest
UpdatePetByIdJSONBody defines parameters for UpdatePetById.
type UpdatePetByIdJSONRequestBody ¶
type UpdatePetByIdJSONRequestBody UpdatePetByIdJSONBody
UpdatePetByIdJSONRequestBody defines body for UpdatePetById for application/json ContentType.