pet

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 14, 2015 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddPet

type AddPet struct {
	Context *middleware.Context
	Params  AddPetParams
	Handler AddPetHandler
}

AddPet swagger:route POST /pets pet addPet

Add a new pet to the store

func NewAddPet

func NewAddPet(ctx *middleware.Context, handler AddPetHandler) *AddPet

NewAddPet creates a new http.Handler for the add pet operation

func (*AddPet) ServeHTTP

func (o *AddPet) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type AddPetHandler

type AddPetHandler interface {
	Handle(AddPetParams, interface{}) middleware.Responder
}

AddPetHandler interface for that can handle valid add pet params

type AddPetHandlerFunc

type AddPetHandlerFunc func(AddPetParams, interface{}) middleware.Responder

AddPetHandlerFunc turns a function with the right signature into a add pet handler

func (AddPetHandlerFunc) Handle

func (fn AddPetHandlerFunc) Handle(params AddPetParams, principal interface{}) middleware.Responder

Handle executing the request and returning a response

type AddPetMethodNotAllowed

type AddPetMethodNotAllowed struct {
}

AddPetMethodNotAllowed Invalid input

swagger:response addPetMethodNotAllowed

func (*AddPetMethodNotAllowed) WriteResponse

func (o *AddPetMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type AddPetParams

type AddPetParams struct {
	/*Pet object that needs to be added to the store
	  In: body
	*/
	Body *models.Pet
}

AddPetParams contains all the bound params for the add pet operation typically these are obtained from a http.Request

swagger:parameters addPet

func (*AddPetParams) BindRequest

func (o *AddPetParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls

type DeletePet

type DeletePet struct {
	Context *middleware.Context
	Params  DeletePetParams
	Handler DeletePetHandler
}

DeletePet swagger:route DELETE /pets/{petId} pet deletePet

Deletes a pet

func NewDeletePet

func NewDeletePet(ctx *middleware.Context, handler DeletePetHandler) *DeletePet

NewDeletePet creates a new http.Handler for the delete pet operation

func (*DeletePet) ServeHTTP

func (o *DeletePet) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type DeletePetBadRequest

type DeletePetBadRequest struct {
}

DeletePetBadRequest Invalid pet value

swagger:response deletePetBadRequest

func (*DeletePetBadRequest) WriteResponse

func (o *DeletePetBadRequest) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type DeletePetHandler

type DeletePetHandler interface {
	Handle(DeletePetParams, interface{}) middleware.Responder
}

DeletePetHandler interface for that can handle valid delete pet params

type DeletePetHandlerFunc

type DeletePetHandlerFunc func(DeletePetParams, interface{}) middleware.Responder

DeletePetHandlerFunc turns a function with the right signature into a delete pet handler

func (DeletePetHandlerFunc) Handle

func (fn DeletePetHandlerFunc) Handle(params DeletePetParams, principal interface{}) middleware.Responder

Handle executing the request and returning a response

type DeletePetParams

type DeletePetParams struct {
	/*
	  Required: true
	  In: header
	*/
	APIKey string
	/*Pet id to delete
	  Required: true
	  In: path
	*/
	PetID int64
}

DeletePetParams contains all the bound params for the delete pet operation typically these are obtained from a http.Request

swagger:parameters deletePet

func (*DeletePetParams) BindRequest

func (o *DeletePetParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls

type FindPetsByStatus

type FindPetsByStatus struct {
	Context *middleware.Context
	Params  FindPetsByStatusParams
	Handler FindPetsByStatusHandler
}

FindPetsByStatus swagger:route GET /pets/findByStatus pet findPetsByStatus

Finds Pets by status

Multiple status values can be provided with comma seperated strings

func NewFindPetsByStatus

func NewFindPetsByStatus(ctx *middleware.Context, handler FindPetsByStatusHandler) *FindPetsByStatus

NewFindPetsByStatus creates a new http.Handler for the find pets by status operation

func (*FindPetsByStatus) ServeHTTP

func (o *FindPetsByStatus) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type FindPetsByStatusBadRequest

type FindPetsByStatusBadRequest struct {
}

FindPetsByStatusBadRequest Invalid status value

swagger:response findPetsByStatusBadRequest

func (*FindPetsByStatusBadRequest) WriteResponse

func (o *FindPetsByStatusBadRequest) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type FindPetsByStatusHandler

type FindPetsByStatusHandler interface {
	Handle(FindPetsByStatusParams, interface{}) middleware.Responder
}

FindPetsByStatusHandler interface for that can handle valid find pets by status params

type FindPetsByStatusHandlerFunc

type FindPetsByStatusHandlerFunc func(FindPetsByStatusParams, interface{}) middleware.Responder

FindPetsByStatusHandlerFunc turns a function with the right signature into a find pets by status handler

func (FindPetsByStatusHandlerFunc) Handle

func (fn FindPetsByStatusHandlerFunc) Handle(params FindPetsByStatusParams, principal interface{}) middleware.Responder

Handle executing the request and returning a response

type FindPetsByStatusOK

type FindPetsByStatusOK struct {

	// In: body
	Payload []*models.Pet `json:"body,omitempty"`
}

FindPetsByStatusOK successful operation

swagger:response findPetsByStatusOK

func (*FindPetsByStatusOK) WriteResponse

func (o *FindPetsByStatusOK) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type FindPetsByStatusParams

type FindPetsByStatusParams struct {
	/*Status values that need to be considered for filter
	  In: query
	  Collection Format: multi
	*/
	Status []string
}

FindPetsByStatusParams contains all the bound params for the find pets by status operation typically these are obtained from a http.Request

swagger:parameters findPetsByStatus

func (*FindPetsByStatusParams) BindRequest

func (o *FindPetsByStatusParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls

type FindPetsByTags

type FindPetsByTags struct {
	Context *middleware.Context
	Params  FindPetsByTagsParams
	Handler FindPetsByTagsHandler
}

FindPetsByTags swagger:route GET /pets/findByTags pet findPetsByTags

Finds Pets by tags

Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.

func NewFindPetsByTags

func NewFindPetsByTags(ctx *middleware.Context, handler FindPetsByTagsHandler) *FindPetsByTags

NewFindPetsByTags creates a new http.Handler for the find pets by tags operation

func (*FindPetsByTags) ServeHTTP

func (o *FindPetsByTags) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type FindPetsByTagsBadRequest

type FindPetsByTagsBadRequest struct {
}

FindPetsByTagsBadRequest Invalid tag value

swagger:response findPetsByTagsBadRequest

func (*FindPetsByTagsBadRequest) WriteResponse

func (o *FindPetsByTagsBadRequest) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type FindPetsByTagsHandler

type FindPetsByTagsHandler interface {
	Handle(FindPetsByTagsParams, interface{}) middleware.Responder
}

FindPetsByTagsHandler interface for that can handle valid find pets by tags params

type FindPetsByTagsHandlerFunc

type FindPetsByTagsHandlerFunc func(FindPetsByTagsParams, interface{}) middleware.Responder

FindPetsByTagsHandlerFunc turns a function with the right signature into a find pets by tags handler

func (FindPetsByTagsHandlerFunc) Handle

func (fn FindPetsByTagsHandlerFunc) Handle(params FindPetsByTagsParams, principal interface{}) middleware.Responder

Handle executing the request and returning a response

type FindPetsByTagsOK

type FindPetsByTagsOK struct {

	// In: body
	Payload []*models.Pet `json:"body,omitempty"`
}

FindPetsByTagsOK successful operation

swagger:response findPetsByTagsOK

func (*FindPetsByTagsOK) WriteResponse

func (o *FindPetsByTagsOK) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type FindPetsByTagsParams

type FindPetsByTagsParams struct {
	/*Tags to filter by
	  In: query
	  Collection Format: multi
	*/
	Tags []string
}

FindPetsByTagsParams contains all the bound params for the find pets by tags operation typically these are obtained from a http.Request

swagger:parameters findPetsByTags

func (*FindPetsByTagsParams) BindRequest

func (o *FindPetsByTagsParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls

type GetPetByID

type GetPetByID struct {
	Context *middleware.Context
	Params  GetPetByIDParams
	Handler GetPetByIDHandler
}

GetPetByID swagger:route GET /pets/{petId} pet getPetById

Find pet by ID

Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions

func NewGetPetByID

func NewGetPetByID(ctx *middleware.Context, handler GetPetByIDHandler) *GetPetByID

NewGetPetByID creates a new http.Handler for the get pet by id operation

func (*GetPetByID) ServeHTTP

func (o *GetPetByID) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type GetPetByIDBadRequest

type GetPetByIDBadRequest struct {
}

GetPetByIDBadRequest Invalid ID supplied

swagger:response getPetByIdBadRequest

func (*GetPetByIDBadRequest) WriteResponse

func (o *GetPetByIDBadRequest) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type GetPetByIDHandler

type GetPetByIDHandler interface {
	Handle(GetPetByIDParams, interface{}) middleware.Responder
}

GetPetByIDHandler interface for that can handle valid get pet by id params

type GetPetByIDHandlerFunc

type GetPetByIDHandlerFunc func(GetPetByIDParams, interface{}) middleware.Responder

GetPetByIDHandlerFunc turns a function with the right signature into a get pet by id handler

func (GetPetByIDHandlerFunc) Handle

func (fn GetPetByIDHandlerFunc) Handle(params GetPetByIDParams, principal interface{}) middleware.Responder

Handle executing the request and returning a response

type GetPetByIDNotFound

type GetPetByIDNotFound struct {
}

GetPetByIDNotFound Pet not found

swagger:response getPetByIdNotFound

func (*GetPetByIDNotFound) WriteResponse

func (o *GetPetByIDNotFound) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type GetPetByIDOK

type GetPetByIDOK struct {

	// In: body
	Payload *models.Pet `json:"body,omitempty"`
}

GetPetByIDOK successful operation

swagger:response getPetByIdOK

func (*GetPetByIDOK) WriteResponse

func (o *GetPetByIDOK) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type GetPetByIDParams

type GetPetByIDParams struct {
	/*ID of pet that needs to be fetched
	  Required: true
	  In: path
	*/
	PetID int64
}

GetPetByIDParams contains all the bound params for the get pet by id operation typically these are obtained from a http.Request

swagger:parameters getPetById

func (*GetPetByIDParams) BindRequest

func (o *GetPetByIDParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls

type UpdatePet

type UpdatePet struct {
	Context *middleware.Context
	Params  UpdatePetParams
	Handler UpdatePetHandler
}

UpdatePet swagger:route PUT /pets pet updatePet

Update an existing pet

func NewUpdatePet

func NewUpdatePet(ctx *middleware.Context, handler UpdatePetHandler) *UpdatePet

NewUpdatePet creates a new http.Handler for the update pet operation

func (*UpdatePet) ServeHTTP

func (o *UpdatePet) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type UpdatePetBadRequest

type UpdatePetBadRequest struct {
}

UpdatePetBadRequest Invalid ID supplied

swagger:response updatePetBadRequest

func (*UpdatePetBadRequest) WriteResponse

func (o *UpdatePetBadRequest) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type UpdatePetHandler

type UpdatePetHandler interface {
	Handle(UpdatePetParams, interface{}) middleware.Responder
}

UpdatePetHandler interface for that can handle valid update pet params

type UpdatePetHandlerFunc

type UpdatePetHandlerFunc func(UpdatePetParams, interface{}) middleware.Responder

UpdatePetHandlerFunc turns a function with the right signature into a update pet handler

func (UpdatePetHandlerFunc) Handle

func (fn UpdatePetHandlerFunc) Handle(params UpdatePetParams, principal interface{}) middleware.Responder

Handle executing the request and returning a response

type UpdatePetMethodNotAllowed

type UpdatePetMethodNotAllowed struct {
}

UpdatePetMethodNotAllowed Validation exception

swagger:response updatePetMethodNotAllowed

func (*UpdatePetMethodNotAllowed) WriteResponse

func (o *UpdatePetMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type UpdatePetNotFound

type UpdatePetNotFound struct {
}

UpdatePetNotFound Pet not found

swagger:response updatePetNotFound

func (*UpdatePetNotFound) WriteResponse

func (o *UpdatePetNotFound) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type UpdatePetParams

type UpdatePetParams struct {
	/*Pet object that needs to be added to the store
	  In: body
	*/
	Body *models.Pet
}

UpdatePetParams contains all the bound params for the update pet operation typically these are obtained from a http.Request

swagger:parameters updatePet

func (*UpdatePetParams) BindRequest

func (o *UpdatePetParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls

type UpdatePetWithForm

type UpdatePetWithForm struct {
	Context *middleware.Context
	Params  UpdatePetWithFormParams
	Handler UpdatePetWithFormHandler
}

UpdatePetWithForm swagger:route POST /pets/{petId} pet updatePetWithForm

Updates a pet in the store with form data

func NewUpdatePetWithForm

func NewUpdatePetWithForm(ctx *middleware.Context, handler UpdatePetWithFormHandler) *UpdatePetWithForm

NewUpdatePetWithForm creates a new http.Handler for the update pet with form operation

func (*UpdatePetWithForm) ServeHTTP

func (o *UpdatePetWithForm) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type UpdatePetWithFormHandler

type UpdatePetWithFormHandler interface {
	Handle(UpdatePetWithFormParams, interface{}) middleware.Responder
}

UpdatePetWithFormHandler interface for that can handle valid update pet with form params

type UpdatePetWithFormHandlerFunc

type UpdatePetWithFormHandlerFunc func(UpdatePetWithFormParams, interface{}) middleware.Responder

UpdatePetWithFormHandlerFunc turns a function with the right signature into a update pet with form handler

func (UpdatePetWithFormHandlerFunc) Handle

func (fn UpdatePetWithFormHandlerFunc) Handle(params UpdatePetWithFormParams, principal interface{}) middleware.Responder

Handle executing the request and returning a response

type UpdatePetWithFormMethodNotAllowed

type UpdatePetWithFormMethodNotAllowed struct {
}

UpdatePetWithFormMethodNotAllowed Invalid input

swagger:response updatePetWithFormMethodNotAllowed

func (*UpdatePetWithFormMethodNotAllowed) WriteResponse

func (o *UpdatePetWithFormMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type UpdatePetWithFormParams

type UpdatePetWithFormParams struct {
	/*Updated name of the pet
	  Required: true
	  In: formData
	*/
	Name string
	/*ID of pet that needs to be updated
	  Required: true
	  In: path
	*/
	PetID string
	/*Updated status of the pet
	  Required: true
	  In: formData
	*/
	Status string
}

UpdatePetWithFormParams contains all the bound params for the update pet with form operation typically these are obtained from a http.Request

swagger:parameters updatePetWithForm

func (*UpdatePetWithFormParams) BindRequest

func (o *UpdatePetWithFormParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL