item

package
v0.0.0-...-76fafce Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddItemDefault

type AddItemDefault struct {
	Payload *models.RPCStatus
	// contains filtered or unexported fields
}
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) Error

func (o *AddItemOK) Error() string

func (*AddItemOK) GetPayload

func (o *AddItemOK) GetPayload() models.BasketspbAddItemResponse

func (*AddItemOK) IsClientError

func (o *AddItemOK) IsClientError() bool

IsClientError returns true when this add item o k response has a 4xx status code

func (*AddItemOK) IsCode

func (o *AddItemOK) IsCode(code int) bool

IsCode returns true when this add item o k response a status code equal to that given

func (*AddItemOK) IsRedirect

func (o *AddItemOK) IsRedirect() bool

IsRedirect returns true when this add item o k response has a 3xx status code

func (*AddItemOK) IsServerError

func (o *AddItemOK) IsServerError() bool

IsServerError returns true when this add item o k response has a 5xx status code

func (*AddItemOK) IsSuccess

func (o *AddItemOK) IsSuccess() bool

IsSuccess returns true when this add item o k response has a 2xx status code

func (*AddItemOK) String

func (o *AddItemOK) String() string

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

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 (*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

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL