items

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 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 API

type API interface {
	/*
	   CreateItems creates new items and returns a response with their i ds*/
	CreateItems(ctx context.Context, params *CreateItemsParams) (*CreateItemsOK, error)
	/*
	   GetItems gets items matching the given parameters*/
	GetItems(ctx context.Context, params *GetItemsParams) (*GetItemsOK, error)
}

API is the interface of the items client

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client for items API

func New

func New(transport runtime.ClientTransport, formats strfmt.Registry, authInfo runtime.ClientAuthInfoWriter) *Client

New creates a new items API client.

func (*Client) CreateItems

func (a *Client) CreateItems(ctx context.Context, params *CreateItemsParams) (*CreateItemsOK, error)

CreateItems creates new items and returns a response with their i ds

func (*Client) GetItems

func (a *Client) GetItems(ctx context.Context, params *GetItemsParams) (*GetItemsOK, error)

GetItems gets items matching the given parameters

type CreateItemsBadRequest

type CreateItemsBadRequest struct {
	Payload *models.ErrorResponse
}

CreateItemsBadRequest describes a response with status code 400, with default header values.

Bad Request

func NewCreateItemsBadRequest

func NewCreateItemsBadRequest() *CreateItemsBadRequest

NewCreateItemsBadRequest creates a CreateItemsBadRequest with default headers values

func (*CreateItemsBadRequest) Error

func (o *CreateItemsBadRequest) Error() string

func (*CreateItemsBadRequest) GetPayload

func (o *CreateItemsBadRequest) GetPayload() *models.ErrorResponse

func (*CreateItemsBadRequest) IsClientError

func (o *CreateItemsBadRequest) IsClientError() bool

IsClientError returns true when this create items bad request response has a 4xx status code

func (*CreateItemsBadRequest) IsCode

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

IsCode returns true when this create items bad request response a status code equal to that given

func (*CreateItemsBadRequest) IsRedirect

func (o *CreateItemsBadRequest) IsRedirect() bool

IsRedirect returns true when this create items bad request response has a 3xx status code

func (*CreateItemsBadRequest) IsServerError

func (o *CreateItemsBadRequest) IsServerError() bool

IsServerError returns true when this create items bad request response has a 5xx status code

func (*CreateItemsBadRequest) IsSuccess

func (o *CreateItemsBadRequest) IsSuccess() bool

IsSuccess returns true when this create items bad request response has a 2xx status code

func (*CreateItemsBadRequest) String

func (o *CreateItemsBadRequest) String() string

type CreateItemsInternalServerError

type CreateItemsInternalServerError struct {
	Payload *models.ErrorResponse
}

CreateItemsInternalServerError describes a response with status code 500, with default header values.

Internal Server Error

func NewCreateItemsInternalServerError

func NewCreateItemsInternalServerError() *CreateItemsInternalServerError

NewCreateItemsInternalServerError creates a CreateItemsInternalServerError with default headers values

func (*CreateItemsInternalServerError) Error

func (*CreateItemsInternalServerError) GetPayload

func (*CreateItemsInternalServerError) IsClientError

func (o *CreateItemsInternalServerError) IsClientError() bool

IsClientError returns true when this create items internal server error response has a 4xx status code

func (*CreateItemsInternalServerError) IsCode

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

IsCode returns true when this create items internal server error response a status code equal to that given

func (*CreateItemsInternalServerError) IsRedirect

func (o *CreateItemsInternalServerError) IsRedirect() bool

IsRedirect returns true when this create items internal server error response has a 3xx status code

func (*CreateItemsInternalServerError) IsServerError

func (o *CreateItemsInternalServerError) IsServerError() bool

IsServerError returns true when this create items internal server error response has a 5xx status code

func (*CreateItemsInternalServerError) IsSuccess

func (o *CreateItemsInternalServerError) IsSuccess() bool

IsSuccess returns true when this create items internal server error response has a 2xx status code

func (*CreateItemsInternalServerError) String

type CreateItemsOK

type CreateItemsOK struct {
	Payload *models.CreateItemsResponse
}

CreateItemsOK describes a response with status code 200, with default header values.

OK

func NewCreateItemsOK

func NewCreateItemsOK() *CreateItemsOK

NewCreateItemsOK creates a CreateItemsOK with default headers values

func (*CreateItemsOK) Error

func (o *CreateItemsOK) Error() string

func (*CreateItemsOK) GetPayload

