Documentation ¶
Index ¶
- Constants
- type BookID
- type BookIDBadRequest
- type BookIDHandler
- type BookIDHandlerFunc
- type BookIDOK
- type BookIDParams
- type BookIDURL
- func (o *BookIDURL) Build() (*url.URL, error)
- func (o *BookIDURL) BuildFull(scheme, host string) (*url.URL, error)
- func (o *BookIDURL) Must(u *url.URL, err error) *url.URL
- func (o *BookIDURL) SetBasePath(bp string)
- func (o *BookIDURL) String() string
- func (o *BookIDURL) StringFull(scheme, host string) string
- func (o *BookIDURL) WithBasePath(bp string) *BookIDURL
Constants ¶
const BookIDBadRequestCode int = 400
BookIDBadRequestCode is the HTTP code returned for type BookIDBadRequest
const BookIDOKCode int = 200
BookIDOKCode is the HTTP code returned for type BookIDOK
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BookID ¶
type BookID struct { Context *middleware.Context Handler BookIDHandler }
BookID swagger:route GET /book/id/{id} bookID bookId
Handler for seek book on id
func NewBookID ¶
func NewBookID(ctx *middleware.Context, handler BookIDHandler) *BookID
NewBookID creates a new http.Handler for the book ID operation
type BookIDBadRequest ¶
BookIDBadRequest Bad request
swagger:response bookIdBadRequest
func NewBookIDBadRequest ¶
func NewBookIDBadRequest() *BookIDBadRequest
NewBookIDBadRequest creates BookIDBadRequest with default headers values
func (*BookIDBadRequest) SetPayload ¶
func (o *BookIDBadRequest) SetPayload(payload *models.Fail)
SetPayload sets the payload to the book Id bad request response
func (*BookIDBadRequest) WithPayload ¶
func (o *BookIDBadRequest) WithPayload(payload *models.Fail) *BookIDBadRequest
WithPayload adds the payload to the book Id bad request response
func (*BookIDBadRequest) WriteResponse ¶
func (o *BookIDBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type BookIDHandler ¶
type BookIDHandler interface {
Handle(BookIDParams) middleware.Responder
}
BookIDHandler interface for that can handle valid book ID params
type BookIDHandlerFunc ¶
type BookIDHandlerFunc func(BookIDParams) middleware.Responder
BookIDHandlerFunc turns a function with the right signature into a book ID handler
func (BookIDHandlerFunc) Handle ¶
func (fn BookIDHandlerFunc) Handle(params BookIDParams) middleware.Responder
Handle executing the request and returning a response
type BookIDOK ¶
BookIDOK Successful response
swagger:response bookIdOK
func NewBookIDOK ¶
func NewBookIDOK() *BookIDOK
NewBookIDOK creates BookIDOK with default headers values
func (*BookIDOK) SetPayload ¶
SetPayload sets the payload to the book Id o k response
func (*BookIDOK) WithPayload ¶
WithPayload adds the payload to the book Id o k response
func (*BookIDOK) WriteResponse ¶
func (o *BookIDOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type BookIDParams ¶
type BookIDParams struct { // HTTP Request Object HTTPRequest *http.Request `json:"-"` /*The ID of book. Required: true Minimum: 1 In: path */ ID int64 }
BookIDParams contains all the bound params for the book ID operation typically these are obtained from a http.Request
swagger:parameters bookID
func NewBookIDParams ¶
func NewBookIDParams() BookIDParams
NewBookIDParams creates a new BookIDParams object no default values defined in spec.
func (*BookIDParams) BindRequest ¶
func (o *BookIDParams) 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 NewBookIDParams() beforehand.
type BookIDURL ¶
type BookIDURL struct { ID int64 // contains filtered or unexported fields }
BookIDURL generates an URL for the book ID operation
func (*BookIDURL) SetBasePath ¶
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 (*BookIDURL) StringFull ¶
StringFull returns the string representation of a complete url
func (*BookIDURL) WithBasePath ¶
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