Documentation ¶
Overview ¶
Package api provides primitives to interact the openapi HTTP API.
Code generated by github.com/StevenACoffman/oapi-codegen DO NOT EDIT.
Index ¶
- func AddPetCtx(next http.Handler) http.Handler
- func DeletePetCtx(next http.Handler) http.Handler
- func FindPetByIdCtx(next http.Handler) http.Handler
- func FindPetsCtx(next http.Handler) http.Handler
- func GetSwagger() (*openapi3.Swagger, error)
- func Handler(si ServerInterface) http.Handler
- type AddPetJSONBody
- type AddPetJSONRequestBody
- type Error
- type FindPetsParams
- type NewPet
- type Pet
- type PetStore
- type ServerInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeletePetCtx ¶
DeletePet operation middleware
func FindPetByIdCtx ¶
FindPetById operation middleware
func GetSwagger ¶
GetSwagger returns the Swagger specification corresponding to the generated code in this file.
func Handler ¶
func Handler(si ServerInterface) http.Handler
Handler creates http.Handler with routing matching OpenAPI spec.
Types ¶
type AddPetJSONRequestBody ¶
type AddPetJSONRequestBody AddPetJSONBody
AddPetRequestBody defines body for AddPet for application/json ContentType.
type FindPetsParams ¶
type FindPetsParams struct { // tags to filter by Tags *[]string `json:"tags,omitempty"` // maximum number of results to return Limit *int32 `json:"limit,omitempty"` }
FindPetsParams defines parameters for FindPets.
func ParamsForFindPets ¶
func ParamsForFindPets(ctx context.Context) *FindPetsParams
ParamsForFindPets operation parameters from context
type Pet ¶
type Pet struct { // Embedded struct due to allOf(#/components/schemas/NewPet) NewPet // Embedded fields due to inline allOf schema Id int64 `json:"id"` }
Pet defines model for Pet.
type PetStore ¶
func NewPetStore ¶
func NewPetStore() *PetStore
func (*PetStore) FindPetById ¶
func (p *PetStore) FindPetById(w http.ResponseWriter, r *http.Request)
type ServerInterface ¶
type ServerInterface interface { // (GET /pets) FindPets(w http.ResponseWriter, r *http.Request) // (POST /pets) AddPet(w http.ResponseWriter, r *http.Request) // (DELETE /pets/{id}) DeletePet(w http.ResponseWriter, r *http.Request) // (GET /pets/{id}) FindPetById(w http.ResponseWriter, r *http.Request) }
Click to show internal directories.
Click to hide internal directories.