page_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 PageIDBadRequestCode int = 400

PageIDBadRequestCode is the HTTP code returned for type PageIDBadRequest

View Source
const PageIDOKCode int = 200

PageIDOKCode is the HTTP code returned for type PageIDOK

Variables

This section is empty.

Functions

This section is empty.

Types

type PageID

type PageID struct {
	Context *middleware.Context
	Handler PageIDHandler
}

PageID swagger:route GET /page/{id} pageID pageId

Handler for seek page on id

func NewPageID

func NewPageID(ctx *middleware.Context, handler PageIDHandler) *PageID

NewPageID creates a new http.Handler for the page ID operation

func (*PageID) ServeHTTP

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

type PageIDBadRequest

type PageIDBadRequest struct {

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

PageIDBadRequest Bad request

swagger:response pageIdBadRequest

func NewPageIDBadRequest

func NewPageIDBadRequest() *PageIDBadRequest

NewPageIDBadRequest creates PageIDBadRequest with default headers values

func (*PageIDBadRequest) SetPayload

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

SetPayload sets the payload to the page Id bad request response

func (*PageIDBadRequest) WithPayload

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

WithPayload adds the payload to the page Id bad request response

func (*PageIDBadRequest) WriteResponse

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

WriteResponse to the client

type PageIDHandler

type PageIDHandler interface {
	Handle(PageIDParams) middleware.Responder
}

PageIDHandler interface for that can handle valid page ID params

type PageIDHandlerFunc

type PageIDHandlerFunc func(PageIDParams) middleware.Responder

PageIDHandlerFunc turns a function with the right signature into a page ID handler

func (PageIDHandlerFunc) Handle

Handle executing the request and returning a response

type PageIDOK

type PageIDOK struct {

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

PageIDOK Successful response

swagger:response pageIdOK

func NewPageIDOK

func NewPageIDOK() *PageIDOK

NewPageIDOK creates PageIDOK with default headers values

func (*PageIDOK) SetPayload

func (o *PageIDOK) SetPayload(payload *models.Page)

SetPayload sets the payload to the page Id o k response

func (*PageIDOK) WithPayload

func (o *PageIDOK) WithPayload(payload *models.Page) *PageIDOK

WithPayload adds the payload to the page Id o k response

func (*PageIDOK) WriteResponse

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

WriteResponse to the client

type PageIDParams

type PageIDParams struct {

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

	/*The ID of page.
	  Required: true
	  Minimum: 1
	  In: path
	*/
	ID int64
}

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

swagger:parameters pageID

func NewPageIDParams

func NewPageIDParams() PageIDParams

NewPageIDParams creates a new PageIDParams object no default values defined in spec.

func (*PageIDParams) BindRequest

func (o *PageIDParams) 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 NewPageIDParams() beforehand.

type PageIDURL

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

PageIDURL generates an URL for the page ID operation

func (*PageIDURL) Build

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

Build a url path and query string

func (*PageIDURL) BuildFull

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

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

func (*PageIDURL) Must

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

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

func (*PageIDURL) SetBasePath

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

func (o *PageIDURL) String() string

String returns the string representation of the path with query string

func (*PageIDURL) StringFull

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

StringFull returns the string representation of a complete url

func (*PageIDURL) WithBasePath

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

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