book_name

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: 10 Imported by: 0

Documentation

Index

Constants

View Source
const BookNameBadRequestCode int = 400

BookNameBadRequestCode is the HTTP code returned for type BookNameBadRequest

View Source
const BookNameOKCode int = 200

BookNameOKCode is the HTTP code returned for type BookNameOK

Variables

This section is empty.

Functions

This section is empty.

Types

type BookName

type BookName struct {
	Context *middleware.Context
	Handler BookNameHandler
}

BookName swagger:route GET /book/name/{name} bookName bookName

Handler for seek book on name

func NewBookName

func NewBookName(ctx *middleware.Context, handler BookNameHandler) *BookName

NewBookName creates a new http.Handler for the book name operation

func (*BookName) ServeHTTP

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

type BookNameBadRequest

type BookNameBadRequest struct {

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

BookNameBadRequest Bad request

swagger:response bookNameBadRequest

func NewBookNameBadRequest

func NewBookNameBadRequest() *BookNameBadRequest

NewBookNameBadRequest creates BookNameBadRequest with default headers values

func (*BookNameBadRequest) SetPayload

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

SetPayload sets the payload to the book name bad request response

func (*BookNameBadRequest) WithPayload

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

WithPayload adds the payload to the book name bad request response

func (*BookNameBadRequest) WriteResponse

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

WriteResponse to the client

type BookNameHandler

type BookNameHandler interface {
	Handle(BookNameParams) middleware.Responder
}

BookNameHandler interface for that can handle valid book name params

type BookNameHandlerFunc

type BookNameHandlerFunc func(BookNameParams) middleware.Responder

BookNameHandlerFunc turns a function with the right signature into a book name handler

func (BookNameHandlerFunc) Handle

Handle executing the request and returning a response

type BookNameOK

type BookNameOK struct {

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

BookNameOK Successful response

swagger:response bookNameOK

func NewBookNameOK

func NewBookNameOK() *BookNameOK

NewBookNameOK creates BookNameOK with default headers values

func (*BookNameOK) SetPayload

func (o *BookNameOK) SetPayload(payload *models.Book)

SetPayload sets the payload to the book name o k response

func (*BookNameOK) WithPayload

func (o *BookNameOK) WithPayload(payload *models.Book) *BookNameOK

WithPayload adds the payload to the book name o k response

func (*BookNameOK) WriteResponse

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

WriteResponse to the client

type BookNameParams

type BookNameParams struct {

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

	/*The name of book.
	  Required: true
	  In: path
	*/
	Name string
}

BookNameParams contains all the bound params for the book name operation typically these are obtained from a http.Request

swagger:parameters bookName

func NewBookNameParams

func NewBookNameParams() BookNameParams

NewBookNameParams creates a new BookNameParams object no default values defined in spec.

func (*BookNameParams) BindRequest

func (o *BookNameParams) 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 NewBookNameParams() beforehand.

type BookNameURL

type BookNameURL struct {
	Name string
	// contains filtered or unexported fields
}

BookNameURL generates an URL for the book name operation

func (*BookNameURL) Build

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

Build a url path and query string

func (*BookNameURL) BuildFull

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

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

func (*BookNameURL) Must

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

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

func (*BookNameURL) SetBasePath

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

func (o *BookNameURL) String() string

String returns the string representation of the path with query string

func (*BookNameURL) StringFull

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

StringFull returns the string representation of a complete url

func (*BookNameURL) WithBasePath

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

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