Documentation ¶
Index ¶
- type AddItemDefault
- type AddItemOK
- type AddItemParams
- func (o *AddItemParams) SetBody(body *models.AddItemParamsBody)
- func (o *AddItemParams) SetContext(ctx context.Context)
- func (o *AddItemParams) SetDefaults()
- func (o *AddItemParams) SetHTTPClient(client *http.Client)
- func (o *AddItemParams) SetID(id string)
- func (o *AddItemParams) SetTimeout(timeout time.Duration)
- func (o *AddItemParams) WithBody(body *models.AddItemParamsBody) *AddItemParams
- func (o *AddItemParams) WithContext(ctx context.Context) *AddItemParams
- func (o *AddItemParams) WithDefaults() *AddItemParams
- func (o *AddItemParams) WithHTTPClient(client *http.Client) *AddItemParams
- func (o *AddItemParams) WithID(id string) *AddItemParams
- func (o *AddItemParams) WithTimeout(timeout time.Duration) *AddItemParams
- func (o *AddItemParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type AddItemReader
- type Client
- type ClientOption
- type ClientService
- type RemoveItemDefault
- type RemoveItemOK
- type RemoveItemParams
- func (o *RemoveItemParams) SetBody(body *models.RemoveItemParamsBody)
- func (o *RemoveItemParams) SetContext(ctx context.Context)
- func (o *RemoveItemParams) SetDefaults()
- func (o *RemoveItemParams) SetHTTPClient(client *http.Client)
- func (o *RemoveItemParams) SetID(id string)
- func (o *RemoveItemParams) SetTimeout(timeout time.Duration)
- func (o *RemoveItemParams) WithBody(body *models.RemoveItemParamsBody) *RemoveItemParams
- func (o *RemoveItemParams) WithContext(ctx context.Context) *RemoveItemParams
- func (o *RemoveItemParams) WithDefaults() *RemoveItemParams
- func (o *RemoveItemParams) WithHTTPClient(client *http.Client) *RemoveItemParams
- func (o *RemoveItemParams) WithID(id string) *RemoveItemParams
- func (o *RemoveItemParams) WithTimeout(timeout time.Duration) *RemoveItemParams
- func (o *RemoveItemParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type RemoveItemReader
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddItemDefault ¶
AddItemDefault describes a response with status code -1, with default header values.
An unexpected error response.
func NewAddItemDefault ¶
func NewAddItemDefault(code int) *AddItemDefault
NewAddItemDefault creates a AddItemDefault with default headers values
func (*AddItemDefault) Code ¶
func (o *AddItemDefault) Code() int
Code gets the status code for the add item default response
func (*AddItemDefault) Error ¶
func (o *AddItemDefault) Error() string
func (*AddItemDefault) GetPayload ¶
func (o *AddItemDefault) GetPayload() *models.RPCStatus
type AddItemOK ¶
type AddItemOK struct {
Payload models.BasketspbAddItemResponse
}
AddItemOK describes a response with status code 200, with default header values.
A successful response.
func NewAddItemOK ¶
func NewAddItemOK() *AddItemOK
NewAddItemOK creates a AddItemOK with default headers values
func (*AddItemOK) GetPayload ¶
func (o *AddItemOK) GetPayload() models.BasketspbAddItemResponse
type AddItemParams ¶
type AddItemParams struct { // Body. Body *models.AddItemParamsBody // ID. ID string Context context.Context HTTPClient *http.Client // contains filtered or unexported fields }
AddItemParams contains all the parameters to send to the API endpoint
for the add item operation. Typically these are written to a http.Request.
func NewAddItemParams ¶
func NewAddItemParams() *AddItemParams
NewAddItemParams creates a new AddItemParams object, with the default timeout for this client.
Default values are not hydrated, since defaults are normally applied by the API server side.
To enforce default values in parameter, use SetDefaults or WithDefaults.
func NewAddItemParamsWithContext ¶
func NewAddItemParamsWithContext(ctx context.Context) *AddItemParams
NewAddItemParamsWithContext creates a new AddItemParams object with the ability to set a context for a request.
func NewAddItemParamsWithHTTPClient ¶
func NewAddItemParamsWithHTTPClient(client *http.Client) *AddItemParams
NewAddItemParamsWithHTTPClient creates a new AddItemParams object with the ability to set a custom HTTPClient for a request.
func NewAddItemParamsWithTimeout ¶
func NewAddItemParamsWithTimeout(timeout time.Duration) *AddItemParams
NewAddItemParamsWithTimeout creates a new AddItemParams object with the ability to set a timeout on a request.
func (*AddItemParams) SetBody ¶
func (o *AddItemParams) SetBody(body *models.AddItemParamsBody)
SetBody adds the body to the add item params
func (*AddItemParams) SetContext ¶
func (o *AddItemParams) SetContext(ctx context.Context)
SetContext adds the context to the add item params
func (*AddItemParams) SetDefaults ¶
func (o *AddItemParams) SetDefaults()
SetDefaults hydrates default values in the add item params (not the query body).
All values with no default are reset to their zero value.
func (*AddItemParams) SetHTTPClient ¶
func (o *AddItemParams) SetHTTPClient(client *http.Client)
SetHTTPClient adds the HTTPClient to the add item params
func (*AddItemParams) SetID ¶
func (o *AddItemParams) SetID(id string)
SetID adds the id to the add item params
func (*AddItemParams) SetTimeout ¶
func (o *AddItemParams) SetTimeout(timeout time.Duration)
SetTimeout adds the timeout to the add item params
func (*AddItemParams) WithBody ¶
func (o *AddItemParams) WithBody(body *models.AddItemParamsBody) *AddItemParams
WithBody adds the body to the add item params
func (*AddItemParams) WithContext ¶
func (o *AddItemParams) WithContext(ctx context.Context) *AddItemParams
WithContext adds the context to the add item params
func (*AddItemParams) WithDefaults ¶
func (o *AddItemParams) WithDefaults() *AddItemParams
WithDefaults hydrates default values in the add item params (not the query body).
All values with no default are reset to their zero value.
func (*AddItemParams) WithHTTPClient ¶
func (o *AddItemParams) WithHTTPClient(client *http.Client) *AddItemParams
WithHTTPClient adds the HTTPClient to the add item params
func (*AddItemParams) WithID ¶
func (o *AddItemParams) WithID(id string) *AddItemParams
WithID adds the id to the add item params
func (*AddItemParams) WithTimeout ¶
func (o *AddItemParams) WithTimeout(timeout time.Duration) *AddItemParams
WithTimeout adds the timeout to the add item params
func (*AddItemParams) WriteToRequest ¶
func (o *AddItemParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type AddItemReader ¶
type AddItemReader struct {
// contains filtered or unexported fields
}
AddItemReader is a Reader for the AddItem structure.
func (*AddItemReader) ReadResponse ¶
func (o *AddItemReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)
ReadResponse reads a server response into the received o.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client for item API
func (*Client) AddItem ¶
func (a *Client) AddItem(params *AddItemParams, opts ...ClientOption) (*AddItemOK, error)
AddItem adds or add quantity to an item in the shopping basket
func (*Client) RemoveItem ¶
func (a *Client) RemoveItem(params *RemoveItemParams, opts ...ClientOption) (*RemoveItemOK, error)
RemoveItem removes or remove quantity to an item in the shopping basket
func (*Client) SetTransport ¶
func (a *Client) SetTransport(transport runtime.ClientTransport)
SetTransport changes the transport on the client
type ClientOption ¶
type ClientOption func(*runtime.ClientOperation)
ClientOption is the option for Client methods
type ClientService ¶
type ClientService interface { AddItem(params *AddItemParams, opts ...ClientOption) (*AddItemOK, error) RemoveItem(params *RemoveItemParams, opts ...ClientOption) (*RemoveItemOK, error) SetTransport(transport runtime.ClientTransport) }
ClientService is the interface for Client methods
func New ¶
func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService
New creates a new item API client.
type RemoveItemDefault ¶
type RemoveItemDefault struct { Payload *models.RPCStatus // contains filtered or unexported fields }
RemoveItemDefault describes a response with status code -1, with default header values.
An unexpected error response.
func NewRemoveItemDefault ¶
func NewRemoveItemDefault(code int) *RemoveItemDefault
NewRemoveItemDefault creates a RemoveItemDefault with default headers values
func (*RemoveItemDefault) Code ¶
func (o *RemoveItemDefault) Code() int
Code gets the status code for the remove item default response
func (*RemoveItemDefault) Error ¶
func (o *RemoveItemDefault) Error() string
func (*RemoveItemDefault) GetPayload ¶
func (o *RemoveItemDefault) GetPayload() *models.RPCStatus
type RemoveItemOK ¶
type RemoveItemOK struct {
Payload models.BasketspbRemoveItemResponse
}
RemoveItemOK describes a response with status code 200, with default header values.
A successful response.
func NewRemoveItemOK ¶
func NewRemoveItemOK() *RemoveItemOK
NewRemoveItemOK creates a RemoveItemOK with default headers values
func (*RemoveItemOK) Error ¶
func (o *RemoveItemOK) Error() string
func (*RemoveItemOK) GetPayload ¶
func (o *RemoveItemOK) GetPayload() models.BasketspbRemoveItemResponse
type RemoveItemParams ¶
type RemoveItemParams struct { // Body. Body *models.RemoveItemParamsBody // ID. ID string Context context.Context HTTPClient *http.Client // contains filtered or unexported fields }
RemoveItemParams contains all the parameters to send to the API endpoint
for the remove item operation. Typically these are written to a http.Request.
func NewRemoveItemParams ¶
func NewRemoveItemParams() *RemoveItemParams
NewRemoveItemParams creates a new RemoveItemParams object, with the default timeout for this client.
Default values are not hydrated, since defaults are normally applied by the API server side.
To enforce default values in parameter, use SetDefaults or WithDefaults.
func NewRemoveItemParamsWithContext ¶
func NewRemoveItemParamsWithContext(ctx context.Context) *RemoveItemParams
NewRemoveItemParamsWithContext creates a new RemoveItemParams object with the ability to set a context for a request.
func NewRemoveItemParamsWithHTTPClient ¶
func NewRemoveItemParamsWithHTTPClient(client *http.Client) *RemoveItemParams
NewRemoveItemParamsWithHTTPClient creates a new RemoveItemParams object with the ability to set a custom HTTPClient for a request.
func NewRemoveItemParamsWithTimeout ¶
func NewRemoveItemParamsWithTimeout(timeout time.Duration) *RemoveItemParams
NewRemoveItemParamsWithTimeout creates a new RemoveItemParams object with the ability to set a timeout on a request.
func (*RemoveItemParams) SetBody ¶
func (o *RemoveItemParams) SetBody(body *models.RemoveItemParamsBody)
SetBody adds the body to the remove item params
func (*RemoveItemParams) SetContext ¶
func (o *RemoveItemParams) SetContext(ctx context.Context)
SetContext adds the context to the remove item params
func (*RemoveItemParams) SetDefaults ¶
func (o *RemoveItemParams) SetDefaults()
SetDefaults hydrates default values in the remove item params (not the query body).
All values with no default are reset to their zero value.
func (*RemoveItemParams) SetHTTPClient ¶
func (o *RemoveItemParams) SetHTTPClient(client *http.Client)
SetHTTPClient adds the HTTPClient to the remove item params
func (*RemoveItemParams) SetID ¶
func (o *RemoveItemParams) SetID(id string)
SetID adds the id to the remove item params
func (*RemoveItemParams) SetTimeout ¶
func (o *RemoveItemParams) SetTimeout(timeout time.Duration)
SetTimeout adds the timeout to the remove item params
func (*RemoveItemParams) WithBody ¶
func (o *RemoveItemParams) WithBody(body *models.RemoveItemParamsBody) *RemoveItemParams
WithBody adds the body to the remove item params
func (*RemoveItemParams) WithContext ¶
func (o *RemoveItemParams) WithContext(ctx context.Context) *RemoveItemParams
WithContext adds the context to the remove item params
func (*RemoveItemParams) WithDefaults ¶
func (o *RemoveItemParams) WithDefaults() *RemoveItemParams
WithDefaults hydrates default values in the remove item params (not the query body).
All values with no default are reset to their zero value.
func (*RemoveItemParams) WithHTTPClient ¶
func (o *RemoveItemParams) WithHTTPClient(client *http.Client) *RemoveItemParams
WithHTTPClient adds the HTTPClient to the remove item params
func (*RemoveItemParams) WithID ¶
func (o *RemoveItemParams) WithID(id string) *RemoveItemParams
WithID adds the id to the remove item params
func (*RemoveItemParams) WithTimeout ¶
func (o *RemoveItemParams) WithTimeout(timeout time.Duration) *RemoveItemParams
WithTimeout adds the timeout to the remove item params
func (*RemoveItemParams) WriteToRequest ¶
func (o *RemoveItemParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type RemoveItemReader ¶
type RemoveItemReader struct {
// contains filtered or unexported fields
}
RemoveItemReader is a Reader for the RemoveItem structure.
func (*RemoveItemReader) ReadResponse ¶
func (o *RemoveItemReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)
ReadResponse reads a server response into the received o.