pets

package
v0.0.0-...-0dbe039 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const GetPetsOKCode int = 200

GetPetsOKCode is the HTTP code returned for type GetPetsOK

Variables

This section is empty.

Functions

This section is empty.

Types

type GetPets

type GetPets struct {
	Context *middleware.Context
	Handler GetPetsHandler
}
GetPets swagger:route GET /pets pets getPets

Returns all pets

func NewGetPets

func NewGetPets(ctx *middleware.Context, handler GetPetsHandler) *GetPets

NewGetPets creates a new http.Handler for the get pets operation

func (*GetPets) ServeHTTP

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

type GetPetsDefault

type GetPetsDefault struct {

	/*
	  In: Body
	*/
	Payload *models.ErrorModel `json:"body,omitempty"`
	// contains filtered or unexported fields
}

GetPetsDefault generic error response

swagger:response getPetsDefault

func NewGetPetsDefault

func NewGetPetsDefault(code int) *GetPetsDefault

NewGetPetsDefault creates GetPetsDefault with default headers values

func (*GetPetsDefault) SetPayload

func (o *GetPetsDefault) SetPayload(payload *models.ErrorModel)

SetPayload sets the payload to the get pets default response

func (*GetPetsDefault) SetStatusCode

func (o *GetPetsDefault) SetStatusCode(code int)

SetStatusCode sets the status to the get pets default response

func (*GetPetsDefault) WithPayload

func (o *GetPetsDefault) WithPayload(payload *models.ErrorModel) *GetPetsDefault

WithPayload adds the payload to the get pets default response

func (*GetPetsDefault) WithStatusCode

func (o *GetPetsDefault) WithStatusCode(code int) *GetPetsDefault

WithStatusCode adds the status to the get pets default response

func (*GetPetsDefault) WriteResponse

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

WriteResponse to the client

type GetPetsHandler

type GetPetsHandler interface {
	Handle(GetPetsParams) middleware.Responder
}

GetPetsHandler interface for that can handle valid get pets params

type GetPetsHandlerFunc

type GetPetsHandlerFunc func(GetPetsParams) middleware.Responder

GetPetsHandlerFunc turns a function with the right signature into a get pets handler

func (GetPetsHandlerFunc) Handle

Handle executing the request and returning a response

type GetPetsOK

type GetPetsOK struct {

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

GetPetsOK A list of pets

swagger:response getPetsOK

func NewGetPetsOK

func NewGetPetsOK() *GetPetsOK

NewGetPetsOK creates GetPetsOK with default headers values

func (*GetPetsOK) SetPayload

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

SetPayload sets the payload to the get pets o k response

func (*GetPetsOK) WithPayload

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

WithPayload adds the payload to the get pets o k response

func (*GetPetsOK) WriteResponse

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

WriteResponse to the client

type GetPetsParams

type GetPetsParams struct {

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

GetPetsParams contains all the bound params for the get pets operation typically these are obtained from a http.Request

swagger:parameters GetPets

func NewGetPetsParams

func NewGetPetsParams() GetPetsParams

NewGetPetsParams creates a new GetPetsParams object

There are no default values defined in the spec.

func (*GetPetsParams) BindRequest

func (o *GetPetsParams) 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 NewGetPetsParams() beforehand.

type GetPetsURL

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

GetPetsURL generates an URL for the get pets operation

func (*GetPetsURL) Build

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

Build a url path and query string

func (*GetPetsURL) BuildFull

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

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

func (*GetPetsURL) Must

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

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

func (*GetPetsURL) SetBasePath

func (o *GetPetsURL) 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 (*GetPetsURL) String

func (o *GetPetsURL) String() string

String returns the string representation of the path with query string

func (*GetPetsURL) StringFull

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

StringFull returns the string representation of a complete url

func (*GetPetsURL) WithBasePath

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

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

Jump to

Keyboard shortcuts

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