pet

package
v0.0.0-...-c3eecff Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2015 License: Apache-2.0 Imports: 7 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
}

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, *models.User) error
}

AddPetHandler interface for that can handle valid add pet params

type AddPetHandlerFunc

type AddPetHandlerFunc func(AddPetParams, *models.User) error

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

func (AddPetHandlerFunc) Handle

func (fn AddPetHandlerFunc) Handle(params AddPetParams, principal *models.User) error

type AddPetParams

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

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

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
}

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 DeletePetHandler

type DeletePetHandler interface {
	Handle(DeletePetParams, *models.User) error
}

DeletePetHandler interface for that can handle valid delete pet params

type DeletePetHandlerFunc

type DeletePetHandlerFunc func(DeletePetParams, *models.User) error

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

func (DeletePetHandlerFunc) Handle

func (fn DeletePetHandlerFunc) Handle(params DeletePetParams, principal *models.User) error

type DeletePetParams

type DeletePetParams struct {
	APIKey string
	// Pet id to delete
	PetID int64
}

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

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
}

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 FindPetsByStatusHandler

type FindPetsByStatusHandler interface {
	Handle(FindPetsByStatusParams, *models.User) ([]models.Pet, error)
}

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

type FindPetsByStatusHandlerFunc

type FindPetsByStatusHandlerFunc func(FindPetsByStatusParams, *models.User) ([]models.Pet, error)

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 *models.User) ([]models.Pet, error)

type FindPetsByStatusParams

type FindPetsByStatusParams struct {
	// Status values that need to be considered for filter
	Status []string
}

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

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
}

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 FindPetsByTagsHandler

type FindPetsByTagsHandler interface {
	Handle(FindPetsByTagsParams, *models.User) ([]models.Pet, error)
}

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

type FindPetsByTagsHandlerFunc

type FindPetsByTagsHandlerFunc func(FindPetsByTagsParams, *models.User) ([]models.Pet, error)

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 *models.User) ([]models.Pet, error)

type FindPetsByTagsParams

type FindPetsByTagsParams struct {
	// Tags to filter by
	Tags []string
}

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

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
}

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 GetPetByIDHandler

type GetPetByIDHandler interface {
	Handle(GetPetByIDParams, *models.User) (*models.Pet, error)
}

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

type GetPetByIDHandlerFunc

type GetPetByIDHandlerFunc func(GetPetByIDParams, *models.User) (*models.Pet, error)

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 *models.User) (*models.Pet, error)

type GetPetByIDParams

type GetPetByIDParams struct {
	// ID of pet that needs to be fetched
	PetID int64
}

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

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
}

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 UpdatePetHandler

type UpdatePetHandler interface {
	Handle(UpdatePetParams, *models.User) error
}

UpdatePetHandler interface for that can handle valid update pet params

type UpdatePetHandlerFunc

type UpdatePetHandlerFunc func(UpdatePetParams, *models.User) error

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

func (UpdatePetHandlerFunc) Handle

func (fn UpdatePetHandlerFunc) Handle(params UpdatePetParams, principal *models.User) error

type UpdatePetParams

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

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

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
}

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, *models.User) error
}

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

type UpdatePetWithFormHandlerFunc

type UpdatePetWithFormHandlerFunc func(UpdatePetWithFormParams, *models.User) error

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

func (UpdatePetWithFormHandlerFunc) Handle

type UpdatePetWithFormParams

type UpdatePetWithFormParams struct {
	// ID of pet that needs to be updated
	PetID string
	// Updated name of the pet
	Name string
	// Updated status of the pet
	Status string
}

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

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