Documentation ¶
Index ¶
- Constants
- type AddOneProductIntoCart
- type AddOneProductIntoCartBody
- type AddOneProductIntoCartDefault
- func (o *AddOneProductIntoCartDefault) SetPayload(payload *models.Error)
- func (o *AddOneProductIntoCartDefault) SetStatusCode(code int)
- func (o *AddOneProductIntoCartDefault) WithPayload(payload *models.Error) *AddOneProductIntoCartDefault
- func (o *AddOneProductIntoCartDefault) WithStatusCode(code int) *AddOneProductIntoCartDefault
- func (o *AddOneProductIntoCartDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
- type AddOneProductIntoCartHandler
- type AddOneProductIntoCartHandlerFunc
- type AddOneProductIntoCartOK
- type AddOneProductIntoCartParams
- type AddOneProductIntoCartURL
- func (o *AddOneProductIntoCartURL) Build() (*url.URL, error)
- func (o *AddOneProductIntoCartURL) BuildFull(scheme, host string) (*url.URL, error)
- func (o *AddOneProductIntoCartURL) Must(u *url.URL, err error) *url.URL
- func (o *AddOneProductIntoCartURL) SetBasePath(bp string)
- func (o *AddOneProductIntoCartURL) String() string
- func (o *AddOneProductIntoCartURL) StringFull(scheme, host string) string
- func (o *AddOneProductIntoCartURL) WithBasePath(bp string) *AddOneProductIntoCartURL
- type CreateCart
- type CreateCartDefault
- func (o *CreateCartDefault) SetPayload(payload *models.Error)
- func (o *CreateCartDefault) SetStatusCode(code int)
- func (o *CreateCartDefault) WithPayload(payload *models.Error) *CreateCartDefault
- func (o *CreateCartDefault) WithStatusCode(code int) *CreateCartDefault
- func (o *CreateCartDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
- type CreateCartHandler
- type CreateCartHandlerFunc
- type CreateCartOK
- type CreateCartOKBody
- type CreateCartParams
- type CreateCartURL
- func (o *CreateCartURL) Build() (*url.URL, error)
- func (o *CreateCartURL) BuildFull(scheme, host string) (*url.URL, error)
- func (o *CreateCartURL) Must(u *url.URL, err error) *url.URL
- func (o *CreateCartURL) SetBasePath(bp string)
- func (o *CreateCartURL) String() string
- func (o *CreateCartURL) StringFull(scheme, host string) string
- func (o *CreateCartURL) WithBasePath(bp string) *CreateCartURL
- type ListProductsInCart
- type ListProductsInCartDefault
- func (o *ListProductsInCartDefault) SetPayload(payload *models.Error)
- func (o *ListProductsInCartDefault) SetStatusCode(code int)
- func (o *ListProductsInCartDefault) WithPayload(payload *models.Error) *ListProductsInCartDefault
- func (o *ListProductsInCartDefault) WithStatusCode(code int) *ListProductsInCartDefault
- func (o *ListProductsInCartDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
- type ListProductsInCartHandler
- type ListProductsInCartHandlerFunc
- type ListProductsInCartOK
- type ListProductsInCartParams
- type ListProductsInCartURL
- func (o *ListProductsInCartURL) Build() (*url.URL, error)
- func (o *ListProductsInCartURL) BuildFull(scheme, host string) (*url.URL, error)
- func (o *ListProductsInCartURL) Must(u *url.URL, err error) *url.URL
- func (o *ListProductsInCartURL) SetBasePath(bp string)
- func (o *ListProductsInCartURL) String() string
- func (o *ListProductsInCartURL) StringFull(scheme, host string) string
- func (o *ListProductsInCartURL) WithBasePath(bp string) *ListProductsInCartURL
- type RemoveOneProductFromCart
- type RemoveOneProductFromCartDefault
- func (o *RemoveOneProductFromCartDefault) SetPayload(payload *models.Error)
- func (o *RemoveOneProductFromCartDefault) SetStatusCode(code int)
- func (o *RemoveOneProductFromCartDefault) WithPayload(payload *models.Error) *RemoveOneProductFromCartDefault
- func (o *RemoveOneProductFromCartDefault) WithStatusCode(code int) *RemoveOneProductFromCartDefault
- func (o *RemoveOneProductFromCartDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
- type RemoveOneProductFromCartHandler
- type RemoveOneProductFromCartHandlerFunc
- type RemoveOneProductFromCartNoContent
- type RemoveOneProductFromCartParams
- type RemoveOneProductFromCartURL
- func (o *RemoveOneProductFromCartURL) Build() (*url.URL, error)
- func (o *RemoveOneProductFromCartURL) BuildFull(scheme, host string) (*url.URL, error)
- func (o *RemoveOneProductFromCartURL) Must(u *url.URL, err error) *url.URL
- func (o *RemoveOneProductFromCartURL) SetBasePath(bp string)
- func (o *RemoveOneProductFromCartURL) String() string
- func (o *RemoveOneProductFromCartURL) StringFull(scheme, host string) string
- func (o *RemoveOneProductFromCartURL) WithBasePath(bp string) *RemoveOneProductFromCartURL
Constants ¶
const AddOneProductIntoCartOKCode int = 200
AddOneProductIntoCartOKCode is the HTTP code returned for type AddOneProductIntoCartOK
const CreateCartOKCode int = 200
CreateCartOKCode is the HTTP code returned for type CreateCartOK
const ListProductsInCartOKCode int = 200
ListProductsInCartOKCode is the HTTP code returned for type ListProductsInCartOK
const RemoveOneProductFromCartNoContentCode int = 204
RemoveOneProductFromCartNoContentCode is the HTTP code returned for type RemoveOneProductFromCartNoContent
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddOneProductIntoCart ¶
type AddOneProductIntoCart struct { Context *middleware.Context Handler AddOneProductIntoCartHandler }
AddOneProductIntoCart swagger:route POST /carts/{cart_id}/products carts addOneProductIntoCart
Add a Product into cart
func NewAddOneProductIntoCart ¶
func NewAddOneProductIntoCart(ctx *middleware.Context, handler AddOneProductIntoCartHandler) *AddOneProductIntoCart
NewAddOneProductIntoCart creates a new http.Handler for the add one product into cart operation
func (*AddOneProductIntoCart) ServeHTTP ¶
func (o *AddOneProductIntoCart) ServeHTTP(rw http.ResponseWriter, r *http.Request)
type AddOneProductIntoCartBody ¶
type AddOneProductIntoCartBody struct { // product id // Required: true ProductID *int64 `json:"product_id"` }
AddOneProductIntoCartBody add one product into cart body
swagger:model AddOneProductIntoCartBody
func (*AddOneProductIntoCartBody) MarshalBinary ¶
func (o *AddOneProductIntoCartBody) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*AddOneProductIntoCartBody) UnmarshalBinary ¶
func (o *AddOneProductIntoCartBody) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type AddOneProductIntoCartDefault ¶
type AddOneProductIntoCartDefault struct { /* In: Body */ Payload *models.Error `json:"body,omitempty"` // contains filtered or unexported fields }
AddOneProductIntoCartDefault generic error response
swagger:response addOneProductIntoCartDefault
func NewAddOneProductIntoCartDefault ¶
func NewAddOneProductIntoCartDefault(code int) *AddOneProductIntoCartDefault
NewAddOneProductIntoCartDefault creates AddOneProductIntoCartDefault with default headers values
func (*AddOneProductIntoCartDefault) SetPayload ¶
func (o *AddOneProductIntoCartDefault) SetPayload(payload *models.Error)
SetPayload sets the payload to the add one product into cart default response
func (*AddOneProductIntoCartDefault) SetStatusCode ¶
func (o *AddOneProductIntoCartDefault) SetStatusCode(code int)
SetStatusCode sets the status to the add one product into cart default response
func (*AddOneProductIntoCartDefault) WithPayload ¶
func (o *AddOneProductIntoCartDefault) WithPayload(payload *models.Error) *AddOneProductIntoCartDefault
WithPayload adds the payload to the add one product into cart default response
func (*AddOneProductIntoCartDefault) WithStatusCode ¶
func (o *AddOneProductIntoCartDefault) WithStatusCode(code int) *AddOneProductIntoCartDefault
WithStatusCode adds the status to the add one product into cart default response
func (*AddOneProductIntoCartDefault) WriteResponse ¶
func (o *AddOneProductIntoCartDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type AddOneProductIntoCartHandler ¶
type AddOneProductIntoCartHandler interface {
Handle(AddOneProductIntoCartParams) middleware.Responder
}
AddOneProductIntoCartHandler interface for that can handle valid add one product into cart params
type AddOneProductIntoCartHandlerFunc ¶
type AddOneProductIntoCartHandlerFunc func(AddOneProductIntoCartParams) middleware.Responder
AddOneProductIntoCartHandlerFunc turns a function with the right signature into a add one product into cart handler
func (AddOneProductIntoCartHandlerFunc) Handle ¶
func (fn AddOneProductIntoCartHandlerFunc) Handle(params AddOneProductIntoCartParams) middleware.Responder
Handle executing the request and returning a response
type AddOneProductIntoCartOK ¶
type AddOneProductIntoCartOK struct { /* In: Body */ Payload *models.CartItem `json:"body,omitempty"` }
AddOneProductIntoCartOK add one product into the cart
swagger:response addOneProductIntoCartOK
func NewAddOneProductIntoCartOK ¶
func NewAddOneProductIntoCartOK() *AddOneProductIntoCartOK
NewAddOneProductIntoCartOK creates AddOneProductIntoCartOK with default headers values
func (*AddOneProductIntoCartOK) SetPayload ¶
func (o *AddOneProductIntoCartOK) SetPayload(payload *models.CartItem)
SetPayload sets the payload to the add one product into cart o k response
func (*AddOneProductIntoCartOK) WithPayload ¶
func (o *AddOneProductIntoCartOK) WithPayload(payload *models.CartItem) *AddOneProductIntoCartOK
WithPayload adds the payload to the add one product into cart o k response
func (*AddOneProductIntoCartOK) WriteResponse ¶
func (o *AddOneProductIntoCartOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type AddOneProductIntoCartParams ¶
type AddOneProductIntoCartParams struct { // HTTP Request Object HTTPRequest *http.Request `json:"-"` /* Required: true In: body */ Body AddOneProductIntoCartBody /* Required: true In: path */ CartID strfmt.UUID }
AddOneProductIntoCartParams contains all the bound params for the add one product into cart operation typically these are obtained from a http.Request
swagger:parameters addOneProductIntoCart
func NewAddOneProductIntoCartParams ¶
func NewAddOneProductIntoCartParams() AddOneProductIntoCartParams
NewAddOneProductIntoCartParams creates a new AddOneProductIntoCartParams object no default values defined in spec.
func (*AddOneProductIntoCartParams) BindRequest ¶
func (o *AddOneProductIntoCartParams) 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 NewAddOneProductIntoCartParams() beforehand.
type AddOneProductIntoCartURL ¶
type AddOneProductIntoCartURL struct { CartID strfmt.UUID // contains filtered or unexported fields }
AddOneProductIntoCartURL generates an URL for the add one product into cart operation
func (*AddOneProductIntoCartURL) Build ¶
func (o *AddOneProductIntoCartURL) Build() (*url.URL, error)
Build a url path and query string
func (*AddOneProductIntoCartURL) BuildFull ¶
func (o *AddOneProductIntoCartURL) BuildFull(scheme, host string) (*url.URL, error)
BuildFull builds a full url with scheme, host, path and query string
func (*AddOneProductIntoCartURL) Must ¶
Must is a helper function to panic when the url builder returns an error
func (*AddOneProductIntoCartURL) SetBasePath ¶
func (o *AddOneProductIntoCartURL) 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 (*AddOneProductIntoCartURL) String ¶
func (o *AddOneProductIntoCartURL) String() string
String returns the string representation of the path with query string
func (*AddOneProductIntoCartURL) StringFull ¶
func (o *AddOneProductIntoCartURL) StringFull(scheme, host string) string
StringFull returns the string representation of a complete url
func (*AddOneProductIntoCartURL) WithBasePath ¶
func (o *AddOneProductIntoCartURL) WithBasePath(bp string) *AddOneProductIntoCartURL
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 CreateCart ¶
type CreateCart struct { Context *middleware.Context Handler CreateCartHandler }
CreateCart swagger:route POST /carts carts createCart
Create new cart
func NewCreateCart ¶
func NewCreateCart(ctx *middleware.Context, handler CreateCartHandler) *CreateCart
NewCreateCart creates a new http.Handler for the create cart operation
func (*CreateCart) ServeHTTP ¶
func (o *CreateCart) ServeHTTP(rw http.ResponseWriter, r *http.Request)
type CreateCartDefault ¶
type CreateCartDefault struct { /* In: Body */ Payload *models.Error `json:"body,omitempty"` // contains filtered or unexported fields }
CreateCartDefault generic error response
swagger:response createCartDefault
func NewCreateCartDefault ¶
func NewCreateCartDefault(code int) *CreateCartDefault
NewCreateCartDefault creates CreateCartDefault with default headers values
func (*CreateCartDefault) SetPayload ¶
func (o *CreateCartDefault) SetPayload(payload *models.Error)
SetPayload sets the payload to the create cart default response
func (*CreateCartDefault) SetStatusCode ¶
func (o *CreateCartDefault) SetStatusCode(code int)
SetStatusCode sets the status to the create cart default response
func (*CreateCartDefault) WithPayload ¶
func (o *CreateCartDefault) WithPayload(payload *models.Error) *CreateCartDefault
WithPayload adds the payload to the create cart default response
func (*CreateCartDefault) WithStatusCode ¶
func (o *CreateCartDefault) WithStatusCode(code int) *CreateCartDefault
WithStatusCode adds the status to the create cart default response
func (*CreateCartDefault) WriteResponse ¶
func (o *CreateCartDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type CreateCartHandler ¶
type CreateCartHandler interface {
Handle(CreateCartParams) middleware.Responder
}
CreateCartHandler interface for that can handle valid create cart params
type CreateCartHandlerFunc ¶
type CreateCartHandlerFunc func(CreateCartParams) middleware.Responder
CreateCartHandlerFunc turns a function with the right signature into a create cart handler
func (CreateCartHandlerFunc) Handle ¶
func (fn CreateCartHandlerFunc) Handle(params CreateCartParams) middleware.Responder
Handle executing the request and returning a response
type CreateCartOK ¶
type CreateCartOK struct { /* In: Body */ Payload *CreateCartOKBody `json:"body,omitempty"` }
CreateCartOK created new cart
swagger:response createCartOK
func NewCreateCartOK ¶
func NewCreateCartOK() *CreateCartOK
NewCreateCartOK creates CreateCartOK with default headers values
func (*CreateCartOK) SetPayload ¶
func (o *CreateCartOK) SetPayload(payload *CreateCartOKBody)
SetPayload sets the payload to the create cart o k response
func (*CreateCartOK) WithPayload ¶
func (o *CreateCartOK) WithPayload(payload *CreateCartOKBody) *CreateCartOK
WithPayload adds the payload to the create cart o k response
func (*CreateCartOK) WriteResponse ¶
func (o *CreateCartOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type CreateCartOKBody ¶
type CreateCartOKBody struct { // cart id // Required: true // Format: uuid CartID *strfmt.UUID `json:"cart_id"` }
CreateCartOKBody create cart o k body
swagger:model CreateCartOKBody
func (*CreateCartOKBody) MarshalBinary ¶
func (o *CreateCartOKBody) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*CreateCartOKBody) UnmarshalBinary ¶
func (o *CreateCartOKBody) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type CreateCartParams ¶
CreateCartParams contains all the bound params for the create cart operation typically these are obtained from a http.Request
swagger:parameters createCart
func NewCreateCartParams ¶
func NewCreateCartParams() CreateCartParams
NewCreateCartParams creates a new CreateCartParams object no default values defined in spec.
func (*CreateCartParams) BindRequest ¶
func (o *CreateCartParams) 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 NewCreateCartParams() beforehand.
type CreateCartURL ¶
type CreateCartURL struct {
// contains filtered or unexported fields
}
CreateCartURL generates an URL for the create cart operation
func (*CreateCartURL) Build ¶
func (o *CreateCartURL) Build() (*url.URL, error)
Build a url path and query string
func (*CreateCartURL) BuildFull ¶
func (o *CreateCartURL) BuildFull(scheme, host string) (*url.URL, error)
BuildFull builds a full url with scheme, host, path and query string
func (*CreateCartURL) Must ¶
Must is a helper function to panic when the url builder returns an error
func (*CreateCartURL) SetBasePath ¶
func (o *CreateCartURL) 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 (*CreateCartURL) String ¶
func (o *CreateCartURL) String() string
String returns the string representation of the path with query string
func (*CreateCartURL) StringFull ¶
func (o *CreateCartURL) StringFull(scheme, host string) string
StringFull returns the string representation of a complete url
func (*CreateCartURL) WithBasePath ¶
func (o *CreateCartURL) WithBasePath(bp string) *CreateCartURL
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 ListProductsInCart ¶
type ListProductsInCart struct { Context *middleware.Context Handler ListProductsInCartHandler }
ListProductsInCart swagger:route GET /carts/{cart_id}/products carts listProductsInCart
List Products in the cart
func NewListProductsInCart ¶
func NewListProductsInCart(ctx *middleware.Context, handler ListProductsInCartHandler) *ListProductsInCart
NewListProductsInCart creates a new http.Handler for the list products in cart operation
func (*ListProductsInCart) ServeHTTP ¶
func (o *ListProductsInCart) ServeHTTP(rw http.ResponseWriter, r *http.Request)
type ListProductsInCartDefault ¶
type ListProductsInCartDefault struct { /* In: Body */ Payload *models.Error `json:"body,omitempty"` // contains filtered or unexported fields }
ListProductsInCartDefault generic error response
swagger:response listProductsInCartDefault
func NewListProductsInCartDefault ¶
func NewListProductsInCartDefault(code int) *ListProductsInCartDefault
NewListProductsInCartDefault creates ListProductsInCartDefault with default headers values
func (*ListProductsInCartDefault) SetPayload ¶
func (o *ListProductsInCartDefault) SetPayload(payload *models.Error)
SetPayload sets the payload to the list products in cart default response
func (*ListProductsInCartDefault) SetStatusCode ¶
func (o *ListProductsInCartDefault) SetStatusCode(code int)
SetStatusCode sets the status to the list products in cart default response
func (*ListProductsInCartDefault) WithPayload ¶
func (o *ListProductsInCartDefault) WithPayload(payload *models.Error) *ListProductsInCartDefault
WithPayload adds the payload to the list products in cart default response
func (*ListProductsInCartDefault) WithStatusCode ¶
func (o *ListProductsInCartDefault) WithStatusCode(code int) *ListProductsInCartDefault
WithStatusCode adds the status to the list products in cart default response
func (*ListProductsInCartDefault) WriteResponse ¶
func (o *ListProductsInCartDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type ListProductsInCartHandler ¶
type ListProductsInCartHandler interface {
Handle(ListProductsInCartParams) middleware.Responder
}
ListProductsInCartHandler interface for that can handle valid list products in cart params
type ListProductsInCartHandlerFunc ¶
type ListProductsInCartHandlerFunc func(ListProductsInCartParams) middleware.Responder
ListProductsInCartHandlerFunc turns a function with the right signature into a list products in cart handler
func (ListProductsInCartHandlerFunc) Handle ¶
func (fn ListProductsInCartHandlerFunc) Handle(params ListProductsInCartParams) middleware.Responder
Handle executing the request and returning a response
type ListProductsInCartOK ¶
type ListProductsInCartOK struct { /* In: Body */ Payload models.CartItems `json:"body,omitempty"` }
ListProductsInCartOK list the products in the cart
swagger:response listProductsInCartOK
func NewListProductsInCartOK ¶
func NewListProductsInCartOK() *ListProductsInCartOK
NewListProductsInCartOK creates ListProductsInCartOK with default headers values
func (*ListProductsInCartOK) SetPayload ¶
func (o *ListProductsInCartOK) SetPayload(payload models.CartItems)
SetPayload sets the payload to the list products in cart o k response
func (*ListProductsInCartOK) WithPayload ¶
func (o *ListProductsInCartOK) WithPayload(payload models.CartItems) *ListProductsInCartOK
WithPayload adds the payload to the list products in cart o k response
func (*ListProductsInCartOK) WriteResponse ¶
func (o *ListProductsInCartOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type ListProductsInCartParams ¶
type ListProductsInCartParams struct { // HTTP Request Object HTTPRequest *http.Request `json:"-"` /* Required: true In: path */ CartID strfmt.UUID }
ListProductsInCartParams contains all the bound params for the list products in cart operation typically these are obtained from a http.Request
swagger:parameters listProductsInCart
func NewListProductsInCartParams ¶
func NewListProductsInCartParams() ListProductsInCartParams
NewListProductsInCartParams creates a new ListProductsInCartParams object no default values defined in spec.
func (*ListProductsInCartParams) BindRequest ¶
func (o *ListProductsInCartParams) 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 NewListProductsInCartParams() beforehand.
type ListProductsInCartURL ¶
ListProductsInCartURL generates an URL for the list products in cart operation
func (*ListProductsInCartURL) Build ¶
func (o *ListProductsInCartURL) Build() (*url.URL, error)
Build a url path and query string
func (*ListProductsInCartURL) BuildFull ¶
func (o *ListProductsInCartURL) BuildFull(scheme, host string) (*url.URL, error)
BuildFull builds a full url with scheme, host, path and query string
func (*ListProductsInCartURL) Must ¶
Must is a helper function to panic when the url builder returns an error
func (*ListProductsInCartURL) SetBasePath ¶
func (o *ListProductsInCartURL) 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 (*ListProductsInCartURL) String ¶
func (o *ListProductsInCartURL) String() string
String returns the string representation of the path with query string
func (*ListProductsInCartURL) StringFull ¶
func (o *ListProductsInCartURL) StringFull(scheme, host string) string
StringFull returns the string representation of a complete url
func (*ListProductsInCartURL) WithBasePath ¶
func (o *ListProductsInCartURL) WithBasePath(bp string) *ListProductsInCartURL
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 RemoveOneProductFromCart ¶
type RemoveOneProductFromCart struct { Context *middleware.Context Handler RemoveOneProductFromCartHandler }
RemoveOneProductFromCart swagger:route DELETE /carts/{cart_id}/products/{product_id} carts removeOneProductFromCart
Delete a Product from cart
func NewRemoveOneProductFromCart ¶
func NewRemoveOneProductFromCart(ctx *middleware.Context, handler RemoveOneProductFromCartHandler) *RemoveOneProductFromCart
NewRemoveOneProductFromCart creates a new http.Handler for the remove one product from cart operation
func (*RemoveOneProductFromCart) ServeHTTP ¶
func (o *RemoveOneProductFromCart) ServeHTTP(rw http.ResponseWriter, r *http.Request)
type RemoveOneProductFromCartDefault ¶
type RemoveOneProductFromCartDefault struct { /* In: Body */ Payload *models.Error `json:"body,omitempty"` // contains filtered or unexported fields }
RemoveOneProductFromCartDefault error
swagger:response removeOneProductFromCartDefault
func NewRemoveOneProductFromCartDefault ¶
func NewRemoveOneProductFromCartDefault(code int) *RemoveOneProductFromCartDefault
NewRemoveOneProductFromCartDefault creates RemoveOneProductFromCartDefault with default headers values
func (*RemoveOneProductFromCartDefault) SetPayload ¶
func (o *RemoveOneProductFromCartDefault) SetPayload(payload *models.Error)
SetPayload sets the payload to the remove one product from cart default response
func (*RemoveOneProductFromCartDefault) SetStatusCode ¶
func (o *RemoveOneProductFromCartDefault) SetStatusCode(code int)
SetStatusCode sets the status to the remove one product from cart default response
func (*RemoveOneProductFromCartDefault) WithPayload ¶
func (o *RemoveOneProductFromCartDefault) WithPayload(payload *models.Error) *RemoveOneProductFromCartDefault
WithPayload adds the payload to the remove one product from cart default response
func (*RemoveOneProductFromCartDefault) WithStatusCode ¶
func (o *RemoveOneProductFromCartDefault) WithStatusCode(code int) *RemoveOneProductFromCartDefault
WithStatusCode adds the status to the remove one product from cart default response
func (*RemoveOneProductFromCartDefault) WriteResponse ¶
func (o *RemoveOneProductFromCartDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type RemoveOneProductFromCartHandler ¶
type RemoveOneProductFromCartHandler interface {
Handle(RemoveOneProductFromCartParams) middleware.Responder
}
RemoveOneProductFromCartHandler interface for that can handle valid remove one product from cart params
type RemoveOneProductFromCartHandlerFunc ¶
type RemoveOneProductFromCartHandlerFunc func(RemoveOneProductFromCartParams) middleware.Responder
RemoveOneProductFromCartHandlerFunc turns a function with the right signature into a remove one product from cart handler
func (RemoveOneProductFromCartHandlerFunc) Handle ¶
func (fn RemoveOneProductFromCartHandlerFunc) Handle(params RemoveOneProductFromCartParams) middleware.Responder
Handle executing the request and returning a response
type RemoveOneProductFromCartNoContent ¶
type RemoveOneProductFromCartNoContent struct { }
RemoveOneProductFromCartNoContent product is deleted from cart
swagger:response removeOneProductFromCartNoContent
func NewRemoveOneProductFromCartNoContent ¶
func NewRemoveOneProductFromCartNoContent() *RemoveOneProductFromCartNoContent
NewRemoveOneProductFromCartNoContent creates RemoveOneProductFromCartNoContent with default headers values
func (*RemoveOneProductFromCartNoContent) WriteResponse ¶
func (o *RemoveOneProductFromCartNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type RemoveOneProductFromCartParams ¶
type RemoveOneProductFromCartParams struct { // HTTP Request Object HTTPRequest *http.Request `json:"-"` /* Required: true In: path */ CartID strfmt.UUID /* Required: true In: path */ ProductID int64 }
RemoveOneProductFromCartParams contains all the bound params for the remove one product from cart operation typically these are obtained from a http.Request
swagger:parameters removeOneProductFromCart
func NewRemoveOneProductFromCartParams ¶
func NewRemoveOneProductFromCartParams() RemoveOneProductFromCartParams
NewRemoveOneProductFromCartParams creates a new RemoveOneProductFromCartParams object no default values defined in spec.
func (*RemoveOneProductFromCartParams) BindRequest ¶
func (o *RemoveOneProductFromCartParams) 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 NewRemoveOneProductFromCartParams() beforehand.
type RemoveOneProductFromCartURL ¶
type RemoveOneProductFromCartURL struct { CartID strfmt.UUID ProductID int64 // contains filtered or unexported fields }
RemoveOneProductFromCartURL generates an URL for the remove one product from cart operation
func (*RemoveOneProductFromCartURL) Build ¶
func (o *RemoveOneProductFromCartURL) Build() (*url.URL, error)
Build a url path and query string
func (*RemoveOneProductFromCartURL) BuildFull ¶
func (o *RemoveOneProductFromCartURL) BuildFull(scheme, host string) (*url.URL, error)
BuildFull builds a full url with scheme, host, path and query string
func (*RemoveOneProductFromCartURL) Must ¶
Must is a helper function to panic when the url builder returns an error
func (*RemoveOneProductFromCartURL) SetBasePath ¶
func (o *RemoveOneProductFromCartURL) 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 (*RemoveOneProductFromCartURL) String ¶
func (o *RemoveOneProductFromCartURL) String() string
String returns the string representation of the path with query string
func (*RemoveOneProductFromCartURL) StringFull ¶
func (o *RemoveOneProductFromCartURL) StringFull(scheme, host string) string
StringFull returns the string representation of a complete url
func (*RemoveOneProductFromCartURL) WithBasePath ¶
func (o *RemoveOneProductFromCartURL) WithBasePath(bp string) *RemoveOneProductFromCartURL
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
Source Files ¶
- add_one_product_into_cart.go
- add_one_product_into_cart_parameters.go
- add_one_product_into_cart_responses.go
- add_one_product_into_cart_urlbuilder.go
- create_cart.go
- create_cart_parameters.go
- create_cart_responses.go
- create_cart_urlbuilder.go
- list_products_in_cart.go
- list_products_in_cart_parameters.go
- list_products_in_cart_responses.go
- list_products_in_cart_urlbuilder.go
- remove_one_product_from_cart.go
- remove_one_product_from_cart_parameters.go
- remove_one_product_from_cart_responses.go
- remove_one_product_from_cart_urlbuilder.go