bug

package
v0.0.0-...-00a06a9 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const GetBugNotFoundCode int = 404

GetBugNotFoundCode is the HTTP code returned for type GetBugNotFound

View Source
const GetBugOKCode int = 200

GetBugOKCode is the HTTP code returned for type GetBugOK

View Source
const ListBugsOKCode int = 200

ListBugsOKCode is the HTTP code returned for type ListBugsOK

Variables

This section is empty.

Functions

This section is empty.

Types

type GetBug

type GetBug struct {
	Context *middleware.Context
	Handler GetBugHandler
}

GetBug swagger:route GET /catalog/bugs/{id} bug getBug

GetBug get bug API

func NewGetBug

func NewGetBug(ctx *middleware.Context, handler GetBugHandler) *GetBug

NewGetBug creates a new http.Handler for the get bug operation

func (*GetBug) ServeHTTP

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

type GetBugHandler

type GetBugHandler interface {
	Handle(GetBugParams) middleware.Responder
}

GetBugHandler interface for that can handle valid get bug params

type GetBugHandlerFunc

type GetBugHandlerFunc func(GetBugParams) middleware.Responder

GetBugHandlerFunc turns a function with the right signature into a get bug handler

func (GetBugHandlerFunc) Handle

Handle executing the request and returning a response

type GetBugNotFound

type GetBugNotFound struct {
}

GetBugNotFound not found

swagger:response getBugNotFound

func NewGetBugNotFound

func NewGetBugNotFound() *GetBugNotFound

NewGetBugNotFound creates GetBugNotFound with default headers values

func (*GetBugNotFound) WriteResponse

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

WriteResponse to the client

type GetBugOK

type GetBugOK struct {

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

GetBugOK return a bug

swagger:response getBugOK

func NewGetBugOK

func NewGetBugOK() *GetBugOK

NewGetBugOK creates GetBugOK with default headers values

func (*GetBugOK) SetPayload

func (o *GetBugOK) SetPayload(payload *models.Bug)

SetPayload sets the payload to the get bug o k response

func (*GetBugOK) WithPayload

func (o *GetBugOK) WithPayload(payload *models.Bug) *GetBugOK

WithPayload adds the payload to the get bug o k response

func (*GetBugOK) WriteResponse

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

WriteResponse to the client

type GetBugParams

type GetBugParams struct {

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

	/*Numeric ID of the bug to get.
	  Required: true
	  In: path
	*/
	ID int64
}

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

swagger:parameters getBug

func NewGetBugParams

func NewGetBugParams() GetBugParams

NewGetBugParams creates a new GetBugParams object no default values defined in spec.

func (*GetBugParams) BindRequest

func (o *GetBugParams) 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 NewGetBugParams() beforehand.

type GetBugURL

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

GetBugURL generates an URL for the get bug operation

func (*GetBugURL) Build

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

Build a url path and query string

func (*GetBugURL) BuildFull

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

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

func (*GetBugURL) Must

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

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

func (*GetBugURL) SetBasePath

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

func (o *GetBugURL) String() string

String returns the string representation of the path with query string

func (*GetBugURL) StringFull

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

StringFull returns the string representation of a complete url

func (*GetBugURL) WithBasePath

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

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

type ListBugs

type ListBugs struct {
	Context *middleware.Context
	Handler ListBugsHandler
}

ListBugs swagger:route GET /catalog/bugs bug listBugs

ListBugs list bugs API

func NewListBugs

func NewListBugs(ctx *middleware.Context, handler ListBugsHandler) *ListBugs

NewListBugs creates a new http.Handler for the list bugs operation

func (*ListBugs) ServeHTTP

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

type ListBugsHandler

type ListBugsHandler interface {
	Handle(ListBugsParams) middleware.Responder
}

ListBugsHandler interface for that can handle valid list bugs params

type ListBugsHandlerFunc

type ListBugsHandlerFunc func(ListBugsParams) middleware.Responder

ListBugsHandlerFunc turns a function with the right signature into a list bugs handler

func (ListBugsHandlerFunc) Handle

Handle executing the request and returning a response

type ListBugsOK

type ListBugsOK struct {

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

ListBugsOK returns a list of fishes

swagger:response listBugsOK

func NewListBugsOK

func NewListBugsOK() *ListBugsOK

NewListBugsOK creates ListBugsOK with default headers values

func (*ListBugsOK) SetPayload

func (o *ListBugsOK) SetPayload(payload *models.BugListResult)

SetPayload sets the payload to the list bugs o k response

func (*ListBugsOK) WithPayload

func (o *ListBugsOK) WithPayload(payload *models.BugListResult) *ListBugsOK

WithPayload adds the payload to the list bugs o k response

func (*ListBugsOK) WriteResponse

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

WriteResponse to the client

type ListBugsParams

type ListBugsParams struct {

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

	/*
	  In: query
	*/
	Cursor *string
	/*Maximal number of record return in one page, server may return less.
	  Maximum: 1000
	  Minimum: 0
	  In: query
	  Default: 20
	*/
	PageSize *int64
	/*Fields by which the records are sorted
	  In: query
	*/
	SortBy *string
}

ListBugsParams contains all the bound params for the list bugs operation typically these are obtained from a http.Request

swagger:parameters listBugs

func NewListBugsParams

func NewListBugsParams() ListBugsParams

NewListBugsParams creates a new ListBugsParams object with the default values initialized.

func (*ListBugsParams) BindRequest

func (o *ListBugsParams) 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 NewListBugsParams() beforehand.

type ListBugsURL

type ListBugsURL struct {
	Cursor   *string
	PageSize *int64
	SortBy   *string
	// contains filtered or unexported fields
}

ListBugsURL generates an URL for the list bugs operation

func (*ListBugsURL) Build

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

Build a url path and query string

func (*ListBugsURL) BuildFull

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

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

func (*ListBugsURL) Must

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

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

func (*ListBugsURL) SetBasePath

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

func (o *ListBugsURL) String() string

String returns the string representation of the path with query string

func (*ListBugsURL) StringFull

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

StringFull returns the string representation of a complete url

func (*ListBugsURL) WithBasePath

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

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