Documentation
¶
Index ¶
- type AddItemDefault
- func (o *AddItemDefault) Code() int
- func (o *AddItemDefault) Error() string
- func (o *AddItemDefault) GetPayload() *models.RPCStatus
- func (o *AddItemDefault) IsClientError() bool
- func (o *AddItemDefault) IsCode(code int) bool
- func (o *AddItemDefault) IsRedirect() bool
- func (o *AddItemDefault) IsServerError() bool
- func (o *AddItemDefault) IsSuccess() bool
- func (o *AddItemDefault) String() string
- type AddItemOK
- func (o *AddItemOK) Error() string
- func (o *AddItemOK) GetPayload() models.BasketspbAddItemResponse
- func (o *AddItemOK) IsClientError() bool
- func (o *AddItemOK) IsCode(code int) bool
- func (o *AddItemOK) IsRedirect() bool
- func (o *AddItemOK) IsServerError() bool
- func (o *AddItemOK) IsSuccess() bool
- func (o *AddItemOK) String() string
- 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
- func (o *RemoveItemDefault) Code() int
- func (o *RemoveItemDefault) Error() string
- func (o *RemoveItemDefault) GetPayload() *models.RPCStatus
- func (o *RemoveItemDefault) IsClientError() bool
- func (o *RemoveItemDefault) IsCode(code int) bool
- func (o *RemoveItemDefault) IsRedirect() bool
- func (o *RemoveItemDefault) IsServerError() bool
- func (o *RemoveItemDefault) IsSuccess() bool
- func (o *RemoveItemDefault) String() string
- type RemoveItemOK
- func (o *RemoveItemOK) Error() string
- func (o *RemoveItemOK) GetPayload() models.BasketspbRemoveItemResponse
- func (o *RemoveItemOK) IsClientError() bool
- func (o *RemoveItemOK) IsCode(code int) bool
- func (o *RemoveItemOK) IsRedirect() bool
- func (o *RemoveItemOK) IsServerError() bool
- func (o *RemoveItemOK) IsSuccess() bool
- func (o *RemoveItemOK) String() string
- 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
func (*AddItemDefault) IsClientError ¶
func (o *AddItemDefault) IsClientError() bool
IsClientError returns true when this add item default response has a 4xx status code
func (*AddItemDefault) IsCode ¶
func (o *AddItemDefault) IsCode(code int) bool
IsCode returns true when this add item default response a status code equal to that given
func (*AddItemDefault) IsRedirect ¶
func (o *AddItemDefault) IsRedirect() bool
IsRedirect returns true when this add item default response has a 3xx status code
func (*AddItemDefault) IsServerError ¶
func (o *AddItemDefault) IsServerError() bool
IsServerError returns true when this add item default response has a 5xx status code
func (*AddItemDefault) IsSuccess ¶
func (o *AddItemDefault) IsSuccess() bool
IsSuccess returns true when this add item default response has a 2xx status code
func (*AddItemDefault) String ¶
func (o *AddItemDefault) String() string
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
func (*AddItemOK) IsClientError ¶
IsClientError returns true when this add item o k response has a 4xx status code
func (*AddItemOK) IsCode ¶
IsCode returns true when this add item o k response a status code equal to that given
func (*AddItemOK) IsRedirect ¶
IsRedirect returns true when this add item o k response has a 3xx status code
func (*AddItemOK) IsServerError ¶
IsServerError returns true when this add item o k response has a 5xx status code
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
func (*RemoveItemDefault) IsClientError ¶
func (o *RemoveItemDefault) IsClientError() bool
IsClientError returns true when this remove item default response has a 4xx status code
func (*RemoveItemDefault) IsCode ¶
func (o *RemoveItemDefault) IsCode(code int) bool
IsCode returns true when this remove item default response a status code equal to that given
func (*RemoveItemDefault) IsRedirect ¶
func (o *RemoveItemDefault) IsRedirect() bool
IsRedirect returns true when this remove item default response has a 3xx status code
func (*RemoveItemDefault) IsServerError ¶
func (o *RemoveItemDefault) IsServerError() bool
IsServerError returns true when this remove item default response has a 5xx status code
func (*RemoveItemDefault) IsSuccess ¶
func (o *RemoveItemDefault) IsSuccess() bool
IsSuccess returns true when this remove item default response has a 2xx status code
func (*RemoveItemDefault) String ¶
func (o *RemoveItemDefault) String() string
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
func (*RemoveItemOK) IsClientError ¶
func (o *RemoveItemOK) IsClientError() bool
IsClientError returns true when this remove item o k response has a 4xx status code
func (*RemoveItemOK) IsCode ¶
func (o *RemoveItemOK) IsCode(code int) bool
IsCode returns true when this remove item o k response a status code equal to that given
func (*RemoveItemOK) IsRedirect ¶
func (o *RemoveItemOK) IsRedirect() bool
IsRedirect returns true when this remove item o k response has a 3xx status code
func (*RemoveItemOK) IsServerError ¶
func (o *RemoveItemOK) IsServerError() bool
IsServerError returns true when this remove item o k response has a 5xx status code
func (*RemoveItemOK) IsSuccess ¶
func (o *RemoveItemOK) IsSuccess() bool
IsSuccess returns true when this remove item o k response has a 2xx status code
func (*RemoveItemOK) String ¶
func (o *RemoveItemOK) String() string
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.