Documentation ¶
Index ¶
- Constants
- type ListCategories
- type ListCategoriesDefault
- func (o *ListCategoriesDefault) SetPayload(payload *models.Error)
- func (o *ListCategoriesDefault) SetStatusCode(code int)
- func (o *ListCategoriesDefault) WithPayload(payload *models.Error) *ListCategoriesDefault
- func (o *ListCategoriesDefault) WithStatusCode(code int) *ListCategoriesDefault
- func (o *ListCategoriesDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
- type ListCategoriesHandler
- type ListCategoriesHandlerFunc
- type ListCategoriesOK
- type ListCategoriesParams
- type ListCategoriesURL
- func (o *ListCategoriesURL) Build() (*url.URL, error)
- func (o *ListCategoriesURL) BuildFull(scheme, host string) (*url.URL, error)
- func (o *ListCategoriesURL) Must(u *url.URL, err error) *url.URL
- func (o *ListCategoriesURL) SetBasePath(bp string)
- func (o *ListCategoriesURL) String() string
- func (o *ListCategoriesURL) StringFull(scheme, host string) string
- func (o *ListCategoriesURL) WithBasePath(bp string) *ListCategoriesURL
- type ListProductsOfCategory
- type ListProductsOfCategoryDefault
- func (o *ListProductsOfCategoryDefault) SetPayload(payload *models.Error)
- func (o *ListProductsOfCategoryDefault) SetStatusCode(code int)
- func (o *ListProductsOfCategoryDefault) WithPayload(payload *models.Error) *ListProductsOfCategoryDefault
- func (o *ListProductsOfCategoryDefault) WithStatusCode(code int) *ListProductsOfCategoryDefault
- func (o *ListProductsOfCategoryDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
- type ListProductsOfCategoryHandler
- type ListProductsOfCategoryHandlerFunc
- type ListProductsOfCategoryOK
- type ListProductsOfCategoryParams
- type ListProductsOfCategoryURL
- func (o *ListProductsOfCategoryURL) Build() (*url.URL, error)
- func (o *ListProductsOfCategoryURL) BuildFull(scheme, host string) (*url.URL, error)
- func (o *ListProductsOfCategoryURL) Must(u *url.URL, err error) *url.URL
- func (o *ListProductsOfCategoryURL) SetBasePath(bp string)
- func (o *ListProductsOfCategoryURL) String() string
- func (o *ListProductsOfCategoryURL) StringFull(scheme, host string) string
- func (o *ListProductsOfCategoryURL) WithBasePath(bp string) *ListProductsOfCategoryURL
Constants ¶
const ListCategoriesOKCode int = 200
ListCategoriesOKCode is the HTTP code returned for type ListCategoriesOK
const ListProductsOfCategoryOKCode int = 200
ListProductsOfCategoryOKCode is the HTTP code returned for type ListProductsOfCategoryOK
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ListCategories ¶
type ListCategories struct { Context *middleware.Context Handler ListCategoriesHandler }
ListCategories swagger:route GET /categories categories listCategories
List available categories
func NewListCategories ¶
func NewListCategories(ctx *middleware.Context, handler ListCategoriesHandler) *ListCategories
NewListCategories creates a new http.Handler for the list categories operation
func (*ListCategories) ServeHTTP ¶
func (o *ListCategories) ServeHTTP(rw http.ResponseWriter, r *http.Request)
type ListCategoriesDefault ¶
type ListCategoriesDefault struct { /* In: Body */ Payload *models.Error `json:"body,omitempty"` // contains filtered or unexported fields }
ListCategoriesDefault generic error response
swagger:response listCategoriesDefault
func NewListCategoriesDefault ¶
func NewListCategoriesDefault(code int) *ListCategoriesDefault
NewListCategoriesDefault creates ListCategoriesDefault with default headers values
func (*ListCategoriesDefault) SetPayload ¶
func (o *ListCategoriesDefault) SetPayload(payload *models.Error)
SetPayload sets the payload to the list categories default response
func (*ListCategoriesDefault) SetStatusCode ¶
func (o *ListCategoriesDefault) SetStatusCode(code int)
SetStatusCode sets the status to the list categories default response
func (*ListCategoriesDefault) WithPayload ¶
func (o *ListCategoriesDefault) WithPayload(payload *models.Error) *ListCategoriesDefault
WithPayload adds the payload to the list categories default response
func (*ListCategoriesDefault) WithStatusCode ¶
func (o *ListCategoriesDefault) WithStatusCode(code int) *ListCategoriesDefault
WithStatusCode adds the status to the list categories default response
func (*ListCategoriesDefault) WriteResponse ¶
func (o *ListCategoriesDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type ListCategoriesHandler ¶
type ListCategoriesHandler interface {
Handle(ListCategoriesParams) middleware.Responder
}
ListCategoriesHandler interface for that can handle valid list categories params
type ListCategoriesHandlerFunc ¶
type ListCategoriesHandlerFunc func(ListCategoriesParams) middleware.Responder
ListCategoriesHandlerFunc turns a function with the right signature into a list categories handler
func (ListCategoriesHandlerFunc) Handle ¶
func (fn ListCategoriesHandlerFunc) Handle(params ListCategoriesParams) middleware.Responder
Handle executing the request and returning a response
type ListCategoriesOK ¶
ListCategoriesOK list the categories
swagger:response listCategoriesOK
func NewListCategoriesOK ¶
func NewListCategoriesOK() *ListCategoriesOK
NewListCategoriesOK creates ListCategoriesOK with default headers values
func (*ListCategoriesOK) SetPayload ¶
func (o *ListCategoriesOK) SetPayload(payload []*models.Category)
SetPayload sets the payload to the list categories o k response
func (*ListCategoriesOK) WithPayload ¶
func (o *ListCategoriesOK) WithPayload(payload []*models.Category) *ListCategoriesOK
WithPayload adds the payload to the list categories o k response
func (*ListCategoriesOK) WriteResponse ¶
func (o *ListCategoriesOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type ListCategoriesParams ¶
ListCategoriesParams contains all the bound params for the list categories operation typically these are obtained from a http.Request
swagger:parameters listCategories
func NewListCategoriesParams ¶
func NewListCategoriesParams() ListCategoriesParams
NewListCategoriesParams creates a new ListCategoriesParams object no default values defined in spec.
func (*ListCategoriesParams) BindRequest ¶
func (o *ListCategoriesParams) 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 NewListCategoriesParams() beforehand.
type ListCategoriesURL ¶
type ListCategoriesURL struct {
// contains filtered or unexported fields
}
ListCategoriesURL generates an URL for the list categories operation
func (*ListCategoriesURL) Build ¶
func (o *ListCategoriesURL) Build() (*url.URL, error)
Build a url path and query string
func (*ListCategoriesURL) BuildFull ¶
func (o *ListCategoriesURL) BuildFull(scheme, host string) (*url.URL, error)
BuildFull builds a full url with scheme, host, path and query string
func (*ListCategoriesURL) Must ¶
Must is a helper function to panic when the url builder returns an error
func (*ListCategoriesURL) SetBasePath ¶
func (o *ListCategoriesURL) 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 (*ListCategoriesURL) String ¶
func (o *ListCategoriesURL) String() string
String returns the string representation of the path with query string
func (*ListCategoriesURL) StringFull ¶
func (o *ListCategoriesURL) StringFull(scheme, host string) string
StringFull returns the string representation of a complete url
func (*ListCategoriesURL) WithBasePath ¶
func (o *ListCategoriesURL) WithBasePath(bp string) *ListCategoriesURL
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 ListProductsOfCategory ¶
type ListProductsOfCategory struct { Context *middleware.Context Handler ListProductsOfCategoryHandler }
ListProductsOfCategory swagger:route GET /categories/{category_id}/products categories listProductsOfCategory
List Products of a category
func NewListProductsOfCategory ¶
func NewListProductsOfCategory(ctx *middleware.Context, handler ListProductsOfCategoryHandler) *ListProductsOfCategory
NewListProductsOfCategory creates a new http.Handler for the list products of category operation
func (*ListProductsOfCategory) ServeHTTP ¶
func (o *ListProductsOfCategory) ServeHTTP(rw http.ResponseWriter, r *http.Request)
type ListProductsOfCategoryDefault ¶
type ListProductsOfCategoryDefault struct { /* In: Body */ Payload *models.Error `json:"body,omitempty"` // contains filtered or unexported fields }
ListProductsOfCategoryDefault generic error response
swagger:response listProductsOfCategoryDefault
func NewListProductsOfCategoryDefault ¶
func NewListProductsOfCategoryDefault(code int) *ListProductsOfCategoryDefault
NewListProductsOfCategoryDefault creates ListProductsOfCategoryDefault with default headers values
func (*ListProductsOfCategoryDefault) SetPayload ¶
func (o *ListProductsOfCategoryDefault) SetPayload(payload *models.Error)
SetPayload sets the payload to the list products of category default response
func (*ListProductsOfCategoryDefault) SetStatusCode ¶
func (o *ListProductsOfCategoryDefault) SetStatusCode(code int)
SetStatusCode sets the status to the list products of category default response
func (*ListProductsOfCategoryDefault) WithPayload ¶
func (o *ListProductsOfCategoryDefault) WithPayload(payload *models.Error) *ListProductsOfCategoryDefault
WithPayload adds the payload to the list products of category default response
func (*ListProductsOfCategoryDefault) WithStatusCode ¶
func (o *ListProductsOfCategoryDefault) WithStatusCode(code int) *ListProductsOfCategoryDefault
WithStatusCode adds the status to the list products of category default response
func (*ListProductsOfCategoryDefault) WriteResponse ¶
func (o *ListProductsOfCategoryDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type ListProductsOfCategoryHandler ¶
type ListProductsOfCategoryHandler interface {
Handle(ListProductsOfCategoryParams) middleware.Responder
}
ListProductsOfCategoryHandler interface for that can handle valid list products of category params
type ListProductsOfCategoryHandlerFunc ¶
type ListProductsOfCategoryHandlerFunc func(ListProductsOfCategoryParams) middleware.Responder
ListProductsOfCategoryHandlerFunc turns a function with the right signature into a list products of category handler
func (ListProductsOfCategoryHandlerFunc) Handle ¶
func (fn ListProductsOfCategoryHandlerFunc) Handle(params ListProductsOfCategoryParams) middleware.Responder
Handle executing the request and returning a response
type ListProductsOfCategoryOK ¶
type ListProductsOfCategoryOK struct { /* In: Body */ Payload []*models.Product `json:"body,omitempty"` }
ListProductsOfCategoryOK list the products of selected category
swagger:response listProductsOfCategoryOK
func NewListProductsOfCategoryOK ¶
func NewListProductsOfCategoryOK() *ListProductsOfCategoryOK
NewListProductsOfCategoryOK creates ListProductsOfCategoryOK with default headers values
func (*ListProductsOfCategoryOK) SetPayload ¶
func (o *ListProductsOfCategoryOK) SetPayload(payload []*models.Product)
SetPayload sets the payload to the list products of category o k response
func (*ListProductsOfCategoryOK) WithPayload ¶
func (o *ListProductsOfCategoryOK) WithPayload(payload []*models.Product) *ListProductsOfCategoryOK
WithPayload adds the payload to the list products of category o k response
func (*ListProductsOfCategoryOK) WriteResponse ¶
func (o *ListProductsOfCategoryOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type ListProductsOfCategoryParams ¶
type ListProductsOfCategoryParams struct { // HTTP Request Object HTTPRequest *http.Request `json:"-"` /* Required: true In: path */ CategoryID int64 /* In: query Default: 20 */ Limit *int32 /* In: query Default: 0 */ Since *int64 }
ListProductsOfCategoryParams contains all the bound params for the list products of category operation typically these are obtained from a http.Request
swagger:parameters listProductsOfCategory
func NewListProductsOfCategoryParams ¶
func NewListProductsOfCategoryParams() ListProductsOfCategoryParams
NewListProductsOfCategoryParams creates a new ListProductsOfCategoryParams object with the default values initialized.
func (*ListProductsOfCategoryParams) BindRequest ¶
func (o *ListProductsOfCategoryParams) 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 NewListProductsOfCategoryParams() beforehand.
type ListProductsOfCategoryURL ¶
type ListProductsOfCategoryURL struct { CategoryID int64 Limit *int32 Since *int64 // contains filtered or unexported fields }
ListProductsOfCategoryURL generates an URL for the list products of category operation
func (*ListProductsOfCategoryURL) Build ¶
func (o *ListProductsOfCategoryURL) Build() (*url.URL, error)
Build a url path and query string
func (*ListProductsOfCategoryURL) BuildFull ¶
func (o *ListProductsOfCategoryURL) BuildFull(scheme, host string) (*url.URL, error)
BuildFull builds a full url with scheme, host, path and query string
func (*ListProductsOfCategoryURL) Must ¶
Must is a helper function to panic when the url builder returns an error
func (*ListProductsOfCategoryURL) SetBasePath ¶
func (o *ListProductsOfCategoryURL) 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 (*ListProductsOfCategoryURL) String ¶
func (o *ListProductsOfCategoryURL) String() string
String returns the string representation of the path with query string
func (*ListProductsOfCategoryURL) StringFull ¶
func (o *ListProductsOfCategoryURL) StringFull(scheme, host string) string
StringFull returns the string representation of a complete url
func (*ListProductsOfCategoryURL) WithBasePath ¶
func (o *ListProductsOfCategoryURL) WithBasePath(bp string) *ListProductsOfCategoryURL
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