shelves_id

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const ShelvesIDBadRequestCode int = 400

ShelvesIDBadRequestCode is the HTTP code returned for type ShelvesIDBadRequest

View Source
const ShelvesIDOKCode int = 200

ShelvesIDOKCode is the HTTP code returned for type ShelvesIDOK

Variables

This section is empty.

Functions

This section is empty.

Types

type ShelvesID

type ShelvesID struct {
	Context *middleware.Context
	Handler ShelvesIDHandler
}

ShelvesID swagger:route GET /shelves/{id} shelvesID shelvesId

Handler for list books on shelf

func NewShelvesID

func NewShelvesID(ctx *middleware.Context, handler ShelvesIDHandler) *ShelvesID

NewShelvesID creates a new http.Handler for the shelves ID operation

func (*ShelvesID) ServeHTTP

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

type ShelvesIDBadRequest

type ShelvesIDBadRequest struct {

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

ShelvesIDBadRequest Bad request

swagger:response shelvesIdBadRequest

func NewShelvesIDBadRequest

func NewShelvesIDBadRequest() *ShelvesIDBadRequest

NewShelvesIDBadRequest creates ShelvesIDBadRequest with default headers values

func (*ShelvesIDBadRequest) SetPayload

func (o *ShelvesIDBadRequest) SetPayload(payload *models.Fail)

SetPayload sets the payload to the shelves Id bad request response

func (*ShelvesIDBadRequest) WithPayload

func (o *ShelvesIDBadRequest) WithPayload(payload *models.Fail) *ShelvesIDBadRequest

WithPayload adds the payload to the shelves Id bad request response

func (*ShelvesIDBadRequest) WriteResponse

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

WriteResponse to the client

type ShelvesIDHandler

type ShelvesIDHandler interface {
	Handle(ShelvesIDParams) middleware.Responder
}

ShelvesIDHandler interface for that can handle valid shelves ID params

type ShelvesIDHandlerFunc

type ShelvesIDHandlerFunc func(ShelvesIDParams) middleware.Responder

ShelvesIDHandlerFunc turns a function with the right signature into a shelves ID handler

func (ShelvesIDHandlerFunc) Handle

Handle executing the request and returning a response

type ShelvesIDOK

type ShelvesIDOK struct {

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

ShelvesIDOK Successful response

swagger:response shelvesIdOK

func NewShelvesIDOK

func NewShelvesIDOK() *ShelvesIDOK

NewShelvesIDOK creates ShelvesIDOK with default headers values

func (*ShelvesIDOK) SetPayload

func (o *ShelvesIDOK) SetPayload(payload *models.Shelf)

SetPayload sets the payload to the shelves Id o k response

func (*ShelvesIDOK) WithPayload

func (o *ShelvesIDOK) WithPayload(payload *models.Shelf) *ShelvesIDOK

WithPayload adds the payload to the shelves Id o k response

func (*ShelvesIDOK) WriteResponse

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

WriteResponse to the client

type ShelvesIDParams

type ShelvesIDParams struct {

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

	/*Get books by shelves ID.
	  Required: true
	  Minimum: 1
	  In: path
	*/
	ID int64
}

ShelvesIDParams contains all the bound params for the shelves ID operation typically these are obtained from a http.Request

swagger:parameters shelvesID

func NewShelvesIDParams

func NewShelvesIDParams() ShelvesIDParams

NewShelvesIDParams creates a new ShelvesIDParams object no default values defined in spec.

func (*ShelvesIDParams) BindRequest

func (o *ShelvesIDParams) 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 NewShelvesIDParams() beforehand.

type ShelvesIDURL

type ShelvesIDURL struct {
	ID int64
	// contains filtered or unexported fields
}

ShelvesIDURL generates an URL for the shelves ID operation

func (*ShelvesIDURL) Build

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

Build a url path and query string

func (*ShelvesIDURL) BuildFull

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

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

func (*ShelvesIDURL) Must

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

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

func (*ShelvesIDURL) SetBasePath

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

func (o *ShelvesIDURL) String() string

String returns the string representation of the path with query string

func (*ShelvesIDURL) StringFull

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

StringFull returns the string representation of a complete url

func (*ShelvesIDURL) WithBasePath

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

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