func (o *CreateItemsOK) GetPayload() *models.CreateItemsResponse

func (*CreateItemsOK) IsClientError

func (o *CreateItemsOK) IsClientError() bool

IsClientError returns true when this create items o k response has a 4xx status code

func (*CreateItemsOK) IsCode

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

IsCode returns true when this create items o k response a status code equal to that given

func (*CreateItemsOK) IsRedirect

func (o *CreateItemsOK) IsRedirect() bool

IsRedirect returns true when this create items o k response has a 3xx status code

func (*CreateItemsOK) IsServerError

func (o *CreateItemsOK) IsServerError() bool

IsServerError returns true when this create items o k response has a 5xx status code

func (*CreateItemsOK) IsSuccess

func (o *CreateItemsOK) IsSuccess() bool

IsSuccess returns true when this create items o k response has a 2xx status code

func (*CreateItemsOK) String

func (o *CreateItemsOK) String() string

type CreateItemsParams

type CreateItemsParams struct {

	/* Request.

	   CreateItems request
	*/
	Request *models.CreateItemsRequest

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

CreateItemsParams contains all the parameters to send to the API endpoint

for the create items operation.

Typically these are written to a http.Request.

func NewCreateItemsParams

func NewCreateItemsParams() *CreateItemsParams

NewCreateItemsParams creates a new CreateItemsParams 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 NewCreateItemsParamsWithContext

func NewCreateItemsParamsWithContext(ctx context.Context) *CreateItemsParams

NewCreateItemsParamsWithContext creates a new CreateItemsParams object with the ability to set a context for a request.

func NewCreateItemsParamsWithHTTPClient

func NewCreateItemsParamsWithHTTPClient(client *http.Client) *CreateItemsParams

NewCreateItemsParamsWithHTTPClient creates a new CreateItemsParams object with the ability to set a custom HTTPClient for a request.

func NewCreateItemsParamsWithTimeout

func NewCreateItemsParamsWithTimeout(timeout time.Duration) *CreateItemsParams

NewCreateItemsParamsWithTimeout creates a new CreateItemsParams object with the ability to set a timeout on a request.

func (*CreateItemsParams) SetContext

func (o *CreateItemsParams) SetContext(ctx context.Context)

SetContext adds the context to the create items params

func (*CreateItemsParams) SetDefaults

func (o *CreateItemsParams) SetDefaults()

SetDefaults hydrates default values in the create items params (not the query body).

All values with no default are reset to their zero value.

func (*CreateItemsParams) SetHTTPClient

func (o *CreateItemsParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the create items params

func (*CreateItemsParams) SetRequest

func (o *CreateItemsParams) SetRequest(request *models.CreateItemsRequest)

SetRequest adds the request to the create items params

func (*CreateItemsParams) SetTimeout

func (o *CreateItemsParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the create items params

func (*CreateItemsParams) WithContext

func (o *CreateItemsParams) WithContext(ctx context.Context) *CreateItemsParams

WithContext adds the context to the create items params

func (*CreateItemsParams) WithDefaults

func (o *CreateItemsParams) WithDefaults() *CreateItemsParams

WithDefaults hydrates default values in the create items params (not the query body).

All values with no default are reset to their zero value.

func (*CreateItemsParams) WithHTTPClient

func (o *CreateItemsParams) WithHTTPClient(client *http.Client) *CreateItemsParams

WithHTTPClient adds the HTTPClient to the create items params

func (*CreateItemsParams) WithRequest

WithRequest adds the request to the create items params

func (*CreateItemsParams) WithTimeout

func (o *CreateItemsParams) WithTimeout(timeout time.Duration) *CreateItemsParams

WithTimeout adds the timeout to the create items params

func (*CreateItemsParams) WriteToRequest

func (o *CreateItemsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type CreateItemsReader

type CreateItemsReader struct {
	// contains filtered or unexported fields
}

CreateItemsReader is a Reader for the CreateItems structure.

func (*CreateItemsReader) ReadResponse

func (o *CreateItemsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type CreateItemsUnauthorized

type CreateItemsUnauthorized struct {
	Payload *models.ErrorResponse
}

CreateItemsUnauthorized describes a response with status code 401, with default header values.

Unauthorized

func NewCreateItemsUnauthorized

func NewCreateItemsUnauthorized() *CreateItemsUnauthorized

NewCreateItemsUnauthorized creates a CreateItemsUnauthorized with default headers values

func (*CreateItemsUnauthorized) Error

func (o *CreateItemsUnauthorized) Error() string

func (*CreateItemsUnauthorized) GetPayload

func (o *CreateItemsUnauthorized) GetPayload() *models.ErrorResponse

func (*CreateItemsUnauthorized) IsClientError

func (o *CreateItemsUnauthorized) IsClientError() bool

IsClientError returns true when this create items unauthorized response has a 4xx status code

func (*CreateItemsUnauthorized) IsCode

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

IsCode returns true when this create items unauthorized response a status code equal to that given

func (*CreateItemsUnauthorized) IsRedirect

func (o *CreateItemsUnauthorized) IsRedirect() bool

IsRedirect returns true when this create items unauthorized response has a 3xx status code

func (*CreateItemsUnauthorized) IsServerError

func (o *CreateItemsUnauthorized) IsServerError() bool

IsServerError returns true when this create items unauthorized response has a 5xx status code

func (*CreateItemsUnauthorized) IsSuccess

func (o *CreateItemsUnauthorized) IsSuccess() bool

IsSuccess returns true when this create items unauthorized response has a 2xx status code

func (*CreateItemsUnauthorized) String

func (o *CreateItemsUnauthorized) String() string

type GetItemsInternalServerError

type GetItemsInternalServerError struct {
	Payload *models.ErrorResponse
}

GetItemsInternalServerError describes a response with status code 500, with default header values.

Internal Server Error

func NewGetItemsInternalServerError

func NewGetItemsInternalServerError() *GetItemsInternalServerError

NewGetItemsInternalServerError creates a GetItemsInternalServerError with default headers values

func (*GetItemsInternalServerError) Error

func (*GetItemsInternalServerError) GetPayload

func (*GetItemsInternalServerError) IsClientError

func (o *GetItemsInternalServerError) IsClientError() bool

IsClientError returns true when this get items internal server error response has a 4xx status code

func (*GetItemsInternalServerError) IsCode

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

IsCode returns true when this get items internal server error response a status code equal to that given

func (*GetItemsInternalServerError) IsRedirect

func (o *GetItemsInternalServerError) IsRedirect() bool

IsRedirect returns true when this get items internal server error response has a 3xx status code

func (*GetItemsInternalServerError) IsServerError

func (o *GetItemsInternalServerError) IsServerError() bool

IsServerError returns true when this get items internal server error response has a 5xx status code

func (*GetItemsInternalServerError) IsSuccess

func (o *GetItemsInternalServerError) IsSuccess() bool

IsSuccess returns true when this get items internal server error response has a 2xx status code

func (*GetItemsInternalServerError) String

func (o *GetItemsInternalServerError) String() string

type GetItemsOK

type GetItemsOK struct {
	Payload *models.GetItemsResponse
}

GetItemsOK describes a response with status code 200, with default header values.

OK

func NewGetItemsOK

func NewGetItemsOK() *GetItemsOK

NewGetItemsOK creates a GetItemsOK with default headers values

func (*GetItemsOK) Error

func (o *GetItemsOK) Error() string

func (*GetItemsOK) GetPayload

func (o *GetItemsOK) GetPayload() *models.GetItemsResponse

func (*GetItemsOK) IsClientError

func (o *GetItemsOK) IsClientError() bool

IsClientError returns true when this get items o k response has a 4xx status code

func (*GetItemsOK) IsCode

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

IsCode returns true when this get items o k response a status code equal to that given

func (*GetItemsOK) IsRedirect

func (o *GetItemsOK) IsRedirect() bool

IsRedirect returns true when this get items o k response has a 3xx status code

func (*GetItemsOK) IsServerError

func (o *GetItemsOK) IsServerError() bool

IsServerError returns true when this get items o k response has a 5xx status code

func (*GetItemsOK) IsSuccess

func (o *GetItemsOK) IsSuccess() bool

IsSuccess returns true when this get items o k response has a 2xx status code

func (*GetItemsOK) String

func (o *GetItemsOK) String() string

type GetItemsParams

type GetItemsParams struct {

	/* Request.

	   Parameters for filtering items
	*/
	Request *models.GetItemsRequest

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

GetItemsParams contains all the parameters to send to the API endpoint

for the get items operation.

Typically these are written to a http.Request.

func NewGetItemsParams

func NewGetItemsParams() *GetItemsParams

NewGetItemsParams creates a new GetItemsParams 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 NewGetItemsParamsWithContext

func NewGetItemsParamsWithContext(ctx context.Context) *GetItemsParams

NewGetItemsParamsWithContext creates a new GetItemsParams object with the ability to set a context for a request.

func NewGetItemsParamsWithHTTPClient

func NewGetItemsParamsWithHTTPClient(client *http.Client) *GetItemsParams

NewGetItemsParamsWithHTTPClient creates a new GetItemsParams object with the ability to set a custom HTTPClient for a request.

func NewGetItemsParamsWithTimeout

func NewGetItemsParamsWithTimeout(timeout time.Duration) *GetItemsParams

NewGetItemsParamsWithTimeout creates a new GetItemsParams object with the ability to set a timeout on a request.

func (*GetItemsParams) SetContext

func (o *GetItemsParams) SetContext(ctx context.Context)

SetContext adds the context to the get items params

func (*GetItemsParams) SetDefaults

func (o *GetItemsParams) SetDefaults()

SetDefaults hydrates default values in the get items params (not the query body).

All values with no default are reset to their zero value.

func (*GetItemsParams) SetHTTPClient

func (o *GetItemsParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the get items params

func (*GetItemsParams) SetRequest

func (o *GetItemsParams) SetRequest(request *models.GetItemsRequest)

SetRequest adds the request to the get items params

func (*GetItemsParams) SetTimeout

func (o *GetItemsParams) SetTimeout(timeout time.Duration)

SetTimeout adds the timeout to the get items params

func (*GetItemsParams) WithContext

func (o *GetItemsParams) WithContext(ctx context.Context) *GetItemsParams

WithContext adds the context to the get items params

func (*GetItemsParams) WithDefaults

func (o *GetItemsParams) WithDefaults() *GetItemsParams

WithDefaults hydrates default values in the get items params (not the query body).

All values with no default are reset to their zero value.

func (*GetItemsParams) WithHTTPClient

func (o *GetItemsParams) WithHTTPClient(client *http.Client) *GetItemsParams

WithHTTPClient adds the HTTPClient to the get items params

func (*GetItemsParams) WithRequest

func (o *GetItemsParams) WithRequest(request *models.GetItemsRequest) *GetItemsParams

WithRequest adds the request to the get items params

func (*GetItemsParams) WithTimeout

func (o *GetItemsParams) WithTimeout(timeout time.Duration) *GetItemsParams

WithTimeout adds the timeout to the get items params

func (*GetItemsParams) WriteToRequest

func (o *GetItemsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error

WriteToRequest writes these params to a swagger request

type GetItemsReader

type GetItemsReader struct {
	// contains filtered or unexported fields
}

GetItemsReader is a Reader for the GetItems structure.

func (*GetItemsReader) ReadResponse

func (o *GetItemsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type GetItemsUnauthorized

type GetItemsUnauthorized struct {
	Payload *models.ErrorResponse
}

GetItemsUnauthorized describes a response with status code 401, with default header values.

Unauthorized

func NewGetItemsUnauthorized

func NewGetItemsUnauthorized() *GetItemsUnauthorized

NewGetItemsUnauthorized creates a GetItemsUnauthorized with default headers values

func (*GetItemsUnauthorized) Error

func (o *GetItemsUnauthorized) Error() string

func (*GetItemsUnauthorized) GetPayload

func (o *GetItemsUnauthorized) GetPayload() *models.ErrorResponse

func (*GetItemsUnauthorized) IsClientError

func (o *GetItemsUnauthorized) IsClientError() bool

IsClientError returns true when this get items unauthorized response has a 4xx status code

func (*GetItemsUnauthorized) IsCode

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

IsCode returns true when this get items unauthorized response a status code equal to that given

func (*GetItemsUnauthorized) IsRedirect

func (o *GetItemsUnauthorized) IsRedirect() bool

IsRedirect returns true when this get items unauthorized response has a 3xx status code

func (*GetItemsUnauthorized) IsServerError

func (o *GetItemsUnauthorized) IsServerError() bool

IsServerError returns true when this get items unauthorized response has a 5xx status code

func (*GetItemsUnauthorized) IsSuccess

func (o *GetItemsUnauthorized) IsSuccess() bool

IsSuccess returns true when this get items unauthorized response has a 2xx status code

func (*GetItemsUnauthorized) String

func (o *GetItemsUnauthorized) String() string

Jump to

Keyboard shortcuts

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