Documentation
¶
Index ¶
- type Client
- func (a *Client) CreateProduct(params *CreateProductParams, opts ...ClientOption) (*CreateProductOK, error)
- func (a *Client) DeleteProduct(params *DeleteProductParams, opts ...ClientOption) (*DeleteProductCreated, error)
- func (a *Client) ListAllProducts(params *ListAllProductsParams, opts ...ClientOption) (*ListAllProductsOK, error)
- func (a *Client) ListSingleProduct(params *ListSingleProductParams, opts ...ClientOption) (*ListSingleProductOK, error)
- func (a *Client) SetTransport(transport runtime.ClientTransport)
- func (a *Client) UpdateProduct(params *UpdateProductParams, opts ...ClientOption) (*UpdateProductCreated, error)
- type ClientOption
- type ClientService
- type CreateProductNotImplemented
- type CreateProductOK
- type CreateProductParams
- func (o *CreateProductParams) SetBody(body *models.Product)
- func (o *CreateProductParams) SetContext(ctx context.Context)
- func (o *CreateProductParams) SetDefaults()
- func (o *CreateProductParams) SetHTTPClient(client *http.Client)
- func (o *CreateProductParams) SetTimeout(timeout time.Duration)
- func (o *CreateProductParams) WithBody(body *models.Product) *CreateProductParams
- func (o *CreateProductParams) WithContext(ctx context.Context) *CreateProductParams
- func (o *CreateProductParams) WithDefaults() *CreateProductParams
- func (o *CreateProductParams) WithHTTPClient(client *http.Client) *CreateProductParams
- func (o *CreateProductParams) WithTimeout(timeout time.Duration) *CreateProductParams
- func (o *CreateProductParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type CreateProductReader
- type CreateProductUnprocessableEntity
- type DeleteProductCreated
- type DeleteProductNotFound
- type DeleteProductNotImplemented
- type DeleteProductParams
- func (o *DeleteProductParams) SetContext(ctx context.Context)
- func (o *DeleteProductParams) SetDefaults()
- func (o *DeleteProductParams) SetHTTPClient(client *http.Client)
- func (o *DeleteProductParams) SetID(id int64)
- func (o *DeleteProductParams) SetTimeout(timeout time.Duration)
- func (o *DeleteProductParams) WithContext(ctx context.Context) *DeleteProductParams
- func (o *DeleteProductParams) WithDefaults() *DeleteProductParams
- func (o *DeleteProductParams) WithHTTPClient(client *http.Client) *DeleteProductParams
- func (o *DeleteProductParams) WithID(id int64) *DeleteProductParams
- func (o *DeleteProductParams) WithTimeout(timeout time.Duration) *DeleteProductParams
- func (o *DeleteProductParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type DeleteProductReader
- type ListAllProductsOK
- type ListAllProductsParams
- func NewListAllProductsParams() *ListAllProductsParams
- func NewListAllProductsParamsWithContext(ctx context.Context) *ListAllProductsParams
- func NewListAllProductsParamsWithHTTPClient(client *http.Client) *ListAllProductsParams
- func NewListAllProductsParamsWithTimeout(timeout time.Duration) *ListAllProductsParams
- func (o *ListAllProductsParams) SetContext(ctx context.Context)
- func (o *ListAllProductsParams) SetDefaults()
- func (o *ListAllProductsParams) SetHTTPClient(client *http.Client)
- func (o *ListAllProductsParams) SetTimeout(timeout time.Duration)
- func (o *ListAllProductsParams) WithContext(ctx context.Context) *ListAllProductsParams
- func (o *ListAllProductsParams) WithDefaults() *ListAllProductsParams
- func (o *ListAllProductsParams) WithHTTPClient(client *http.Client) *ListAllProductsParams
- func (o *ListAllProductsParams) WithTimeout(timeout time.Duration) *ListAllProductsParams
- func (o *ListAllProductsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type ListAllProductsReader
- type ListSingleProductNotFound
- type ListSingleProductOK
- type ListSingleProductParams
- func NewListSingleProductParams() *ListSingleProductParams
- func NewListSingleProductParamsWithContext(ctx context.Context) *ListSingleProductParams
- func NewListSingleProductParamsWithHTTPClient(client *http.Client) *ListSingleProductParams
- func NewListSingleProductParamsWithTimeout(timeout time.Duration) *ListSingleProductParams
- func (o *ListSingleProductParams) SetContext(ctx context.Context)
- func (o *ListSingleProductParams) SetDefaults()
- func (o *ListSingleProductParams) SetHTTPClient(client *http.Client)
- func (o *ListSingleProductParams) SetID(id int64)
- func (o *ListSingleProductParams) SetTimeout(timeout time.Duration)
- func (o *ListSingleProductParams) WithContext(ctx context.Context) *ListSingleProductParams
- func (o *ListSingleProductParams) WithDefaults() *ListSingleProductParams
- func (o *ListSingleProductParams) WithHTTPClient(client *http.Client) *ListSingleProductParams
- func (o *ListSingleProductParams) WithID(id int64) *ListSingleProductParams
- func (o *ListSingleProductParams) WithTimeout(timeout time.Duration) *ListSingleProductParams
- func (o *ListSingleProductParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type ListSingleProductReader
- type UpdateProductCreated
- type UpdateProductNotFound
- type UpdateProductParams
- func (o *UpdateProductParams) SetBody(body *models.Product)
- func (o *UpdateProductParams) SetContext(ctx context.Context)
- func (o *UpdateProductParams) SetDefaults()
- func (o *UpdateProductParams) SetHTTPClient(client *http.Client)
- func (o *UpdateProductParams) SetTimeout(timeout time.Duration)
- func (o *UpdateProductParams) WithBody(body *models.Product) *UpdateProductParams
- func (o *UpdateProductParams) WithContext(ctx context.Context) *UpdateProductParams
- func (o *UpdateProductParams) WithDefaults() *UpdateProductParams
- func (o *UpdateProductParams) WithHTTPClient(client *http.Client) *UpdateProductParams
- func (o *UpdateProductParams) WithTimeout(timeout time.Duration) *UpdateProductParams
- func (o *UpdateProductParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type UpdateProductReader
- type UpdateProductUnprocessableEntity
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client for products API
func (*Client) CreateProduct ¶
func (a *Client) CreateProduct(params *CreateProductParams, opts ...ClientOption) (*CreateProductOK, error)
CreateProduct Create a new product
func (*Client) DeleteProduct ¶
func (a *Client) DeleteProduct(params *DeleteProductParams, opts ...ClientOption) (*DeleteProductCreated, error)
DeleteProduct Returns a list of product
func (*Client) ListAllProducts ¶
func (a *Client) ListAllProducts(params *ListAllProductsParams, opts ...ClientOption) (*ListAllProductsOK, error)
ListAllProducts Return a list of products from the database
func (*Client) ListSingleProduct ¶
func (a *Client) ListSingleProduct(params *ListSingleProductParams, opts ...ClientOption) (*ListSingleProductOK, error)
ListSingleProduct Return a product from the database
func (*Client) SetTransport ¶
func (a *Client) SetTransport(transport runtime.ClientTransport)
SetTransport changes the transport on the client
func (*Client) UpdateProduct ¶
func (a *Client) UpdateProduct(params *UpdateProductParams, opts ...ClientOption) (*UpdateProductCreated, error)
UpdateProduct Update a products details
type ClientOption ¶
type ClientOption func(*runtime.ClientOperation)
ClientOption is the option for Client methods
type ClientService ¶
type ClientService interface { CreateProduct(params *CreateProductParams, opts ...ClientOption) (*CreateProductOK, error) DeleteProduct(params *DeleteProductParams, opts ...ClientOption) (*DeleteProductCreated, error) ListAllProducts(params *ListAllProductsParams, opts ...ClientOption) (*ListAllProductsOK, error) ListSingleProduct(params *ListSingleProductParams, opts ...ClientOption) (*ListSingleProductOK, error) UpdateProduct(params *UpdateProductParams, opts ...ClientOption) (*UpdateProductCreated, 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 products API client.
type CreateProductNotImplemented ¶
type CreateProductNotImplemented struct {
Payload *models.GenericError
}
CreateProductNotImplemented describes a response with status code 501, with default header values.
Generic error message returned as a string
func NewCreateProductNotImplemented ¶
func NewCreateProductNotImplemented() *CreateProductNotImplemented
NewCreateProductNotImplemented creates a CreateProductNotImplemented with default headers values
func (*CreateProductNotImplemented) Error ¶
func (o *CreateProductNotImplemented) Error() string
func (*CreateProductNotImplemented) GetPayload ¶
func (o *CreateProductNotImplemented) GetPayload() *models.GenericError
type CreateProductOK ¶
CreateProductOK describes a response with status code 200, with default header values.
Data structure representing a single product
func NewCreateProductOK ¶
func NewCreateProductOK() *CreateProductOK
NewCreateProductOK creates a CreateProductOK with default headers values
func (*CreateProductOK) Error ¶
func (o *CreateProductOK) Error() string
func (*CreateProductOK) GetPayload ¶
func (o *CreateProductOK) GetPayload() *models.Product
type CreateProductParams ¶
type CreateProductParams struct { /* Body. Product data structure to Update or Create. Note: the id field is ignored by update and create operations */ Body *models.Product Context context.Context HTTPClient *http.Client // contains filtered or unexported fields }
CreateProductParams contains all the parameters to send to the API endpoint
for the create product operation. Typically these are written to a http.Request.
func NewCreateProductParams ¶
func NewCreateProductParams() *CreateProductParams
NewCreateProductParams creates a new CreateProductParams 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 NewCreateProductParamsWithContext ¶
func NewCreateProductParamsWithContext(ctx context.Context) *CreateProductParams
NewCreateProductParamsWithContext creates a new CreateProductParams object with the ability to set a context for a request.
func NewCreateProductParamsWithHTTPClient ¶
func NewCreateProductParamsWithHTTPClient(client *http.Client) *CreateProductParams
NewCreateProductParamsWithHTTPClient creates a new CreateProductParams object with the ability to set a custom HTTPClient for a request.
func NewCreateProductParamsWithTimeout ¶
func NewCreateProductParamsWithTimeout(timeout time.Duration) *CreateProductParams
NewCreateProductParamsWithTimeout creates a new CreateProductParams object with the ability to set a timeout on a request.
func (*CreateProductParams) SetBody ¶
func (o *CreateProductParams) SetBody(body *models.Product)
SetBody adds the body to the create product params
func (*CreateProductParams) SetContext ¶
func (o *CreateProductParams) SetContext(ctx context.Context)
SetContext adds the context to the create product params
func (*CreateProductParams) SetDefaults ¶
func (o *CreateProductParams) SetDefaults()
SetDefaults hydrates default values in the create product params (not the query body).
All values with no default are reset to their zero value.
func (*CreateProductParams) SetHTTPClient ¶
func (o *CreateProductParams) SetHTTPClient(client *http.Client)
SetHTTPClient adds the HTTPClient to the create product params
func (*CreateProductParams) SetTimeout ¶
func (o *CreateProductParams) SetTimeout(timeout time.Duration)
SetTimeout adds the timeout to the create product params
func (*CreateProductParams) WithBody ¶
func (o *CreateProductParams) WithBody(body *models.Product) *CreateProductParams
WithBody adds the body to the create product params
func (*CreateProductParams) WithContext ¶
func (o *CreateProductParams) WithContext(ctx context.Context) *CreateProductParams
WithContext adds the context to the create product params
func (*CreateProductParams) WithDefaults ¶
func (o *CreateProductParams) WithDefaults() *CreateProductParams
WithDefaults hydrates default values in the create product params (not the query body).
All values with no default are reset to their zero value.
func (*CreateProductParams) WithHTTPClient ¶
func (o *CreateProductParams) WithHTTPClient(client *http.Client) *CreateProductParams
WithHTTPClient adds the HTTPClient to the create product params
func (*CreateProductParams) WithTimeout ¶
func (o *CreateProductParams) WithTimeout(timeout time.Duration) *CreateProductParams
WithTimeout adds the timeout to the create product params
func (*CreateProductParams) WriteToRequest ¶
func (o *CreateProductParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type CreateProductReader ¶
type CreateProductReader struct {
// contains filtered or unexported fields
}
CreateProductReader is a Reader for the CreateProduct structure.
func (*CreateProductReader) ReadResponse ¶
func (o *CreateProductReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)
ReadResponse reads a server response into the received o.
type CreateProductUnprocessableEntity ¶
type CreateProductUnprocessableEntity struct {
Payload *models.ValidationError
}
CreateProductUnprocessableEntity describes a response with status code 422, with default header values.
Validation errors defined as an array of strings
func NewCreateProductUnprocessableEntity ¶
func NewCreateProductUnprocessableEntity() *CreateProductUnprocessableEntity
NewCreateProductUnprocessableEntity creates a CreateProductUnprocessableEntity with default headers values
func (*CreateProductUnprocessableEntity) Error ¶
func (o *CreateProductUnprocessableEntity) Error() string
func (*CreateProductUnprocessableEntity) GetPayload ¶
func (o *CreateProductUnprocessableEntity) GetPayload() *models.ValidationError
type DeleteProductCreated ¶
type DeleteProductCreated struct { }
DeleteProductCreated describes a response with status code 201, with default header values.
No content is returned by the API endpoint
func NewDeleteProductCreated ¶
func NewDeleteProductCreated() *DeleteProductCreated
NewDeleteProductCreated creates a DeleteProductCreated with default headers values
func (*DeleteProductCreated) Error ¶
func (o *DeleteProductCreated) Error() string
type DeleteProductNotFound ¶
type DeleteProductNotFound struct {
Payload *models.GenericError
}
DeleteProductNotFound describes a response with status code 404, with default header values.
Generic error message returned as a string
func NewDeleteProductNotFound ¶
func NewDeleteProductNotFound() *DeleteProductNotFound
NewDeleteProductNotFound creates a DeleteProductNotFound with default headers values
func (*DeleteProductNotFound) Error ¶
func (o *DeleteProductNotFound) Error() string
func (*DeleteProductNotFound) GetPayload ¶
func (o *DeleteProductNotFound) GetPayload() *models.GenericError
type DeleteProductNotImplemented ¶
type DeleteProductNotImplemented struct {
Payload *models.GenericError
}
DeleteProductNotImplemented describes a response with status code 501, with default header values.
Generic error message returned as a string
func NewDeleteProductNotImplemented ¶
func NewDeleteProductNotImplemented() *DeleteProductNotImplemented
NewDeleteProductNotImplemented creates a DeleteProductNotImplemented with default headers values
func (*DeleteProductNotImplemented) Error ¶
func (o *DeleteProductNotImplemented) Error() string
func (*DeleteProductNotImplemented) GetPayload ¶
func (o *DeleteProductNotImplemented) GetPayload() *models.GenericError
type DeleteProductParams ¶
type DeleteProductParams struct { /* ID. The id of the product for which the operation relates Format: int64 */ ID int64 Context context.Context HTTPClient *http.Client // contains filtered or unexported fields }
DeleteProductParams contains all the parameters to send to the API endpoint
for the delete product operation. Typically these are written to a http.Request.
func NewDeleteProductParams ¶
func NewDeleteProductParams() *DeleteProductParams
NewDeleteProductParams creates a new DeleteProductParams 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 NewDeleteProductParamsWithContext ¶
func NewDeleteProductParamsWithContext(ctx context.Context) *DeleteProductParams
NewDeleteProductParamsWithContext creates a new DeleteProductParams object with the ability to set a context for a request.
func NewDeleteProductParamsWithHTTPClient ¶
func NewDeleteProductParamsWithHTTPClient(client *http.Client) *DeleteProductParams
NewDeleteProductParamsWithHTTPClient creates a new DeleteProductParams object with the ability to set a custom HTTPClient for a request.
func NewDeleteProductParamsWithTimeout ¶
func NewDeleteProductParamsWithTimeout(timeout time.Duration) *DeleteProductParams
NewDeleteProductParamsWithTimeout creates a new DeleteProductParams object with the ability to set a timeout on a request.
func (*DeleteProductParams) SetContext ¶
func (o *DeleteProductParams) SetContext(ctx context.Context)
SetContext adds the context to the delete product params
func (*DeleteProductParams) SetDefaults ¶
func (o *DeleteProductParams) SetDefaults()
SetDefaults hydrates default values in the delete product params (not the query body).
All values with no default are reset to their zero value.
func (*DeleteProductParams) SetHTTPClient ¶
func (o *DeleteProductParams) SetHTTPClient(client *http.Client)
SetHTTPClient adds the HTTPClient to the delete product params
func (*DeleteProductParams) SetID ¶
func (o *DeleteProductParams) SetID(id int64)
SetID adds the id to the delete product params
func (*DeleteProductParams) SetTimeout ¶
func (o *DeleteProductParams) SetTimeout(timeout time.Duration)
SetTimeout adds the timeout to the delete product params
func (*DeleteProductParams) WithContext ¶
func (o *DeleteProductParams) WithContext(ctx context.Context) *DeleteProductParams
WithContext adds the context to the delete product params
func (*DeleteProductParams) WithDefaults ¶
func (o *DeleteProductParams) WithDefaults() *DeleteProductParams
WithDefaults hydrates default values in the delete product params (not the query body).
All values with no default are reset to their zero value.
func (*DeleteProductParams) WithHTTPClient ¶
func (o *DeleteProductParams) WithHTTPClient(client *http.Client) *DeleteProductParams
WithHTTPClient adds the HTTPClient to the delete product params
func (*DeleteProductParams) WithID ¶
func (o *DeleteProductParams) WithID(id int64) *DeleteProductParams
WithID adds the id to the delete product params
func (*DeleteProductParams) WithTimeout ¶
func (o *DeleteProductParams) WithTimeout(timeout time.Duration) *DeleteProductParams
WithTimeout adds the timeout to the delete product params
func (*DeleteProductParams) WriteToRequest ¶
func (o *DeleteProductParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type DeleteProductReader ¶
type DeleteProductReader struct {
// contains filtered or unexported fields
}
DeleteProductReader is a Reader for the DeleteProduct structure.
func (*DeleteProductReader) ReadResponse ¶
func (o *DeleteProductReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)
ReadResponse reads a server response into the received o.
type ListAllProductsOK ¶
ListAllProductsOK describes a response with status code 200, with default header values.
A list of products
func NewListAllProductsOK ¶
func NewListAllProductsOK() *ListAllProductsOK
NewListAllProductsOK creates a ListAllProductsOK with default headers values
func (*ListAllProductsOK) Error ¶
func (o *ListAllProductsOK) Error() string
func (*ListAllProductsOK) GetPayload ¶
func (o *ListAllProductsOK) GetPayload() []*models.Product
type ListAllProductsParams ¶
type ListAllProductsParams struct { Context context.Context HTTPClient *http.Client // contains filtered or unexported fields }
ListAllProductsParams contains all the parameters to send to the API endpoint
for the list all products operation. Typically these are written to a http.Request.
func NewListAllProductsParams ¶
func NewListAllProductsParams() *ListAllProductsParams
NewListAllProductsParams creates a new ListAllProductsParams 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 NewListAllProductsParamsWithContext ¶
func NewListAllProductsParamsWithContext(ctx context.Context) *ListAllProductsParams
NewListAllProductsParamsWithContext creates a new ListAllProductsParams object with the ability to set a context for a request.
func NewListAllProductsParamsWithHTTPClient ¶
func NewListAllProductsParamsWithHTTPClient(client *http.Client) *ListAllProductsParams
NewListAllProductsParamsWithHTTPClient creates a new ListAllProductsParams object with the ability to set a custom HTTPClient for a request.
func NewListAllProductsParamsWithTimeout ¶
func NewListAllProductsParamsWithTimeout(timeout time.Duration) *ListAllProductsParams
NewListAllProductsParamsWithTimeout creates a new ListAllProductsParams object with the ability to set a timeout on a request.
func (*ListAllProductsParams) SetContext ¶
func (o *ListAllProductsParams) SetContext(ctx context.Context)
SetContext adds the context to the list all products params
func (*ListAllProductsParams) SetDefaults ¶
func (o *ListAllProductsParams) SetDefaults()
SetDefaults hydrates default values in the list all products params (not the query body).
All values with no default are reset to their zero value.
func (*ListAllProductsParams) SetHTTPClient ¶
func (o *ListAllProductsParams) SetHTTPClient(client *http.Client)
SetHTTPClient adds the HTTPClient to the list all products params
func (*ListAllProductsParams) SetTimeout ¶
func (o *ListAllProductsParams) SetTimeout(timeout time.Duration)
SetTimeout adds the timeout to the list all products params
func (*ListAllProductsParams) WithContext ¶
func (o *ListAllProductsParams) WithContext(ctx context.Context) *ListAllProductsParams
WithContext adds the context to the list all products params
func (*ListAllProductsParams) WithDefaults ¶
func (o *ListAllProductsParams) WithDefaults() *ListAllProductsParams
WithDefaults hydrates default values in the list all products params (not the query body).
All values with no default are reset to their zero value.
func (*ListAllProductsParams) WithHTTPClient ¶
func (o *ListAllProductsParams) WithHTTPClient(client *http.Client) *ListAllProductsParams
WithHTTPClient adds the HTTPClient to the list all products params
func (*ListAllProductsParams) WithTimeout ¶
func (o *ListAllProductsParams) WithTimeout(timeout time.Duration) *ListAllProductsParams
WithTimeout adds the timeout to the list all products params
func (*ListAllProductsParams) WriteToRequest ¶
func (o *ListAllProductsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type ListAllProductsReader ¶
type ListAllProductsReader struct {
// contains filtered or unexported fields
}
ListAllProductsReader is a Reader for the ListAllProducts structure.
func (*ListAllProductsReader) ReadResponse ¶
func (o *ListAllProductsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)
ReadResponse reads a server response into the received o.
type ListSingleProductNotFound ¶
type ListSingleProductNotFound struct {
Payload *models.GenericError
}
ListSingleProductNotFound describes a response with status code 404, with default header values.
Generic error message returned as a string
func NewListSingleProductNotFound ¶
func NewListSingleProductNotFound() *ListSingleProductNotFound
NewListSingleProductNotFound creates a ListSingleProductNotFound with default headers values
func (*ListSingleProductNotFound) Error ¶
func (o *ListSingleProductNotFound) Error() string
func (*ListSingleProductNotFound) GetPayload ¶
func (o *ListSingleProductNotFound) GetPayload() *models.GenericError
type ListSingleProductOK ¶
ListSingleProductOK describes a response with status code 200, with default header values.
Data structure representing a single product
func NewListSingleProductOK ¶
func NewListSingleProductOK() *ListSingleProductOK
NewListSingleProductOK creates a ListSingleProductOK with default headers values
func (*ListSingleProductOK) Error ¶
func (o *ListSingleProductOK) Error() string
func (*ListSingleProductOK) GetPayload ¶
func (o *ListSingleProductOK) GetPayload() *models.Product
type ListSingleProductParams ¶
type ListSingleProductParams struct { /* ID. The id of the product for which the operation relates Format: int64 */ ID int64 Context context.Context HTTPClient *http.Client // contains filtered or unexported fields }
ListSingleProductParams contains all the parameters to send to the API endpoint
for the list single product operation. Typically these are written to a http.Request.
func NewListSingleProductParams ¶
func NewListSingleProductParams() *ListSingleProductParams
NewListSingleProductParams creates a new ListSingleProductParams 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 NewListSingleProductParamsWithContext ¶
func NewListSingleProductParamsWithContext(ctx context.Context) *ListSingleProductParams
NewListSingleProductParamsWithContext creates a new ListSingleProductParams object with the ability to set a context for a request.
func NewListSingleProductParamsWithHTTPClient ¶
func NewListSingleProductParamsWithHTTPClient(client *http.Client) *ListSingleProductParams
NewListSingleProductParamsWithHTTPClient creates a new ListSingleProductParams object with the ability to set a custom HTTPClient for a request.
func NewListSingleProductParamsWithTimeout ¶
func NewListSingleProductParamsWithTimeout(timeout time.Duration) *ListSingleProductParams
NewListSingleProductParamsWithTimeout creates a new ListSingleProductParams object with the ability to set a timeout on a request.
func (*ListSingleProductParams) SetContext ¶
func (o *ListSingleProductParams) SetContext(ctx context.Context)
SetContext adds the context to the list single product params
func (*ListSingleProductParams) SetDefaults ¶
func (o *ListSingleProductParams) SetDefaults()
SetDefaults hydrates default values in the list single product params (not the query body).
All values with no default are reset to their zero value.
func (*ListSingleProductParams) SetHTTPClient ¶
func (o *ListSingleProductParams) SetHTTPClient(client *http.Client)
SetHTTPClient adds the HTTPClient to the list single product params
func (*ListSingleProductParams) SetID ¶
func (o *ListSingleProductParams) SetID(id int64)
SetID adds the id to the list single product params
func (*ListSingleProductParams) SetTimeout ¶
func (o *ListSingleProductParams) SetTimeout(timeout time.Duration)
SetTimeout adds the timeout to the list single product params
func (*ListSingleProductParams) WithContext ¶
func (o *ListSingleProductParams) WithContext(ctx context.Context) *ListSingleProductParams
WithContext adds the context to the list single product params
func (*ListSingleProductParams) WithDefaults ¶
func (o *ListSingleProductParams) WithDefaults() *ListSingleProductParams
WithDefaults hydrates default values in the list single product params (not the query body).
All values with no default are reset to their zero value.
func (*ListSingleProductParams) WithHTTPClient ¶
func (o *ListSingleProductParams) WithHTTPClient(client *http.Client) *ListSingleProductParams
WithHTTPClient adds the HTTPClient to the list single product params
func (*ListSingleProductParams) WithID ¶
func (o *ListSingleProductParams) WithID(id int64) *ListSingleProductParams
WithID adds the id to the list single product params
func (*ListSingleProductParams) WithTimeout ¶
func (o *ListSingleProductParams) WithTimeout(timeout time.Duration) *ListSingleProductParams
WithTimeout adds the timeout to the list single product params
func (*ListSingleProductParams) WriteToRequest ¶
func (o *ListSingleProductParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type ListSingleProductReader ¶
type ListSingleProductReader struct {
// contains filtered or unexported fields
}
ListSingleProductReader is a Reader for the ListSingleProduct structure.
func (*ListSingleProductReader) ReadResponse ¶
func (o *ListSingleProductReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)
ReadResponse reads a server response into the received o.
type UpdateProductCreated ¶
type UpdateProductCreated struct { }
UpdateProductCreated describes a response with status code 201, with default header values.
No content is returned by the API endpoint
func NewUpdateProductCreated ¶
func NewUpdateProductCreated() *UpdateProductCreated
NewUpdateProductCreated creates a UpdateProductCreated with default headers values
func (*UpdateProductCreated) Error ¶
func (o *UpdateProductCreated) Error() string
type UpdateProductNotFound ¶
type UpdateProductNotFound struct {
Payload *models.GenericError
}
UpdateProductNotFound describes a response with status code 404, with default header values.
Generic error message returned as a string
func NewUpdateProductNotFound ¶
func NewUpdateProductNotFound() *UpdateProductNotFound
NewUpdateProductNotFound creates a UpdateProductNotFound with default headers values
func (*UpdateProductNotFound) Error ¶
func (o *UpdateProductNotFound) Error() string
func (*UpdateProductNotFound) GetPayload ¶
func (o *UpdateProductNotFound) GetPayload() *models.GenericError
type UpdateProductParams ¶
type UpdateProductParams struct { /* Body. Product data structure to Update or Create. Note: the id field is ignored by update and create operations */ Body *models.Product Context context.Context HTTPClient *http.Client // contains filtered or unexported fields }
UpdateProductParams contains all the parameters to send to the API endpoint
for the update product operation. Typically these are written to a http.Request.
func NewUpdateProductParams ¶
func NewUpdateProductParams() *UpdateProductParams
NewUpdateProductParams creates a new UpdateProductParams 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 NewUpdateProductParamsWithContext ¶
func NewUpdateProductParamsWithContext(ctx context.Context) *UpdateProductParams
NewUpdateProductParamsWithContext creates a new UpdateProductParams object with the ability to set a context for a request.
func NewUpdateProductParamsWithHTTPClient ¶
func NewUpdateProductParamsWithHTTPClient(client *http.Client) *UpdateProductParams
NewUpdateProductParamsWithHTTPClient creates a new UpdateProductParams object with the ability to set a custom HTTPClient for a request.
func NewUpdateProductParamsWithTimeout ¶
func NewUpdateProductParamsWithTimeout(timeout time.Duration) *UpdateProductParams
NewUpdateProductParamsWithTimeout creates a new UpdateProductParams object with the ability to set a timeout on a request.
func (*UpdateProductParams) SetBody ¶
func (o *UpdateProductParams) SetBody(body *models.Product)
SetBody adds the body to the update product params
func (*UpdateProductParams) SetContext ¶
func (o *UpdateProductParams) SetContext(ctx context.Context)
SetContext adds the context to the update product params
func (*UpdateProductParams) SetDefaults ¶
func (o *UpdateProductParams) SetDefaults()
SetDefaults hydrates default values in the update product params (not the query body).
All values with no default are reset to their zero value.
func (*UpdateProductParams) SetHTTPClient ¶
func (o *UpdateProductParams) SetHTTPClient(client *http.Client)
SetHTTPClient adds the HTTPClient to the update product params
func (*UpdateProductParams) SetTimeout ¶
func (o *UpdateProductParams) SetTimeout(timeout time.Duration)
SetTimeout adds the timeout to the update product params
func (*UpdateProductParams) WithBody ¶
func (o *UpdateProductParams) WithBody(body *models.Product) *UpdateProductParams
WithBody adds the body to the update product params
func (*UpdateProductParams) WithContext ¶
func (o *UpdateProductParams) WithContext(ctx context.Context) *UpdateProductParams
WithContext adds the context to the update product params
func (*UpdateProductParams) WithDefaults ¶
func (o *UpdateProductParams) WithDefaults() *UpdateProductParams
WithDefaults hydrates default values in the update product params (not the query body).
All values with no default are reset to their zero value.
func (*UpdateProductParams) WithHTTPClient ¶
func (o *UpdateProductParams) WithHTTPClient(client *http.Client) *UpdateProductParams
WithHTTPClient adds the HTTPClient to the update product params
func (*UpdateProductParams) WithTimeout ¶
func (o *UpdateProductParams) WithTimeout(timeout time.Duration) *UpdateProductParams
WithTimeout adds the timeout to the update product params
func (*UpdateProductParams) WriteToRequest ¶
func (o *UpdateProductParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type UpdateProductReader ¶
type UpdateProductReader struct {
// contains filtered or unexported fields
}
UpdateProductReader is a Reader for the UpdateProduct structure.
func (*UpdateProductReader) ReadResponse ¶
func (o *UpdateProductReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)
ReadResponse reads a server response into the received o.
type UpdateProductUnprocessableEntity ¶
type UpdateProductUnprocessableEntity struct {
Payload *models.ValidationError
}
UpdateProductUnprocessableEntity describes a response with status code 422, with default header values.
Validation errors defined as an array of strings
func NewUpdateProductUnprocessableEntity ¶
func NewUpdateProductUnprocessableEntity() *UpdateProductUnprocessableEntity
NewUpdateProductUnprocessableEntity creates a UpdateProductUnprocessableEntity with default headers values
func (*UpdateProductUnprocessableEntity) Error ¶
func (o *UpdateProductUnprocessableEntity) Error() string
func (*UpdateProductUnprocessableEntity) GetPayload ¶
func (o *UpdateProductUnprocessableEntity) GetPayload() *models.ValidationError
Source Files
¶
- create_product_parameters.go
- create_product_responses.go
- delete_product_parameters.go
- delete_product_responses.go
- list_all_products_parameters.go
- list_all_products_responses.go
- list_single_product_parameters.go
- list_single_product_responses.go
- products_client.go
- update_product_parameters.go
- update_product_responses.go