go-swagger: github.com/go-swagger/go-swagger/examples/generated/restapi/operations/pet Index | Files

package pet

import "github.com/go-swagger/go-swagger/examples/generated/restapi/operations/pet"

Index

Package Files

add_pet.go add_pet_parameters.go add_pet_responses.go add_pet_urlbuilder.go delete_pet.go delete_pet_parameters.go delete_pet_responses.go delete_pet_urlbuilder.go find_pets_by_status.go find_pets_by_status_parameters.go find_pets_by_status_responses.go find_pets_by_status_urlbuilder.go find_pets_by_tags.go find_pets_by_tags_parameters.go find_pets_by_tags_responses.go find_pets_by_tags_urlbuilder.go get_pet_by_id.go get_pet_by_id_parameters.go get_pet_by_id_responses.go get_pet_by_id_urlbuilder.go update_pet.go update_pet_parameters.go update_pet_responses.go update_pet_urlbuilder.go update_pet_with_form.go update_pet_with_form_parameters.go update_pet_with_form_responses.go update_pet_with_form_urlbuilder.go

Constants

const AddPetMethodNotAllowedCode int = 405

AddPetMethodNotAllowedCode is the HTTP code returned for type AddPetMethodNotAllowed

const DeletePetBadRequestCode int = 400

DeletePetBadRequestCode is the HTTP code returned for type DeletePetBadRequest

const FindPetsByStatusBadRequestCode int = 400

FindPetsByStatusBadRequestCode is the HTTP code returned for type FindPetsByStatusBadRequest

const FindPetsByStatusOKCode int = 200

FindPetsByStatusOKCode is the HTTP code returned for type FindPetsByStatusOK

const FindPetsByTagsBadRequestCode int = 400

FindPetsByTagsBadRequestCode is the HTTP code returned for type FindPetsByTagsBadRequest

const FindPetsByTagsOKCode int = 200

FindPetsByTagsOKCode is the HTTP code returned for type FindPetsByTagsOK

const GetPetByIDBadRequestCode int = 400

GetPetByIDBadRequestCode is the HTTP code returned for type GetPetByIDBadRequest

const GetPetByIDNotFoundCode int = 404

GetPetByIDNotFoundCode is the HTTP code returned for type GetPetByIDNotFound

const GetPetByIDOKCode int = 200

GetPetByIDOKCode is the HTTP code returned for type GetPetByIDOK

const UpdatePetBadRequestCode int = 400

UpdatePetBadRequestCode is the HTTP code returned for type UpdatePetBadRequest

const UpdatePetMethodNotAllowedCode int = 405

UpdatePetMethodNotAllowedCode is the HTTP code returned for type UpdatePetMethodNotAllowed

const UpdatePetNotFoundCode int = 404

UpdatePetNotFoundCode is the HTTP code returned for type UpdatePetNotFound

const UpdatePetWithFormMethodNotAllowedCode int = 405

UpdatePetWithFormMethodNotAllowedCode is the HTTP code returned for type UpdatePetWithFormMethodNotAllowed

type AddPet Uses

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

AddPet swagger:route POST /pets pet addPet

Add a new pet to the store

func NewAddPet Uses

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

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

func (*AddPet) ServeHTTP Uses

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

type AddPetHandler Uses

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

AddPetHandler interface for that can handle valid add pet params

type AddPetHandlerFunc Uses

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

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

func (AddPetHandlerFunc) Handle Uses

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

Handle executing the request and returning a response

type AddPetMethodNotAllowed Uses

type AddPetMethodNotAllowed struct {
}

AddPetMethodNotAllowed Invalid input

swagger:response addPetMethodNotAllowed

func NewAddPetMethodNotAllowed Uses

func NewAddPetMethodNotAllowed() *AddPetMethodNotAllowed

NewAddPetMethodNotAllowed creates AddPetMethodNotAllowed with default headers values

func (*AddPetMethodNotAllowed) WriteResponse Uses

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

WriteResponse to the client

type AddPetParams Uses

type AddPetParams struct {

    // HTTP Request Object
    HTTPRequest *http.Request `json:"-"`

    /*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 NewAddPetParams Uses

func NewAddPetParams() AddPetParams

NewAddPetParams creates a new AddPetParams object no default values defined in spec.

func (*AddPetParams) BindRequest Uses

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.

To ensure default values, the struct must have been initialized with NewAddPetParams() beforehand.

type AddPetURL Uses

type AddPetURL struct {
    // contains filtered or unexported fields
}

AddPetURL generates an URL for the add pet operation

func (*AddPetURL) Build Uses

func (o *AddPetURL) Build() (*url.URL, error)

Build a url path and query string

func (*AddPetURL) BuildFull Uses

func (o *AddPetURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*AddPetURL) Must Uses

func (o *AddPetURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*AddPetURL) SetBasePath Uses

func (o *AddPetURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*AddPetURL) String Uses

func (o *AddPetURL) String() string

String returns the string representation of the path with query string

func (*AddPetURL) StringFull Uses

func (o *AddPetURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*AddPetURL) WithBasePath Uses

func (o *AddPetURL) WithBasePath(bp string) *AddPetURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type DeletePet Uses

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

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

Deletes a pet

func NewDeletePet Uses

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

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

func (*DeletePet) ServeHTTP Uses

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

type DeletePetBadRequest Uses

type DeletePetBadRequest struct {
}

DeletePetBadRequest Invalid pet value

swagger:response deletePetBadRequest

func NewDeletePetBadRequest Uses

func NewDeletePetBadRequest() *DeletePetBadRequest

NewDeletePetBadRequest creates DeletePetBadRequest with default headers values

func (*DeletePetBadRequest) WriteResponse Uses

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

WriteResponse to the client

type DeletePetHandler Uses

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

DeletePetHandler interface for that can handle valid delete pet params

type DeletePetHandlerFunc Uses

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

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

func (DeletePetHandlerFunc) Handle Uses

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

Handle executing the request and returning a response

type DeletePetParams Uses

type DeletePetParams struct {

    // HTTP Request Object
    HTTPRequest *http.Request `json:"-"`

    /*
      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 NewDeletePetParams Uses

func NewDeletePetParams() DeletePetParams

NewDeletePetParams creates a new DeletePetParams object no default values defined in spec.

func (*DeletePetParams) BindRequest Uses

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.

To ensure default values, the struct must have been initialized with NewDeletePetParams() beforehand.

type DeletePetURL Uses

type DeletePetURL struct {
    PetID int64
    // contains filtered or unexported fields
}

DeletePetURL generates an URL for the delete pet operation

func (*DeletePetURL) Build Uses

func (o *DeletePetURL) Build() (*url.URL, error)

Build a url path and query string

func (*DeletePetURL) BuildFull Uses

func (o *DeletePetURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*DeletePetURL) Must Uses

func (o *DeletePetURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*DeletePetURL) SetBasePath Uses

func (o *DeletePetURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*DeletePetURL) String Uses

func (o *DeletePetURL) String() string

String returns the string representation of the path with query string

func (*DeletePetURL) StringFull Uses

func (o *DeletePetURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*DeletePetURL) WithBasePath Uses

func (o *DeletePetURL) WithBasePath(bp string) *DeletePetURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type FindPetsByStatus Uses

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

FindPetsByStatus swagger:route GET /pets/findByStatus pet findPetsByStatus

Finds Pets by status

Multiple status values can be provided with comma separated strings

func NewFindPetsByStatus Uses

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

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

func (*FindPetsByStatus) ServeHTTP Uses

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

type FindPetsByStatusBadRequest Uses

type FindPetsByStatusBadRequest struct {
}

FindPetsByStatusBadRequest Invalid status value

swagger:response findPetsByStatusBadRequest

func NewFindPetsByStatusBadRequest Uses

func NewFindPetsByStatusBadRequest() *FindPetsByStatusBadRequest

NewFindPetsByStatusBadRequest creates FindPetsByStatusBadRequest with default headers values

func (*FindPetsByStatusBadRequest) WriteResponse Uses

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

WriteResponse to the client

type FindPetsByStatusHandler Uses

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

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

type FindPetsByStatusHandlerFunc Uses

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 Uses

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

Handle executing the request and returning a response

type FindPetsByStatusOK Uses

type FindPetsByStatusOK struct {

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

FindPetsByStatusOK successful operation

swagger:response findPetsByStatusOK

func NewFindPetsByStatusOK Uses

func NewFindPetsByStatusOK() *FindPetsByStatusOK

NewFindPetsByStatusOK creates FindPetsByStatusOK with default headers values

func (*FindPetsByStatusOK) SetPayload Uses

func (o *FindPetsByStatusOK) SetPayload(payload []*models.Pet)

SetPayload sets the payload to the find pets by status o k response

func (*FindPetsByStatusOK) WithPayload Uses

func (o *FindPetsByStatusOK) WithPayload(payload []*models.Pet) *FindPetsByStatusOK

WithPayload adds the payload to the find pets by status o k response

func (*FindPetsByStatusOK) WriteResponse Uses

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

WriteResponse to the client

type FindPetsByStatusParams Uses

type FindPetsByStatusParams struct {

    // HTTP Request Object
    HTTPRequest *http.Request `json:"-"`

    /*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 NewFindPetsByStatusParams Uses

func NewFindPetsByStatusParams() FindPetsByStatusParams

NewFindPetsByStatusParams creates a new FindPetsByStatusParams object no default values defined in spec.

func (*FindPetsByStatusParams) BindRequest Uses

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.

To ensure default values, the struct must have been initialized with NewFindPetsByStatusParams() beforehand.

type FindPetsByStatusURL Uses

type FindPetsByStatusURL struct {
    Status []string
    // contains filtered or unexported fields
}

FindPetsByStatusURL generates an URL for the find pets by status operation

func (*FindPetsByStatusURL) Build Uses

func (o *FindPetsByStatusURL) Build() (*url.URL, error)

Build a url path and query string

func (*FindPetsByStatusURL) BuildFull Uses

func (o *FindPetsByStatusURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*FindPetsByStatusURL) Must Uses

func (o *FindPetsByStatusURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*FindPetsByStatusURL) SetBasePath Uses

func (o *FindPetsByStatusURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*FindPetsByStatusURL) String Uses

func (o *FindPetsByStatusURL) String() string

String returns the string representation of the path with query string

func (*FindPetsByStatusURL) StringFull Uses

func (o *FindPetsByStatusURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*FindPetsByStatusURL) WithBasePath Uses

func (o *FindPetsByStatusURL) WithBasePath(bp string) *FindPetsByStatusURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type FindPetsByTags Uses

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

FindPetsByTags swagger:route GET /pets/findByTags pet findPetsByTags

Finds Pets by tags

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

func NewFindPetsByTags Uses

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

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

func (*FindPetsByTags) ServeHTTP Uses

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

type FindPetsByTagsBadRequest Uses

type FindPetsByTagsBadRequest struct {
}

FindPetsByTagsBadRequest Invalid tag value

swagger:response findPetsByTagsBadRequest

func NewFindPetsByTagsBadRequest Uses

func NewFindPetsByTagsBadRequest() *FindPetsByTagsBadRequest

NewFindPetsByTagsBadRequest creates FindPetsByTagsBadRequest with default headers values

func (*FindPetsByTagsBadRequest) WriteResponse Uses

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

WriteResponse to the client

type FindPetsByTagsHandler Uses

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

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

type FindPetsByTagsHandlerFunc Uses

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 Uses

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

Handle executing the request and returning a response

type FindPetsByTagsOK Uses

type FindPetsByTagsOK struct {

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

FindPetsByTagsOK successful operation

swagger:response findPetsByTagsOK

func NewFindPetsByTagsOK Uses

func NewFindPetsByTagsOK() *FindPetsByTagsOK

NewFindPetsByTagsOK creates FindPetsByTagsOK with default headers values

func (*FindPetsByTagsOK) SetPayload Uses

func (o *FindPetsByTagsOK) SetPayload(payload []*models.Pet)

SetPayload sets the payload to the find pets by tags o k response

func (*FindPetsByTagsOK) WithPayload Uses

func (o *FindPetsByTagsOK) WithPayload(payload []*models.Pet) *FindPetsByTagsOK

WithPayload adds the payload to the find pets by tags o k response

func (*FindPetsByTagsOK) WriteResponse Uses

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

WriteResponse to the client

type FindPetsByTagsParams Uses

type FindPetsByTagsParams struct {

    // HTTP Request Object
    HTTPRequest *http.Request `json:"-"`

    /*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 NewFindPetsByTagsParams Uses

func NewFindPetsByTagsParams() FindPetsByTagsParams

NewFindPetsByTagsParams creates a new FindPetsByTagsParams object no default values defined in spec.

func (*FindPetsByTagsParams) BindRequest Uses

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.

To ensure default values, the struct must have been initialized with NewFindPetsByTagsParams() beforehand.

type FindPetsByTagsURL Uses

type FindPetsByTagsURL struct {
    Tags []string
    // contains filtered or unexported fields
}

FindPetsByTagsURL generates an URL for the find pets by tags operation

func (*FindPetsByTagsURL) Build Uses

func (o *FindPetsByTagsURL) Build() (*url.URL, error)

Build a url path and query string

func (*FindPetsByTagsURL) BuildFull Uses

func (o *FindPetsByTagsURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*FindPetsByTagsURL) Must Uses

func (o *FindPetsByTagsURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*FindPetsByTagsURL) SetBasePath Uses

func (o *FindPetsByTagsURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*FindPetsByTagsURL) String Uses

func (o *FindPetsByTagsURL) String() string

String returns the string representation of the path with query string

func (*FindPetsByTagsURL) StringFull Uses

func (o *FindPetsByTagsURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*FindPetsByTagsURL) WithBasePath Uses

func (o *FindPetsByTagsURL) WithBasePath(bp string) *FindPetsByTagsURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type GetPetByID Uses

type GetPetByID struct {
    Context *middleware.Context
    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 Uses

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

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

func (*GetPetByID) ServeHTTP Uses

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

type GetPetByIDBadRequest Uses

type GetPetByIDBadRequest struct {
}

GetPetByIDBadRequest Invalid ID supplied

swagger:response getPetByIdBadRequest

func NewGetPetByIDBadRequest Uses

func NewGetPetByIDBadRequest() *GetPetByIDBadRequest

NewGetPetByIDBadRequest creates GetPetByIDBadRequest with default headers values

func (*GetPetByIDBadRequest) WriteResponse Uses

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

WriteResponse to the client

type GetPetByIDHandler Uses

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

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

type GetPetByIDHandlerFunc Uses

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 Uses

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

Handle executing the request and returning a response

type GetPetByIDNotFound Uses

type GetPetByIDNotFound struct {
}

GetPetByIDNotFound Pet not found

swagger:response getPetByIdNotFound

func NewGetPetByIDNotFound Uses

func NewGetPetByIDNotFound() *GetPetByIDNotFound

NewGetPetByIDNotFound creates GetPetByIDNotFound with default headers values

func (*GetPetByIDNotFound) WriteResponse Uses

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

WriteResponse to the client

type GetPetByIDOK Uses

type GetPetByIDOK struct {

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

GetPetByIDOK successful operation

swagger:response getPetByIdOK

func NewGetPetByIDOK Uses

func NewGetPetByIDOK() *GetPetByIDOK

NewGetPetByIDOK creates GetPetByIDOK with default headers values

func (*GetPetByIDOK) SetPayload Uses

func (o *GetPetByIDOK) SetPayload(payload *models.Pet)

SetPayload sets the payload to the get pet by Id o k response

func (*GetPetByIDOK) WithPayload Uses

func (o *GetPetByIDOK) WithPayload(payload *models.Pet) *GetPetByIDOK

WithPayload adds the payload to the get pet by Id o k response

func (*GetPetByIDOK) WriteResponse Uses

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

WriteResponse to the client

type GetPetByIDParams Uses

type GetPetByIDParams struct {

    // HTTP Request Object
    HTTPRequest *http.Request `json:"-"`

    /*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 NewGetPetByIDParams Uses

func NewGetPetByIDParams() GetPetByIDParams

NewGetPetByIDParams creates a new GetPetByIDParams object no default values defined in spec.

func (*GetPetByIDParams) BindRequest Uses

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.

To ensure default values, the struct must have been initialized with NewGetPetByIDParams() beforehand.

type GetPetByIDURL Uses

type GetPetByIDURL struct {
    PetID int64
    // contains filtered or unexported fields
}

GetPetByIDURL generates an URL for the get pet by Id operation

func (*GetPetByIDURL) Build Uses

func (o *GetPetByIDURL) Build() (*url.URL, error)

Build a url path and query string

func (*GetPetByIDURL) BuildFull Uses

func (o *GetPetByIDURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*GetPetByIDURL) Must Uses

func (o *GetPetByIDURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*GetPetByIDURL) SetBasePath Uses

func (o *GetPetByIDURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*GetPetByIDURL) String Uses

func (o *GetPetByIDURL) String() string

String returns the string representation of the path with query string

func (*GetPetByIDURL) StringFull Uses

func (o *GetPetByIDURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*GetPetByIDURL) WithBasePath Uses

func (o *GetPetByIDURL) WithBasePath(bp string) *GetPetByIDURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type UpdatePet Uses

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

UpdatePet swagger:route PUT /pets pet updatePet

Update an existing pet

func NewUpdatePet Uses

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

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

func (*UpdatePet) ServeHTTP Uses

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

type UpdatePetBadRequest Uses

type UpdatePetBadRequest struct {
}

UpdatePetBadRequest Invalid ID supplied

swagger:response updatePetBadRequest

func NewUpdatePetBadRequest Uses

func NewUpdatePetBadRequest() *UpdatePetBadRequest

NewUpdatePetBadRequest creates UpdatePetBadRequest with default headers values

func (*UpdatePetBadRequest) WriteResponse Uses

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

WriteResponse to the client

type UpdatePetHandler Uses

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

UpdatePetHandler interface for that can handle valid update pet params

type UpdatePetHandlerFunc Uses

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

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

func (UpdatePetHandlerFunc) Handle Uses

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

Handle executing the request and returning a response

type UpdatePetMethodNotAllowed Uses

type UpdatePetMethodNotAllowed struct {
}

UpdatePetMethodNotAllowed Validation exception

swagger:response updatePetMethodNotAllowed

func NewUpdatePetMethodNotAllowed Uses

func NewUpdatePetMethodNotAllowed() *UpdatePetMethodNotAllowed

NewUpdatePetMethodNotAllowed creates UpdatePetMethodNotAllowed with default headers values

func (*UpdatePetMethodNotAllowed) WriteResponse Uses

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

WriteResponse to the client

type UpdatePetNotFound Uses

type UpdatePetNotFound struct {
}

UpdatePetNotFound Pet not found

swagger:response updatePetNotFound

func NewUpdatePetNotFound Uses

func NewUpdatePetNotFound() *UpdatePetNotFound

NewUpdatePetNotFound creates UpdatePetNotFound with default headers values

func (*UpdatePetNotFound) WriteResponse Uses

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

WriteResponse to the client

type UpdatePetParams Uses

type UpdatePetParams struct {

    // HTTP Request Object
    HTTPRequest *http.Request `json:"-"`

    /*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 NewUpdatePetParams Uses

func NewUpdatePetParams() UpdatePetParams

NewUpdatePetParams creates a new UpdatePetParams object no default values defined in spec.

func (*UpdatePetParams) BindRequest Uses

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.

To ensure default values, the struct must have been initialized with NewUpdatePetParams() beforehand.

type UpdatePetURL Uses

type UpdatePetURL struct {
    // contains filtered or unexported fields
}

UpdatePetURL generates an URL for the update pet operation

func (*UpdatePetURL) Build Uses

func (o *UpdatePetURL) Build() (*url.URL, error)

Build a url path and query string

func (*UpdatePetURL) BuildFull Uses

func (o *UpdatePetURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*UpdatePetURL) Must Uses

func (o *UpdatePetURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*UpdatePetURL) SetBasePath Uses

func (o *UpdatePetURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*UpdatePetURL) String Uses

func (o *UpdatePetURL) String() string

String returns the string representation of the path with query string

func (*UpdatePetURL) StringFull Uses

func (o *UpdatePetURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*UpdatePetURL) WithBasePath Uses

func (o *UpdatePetURL) WithBasePath(bp string) *UpdatePetURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type UpdatePetWithForm Uses

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

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

Updates a pet in the store with form data

func NewUpdatePetWithForm Uses

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

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

func (*UpdatePetWithForm) ServeHTTP Uses

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

type UpdatePetWithFormHandler Uses

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

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

type UpdatePetWithFormHandlerFunc Uses

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 Uses

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

Handle executing the request and returning a response

type UpdatePetWithFormMethodNotAllowed Uses

type UpdatePetWithFormMethodNotAllowed struct {
}

UpdatePetWithFormMethodNotAllowed Invalid input

swagger:response updatePetWithFormMethodNotAllowed

func NewUpdatePetWithFormMethodNotAllowed Uses

func NewUpdatePetWithFormMethodNotAllowed() *UpdatePetWithFormMethodNotAllowed

NewUpdatePetWithFormMethodNotAllowed creates UpdatePetWithFormMethodNotAllowed with default headers values

func (*UpdatePetWithFormMethodNotAllowed) WriteResponse Uses

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

WriteResponse to the client

type UpdatePetWithFormParams Uses

type UpdatePetWithFormParams struct {

    // HTTP Request Object
    HTTPRequest *http.Request `json:"-"`

    /*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 NewUpdatePetWithFormParams Uses

func NewUpdatePetWithFormParams() UpdatePetWithFormParams

NewUpdatePetWithFormParams creates a new UpdatePetWithFormParams object no default values defined in spec.

func (*UpdatePetWithFormParams) BindRequest Uses

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.

To ensure default values, the struct must have been initialized with NewUpdatePetWithFormParams() beforehand.

type UpdatePetWithFormURL Uses

type UpdatePetWithFormURL struct {
    PetID string
    // contains filtered or unexported fields
}

UpdatePetWithFormURL generates an URL for the update pet with form operation

func (*UpdatePetWithFormURL) Build Uses

func (o *UpdatePetWithFormURL) Build() (*url.URL, error)

Build a url path and query string

func (*UpdatePetWithFormURL) BuildFull Uses

func (o *UpdatePetWithFormURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*UpdatePetWithFormURL) Must Uses

func (o *UpdatePetWithFormURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*UpdatePetWithFormURL) SetBasePath Uses

func (o *UpdatePetWithFormURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*UpdatePetWithFormURL) String Uses

func (o *UpdatePetWithFormURL) String() string

String returns the string representation of the path with query string

func (*UpdatePetWithFormURL) StringFull Uses

func (o *UpdatePetWithFormURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*UpdatePetWithFormURL) WithBasePath Uses

func (o *UpdatePetWithFormURL) WithBasePath(bp string) *UpdatePetWithFormURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

Package pet imports 12 packages (graph) and is imported by 12 packages. Updated 2019-03-22. Refresh now. Tools for package owners.