store

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2018 License: Apache-2.0 Imports: 12 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 {
	// InventoryGet returns pet inventories by status
	InventoryGet(ctx context.Context, params *InventoryGetParams) (*InventoryGetOK, error)
	// OrderCreate places an order for a pet
	OrderCreate(ctx context.Context, params *OrderCreateParams) (*OrderCreateOK, error)
	// OrderDelete deletes purchase order by ID
	// For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors
	OrderDelete(ctx context.Context, params *OrderDeleteParams) (*OrderDeleteNoContent, error)
	// OrderGet finds purchase order by ID
	// For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions
	OrderGet(ctx context.Context, params *OrderGetParams) (*OrderGetOK, error)
}

API is the interface of the store client

type Client

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

Client for store API

func New

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

New creates a new store API client.

func (*Client) InventoryGet

func (a *Client) InventoryGet(ctx context.Context, params *InventoryGetParams) (*InventoryGetOK, error)

InventoryGet returns pet inventories by status

func (*Client) OrderCreate

func (a *Client) OrderCreate(ctx context.Context, params *OrderCreateParams) (*OrderCreateOK, error)

OrderCreate places an order for a pet

func (*Client) OrderDelete

func (a *Client) OrderDelete(ctx context.Context, params *OrderDeleteParams) (*OrderDeleteNoContent, error)

OrderDelete deletes purchase order by ID

For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors

func (*Client) OrderGet

func (a *Client) OrderGet(ctx context.Context, params *OrderGetParams) (*OrderGetOK, error)

OrderGet finds purchase order by ID

For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions

type InventoryGetOK

type InventoryGetOK struct {
	Payload map[string]int32
}

InventoryGetOK handles this case with default header values.

successful operation

func NewInventoryGetOK

func NewInventoryGetOK() *InventoryGetOK

NewInventoryGetOK creates a InventoryGetOK with default headers values

func (*InventoryGetOK) Error

func (o *InventoryGetOK) Error() string

type InventoryGetParams

type InventoryGetParams struct {
	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

InventoryGetParams contains all the parameters to send to the API endpoint for the inventory get operation typically these are written to a http.Request

func NewInventoryGetParams

func NewInventoryGetParams() *InventoryGetParams

NewInventoryGetParams creates a new InventoryGetParams object with the default values initialized.

func NewInventoryGetParamsWithContext

func NewInventoryGetParamsWithContext(ctx context.Context) *InventoryGetParams

NewInventoryGetParamsWithContext creates a new InventoryGetParams object with the default values initialized, and the ability to set a context for a request

func NewInventoryGetParamsWithHTTPClient

func NewInventoryGetParamsWithHTTPClient(client *http.Client) *InventoryGetParams

NewInventoryGetParamsWithHTTPClient creates a new InventoryGetParams object with the default values initialized, and the ability to set a custom HTTPClient for a request

func NewInventoryGetParamsWithTimeout

func NewInventoryGetParamsWithTimeout(timeout time.Duration) *InventoryGetParams

NewInventoryGetParamsWithTimeout creates a new InventoryGetParams object with the default values initialized, and the ability to set a timeout on a request

func (*InventoryGetParams) SetContext

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

SetContext adds the context to the inventory get params

func (*InventoryGetParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the inventory get params

func (*InventoryGetParams) SetTimeout

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

SetTimeout adds the timeout to the inventory get params

func (*InventoryGetParams) WithContext

WithContext adds the context to the inventory get params

func (*InventoryGetParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the inventory get params

func (*InventoryGetParams) WithTimeout

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

WithTimeout adds the timeout to the inventory get params

func (*InventoryGetParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type InventoryGetReader

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

InventoryGetReader is a Reader for the InventoryGet structure.

func (*InventoryGetReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type OrderCreateBadRequest

type OrderCreateBadRequest struct {
}

OrderCreateBadRequest handles this case with default header values.

Invalid Order

func NewOrderCreateBadRequest

func NewOrderCreateBadRequest() *OrderCreateBadRequest

NewOrderCreateBadRequest creates a OrderCreateBadRequest with default headers values

func (*OrderCreateBadRequest) Error

func (o *OrderCreateBadRequest) Error() string

type OrderCreateOK

type OrderCreateOK struct {
	Payload *models.Order
}

OrderCreateOK handles this case with default header values.

successful operation

func NewOrderCreateOK

func NewOrderCreateOK() *OrderCreateOK

NewOrderCreateOK creates a OrderCreateOK with default headers values

func (*OrderCreateOK) Error

func (o *OrderCreateOK) Error() string

type OrderCreateParams

type OrderCreateParams struct {

	/*Body
	  order placed for purchasing the pet

	*/
	Body *models.Order

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

OrderCreateParams contains all the parameters to send to the API endpoint for the order create operation typically these are written to a http.Request

func NewOrderCreateParams

func NewOrderCreateParams() *OrderCreateParams

NewOrderCreateParams creates a new OrderCreateParams object with the default values initialized.

func NewOrderCreateParamsWithContext

func NewOrderCreateParamsWithContext(ctx context.Context) *OrderCreateParams

NewOrderCreateParamsWithContext creates a new OrderCreateParams object with the default values initialized, and the ability to set a context for a request

func NewOrderCreateParamsWithHTTPClient

func NewOrderCreateParamsWithHTTPClient(client *http.Client) *OrderCreateParams

NewOrderCreateParamsWithHTTPClient creates a new OrderCreateParams object with the default values initialized, and the ability to set a custom HTTPClient for a request

func NewOrderCreateParamsWithTimeout

func NewOrderCreateParamsWithTimeout(timeout time.Duration) *OrderCreateParams

NewOrderCreateParamsWithTimeout creates a new OrderCreateParams object with the default values initialized, and the ability to set a timeout on a request

func (*OrderCreateParams) SetBody

func (o *OrderCreateParams) SetBody(body *models.Order)

SetBody adds the body to the order create params

func (*OrderCreateParams) SetContext

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

SetContext adds the context to the order create params

func (*OrderCreateParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the order create params

func (*OrderCreateParams) SetTimeout

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

SetTimeout adds the timeout to the order create params

func (*OrderCreateParams) WithBody

func (o *OrderCreateParams) WithBody(body *models.Order) *OrderCreateParams

WithBody adds the body to the order create params

func (*OrderCreateParams) WithContext

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

WithContext adds the context to the order create params

func (*OrderCreateParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the order create params

func (*OrderCreateParams) WithTimeout

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

WithTimeout adds the timeout to the order create params

func (*OrderCreateParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type OrderCreateReader

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

OrderCreateReader is a Reader for the OrderCreate structure.

func (*OrderCreateReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type OrderDeleteBadRequest

type OrderDeleteBadRequest struct {
}

OrderDeleteBadRequest handles this case with default header values.

Invalid ID supplied

func NewOrderDeleteBadRequest

func NewOrderDeleteBadRequest() *OrderDeleteBadRequest

NewOrderDeleteBadRequest creates a OrderDeleteBadRequest with default headers values

func (*OrderDeleteBadRequest) Error

func (o *OrderDeleteBadRequest) Error() string

type OrderDeleteNoContent

type OrderDeleteNoContent struct {
}

OrderDeleteNoContent handles this case with default header values.

Deleted successfully

func NewOrderDeleteNoContent

func NewOrderDeleteNoContent() *OrderDeleteNoContent

NewOrderDeleteNoContent creates a OrderDeleteNoContent with default headers values

func (*OrderDeleteNoContent) Error

func (o *OrderDeleteNoContent) Error() string

type OrderDeleteNotFound

type OrderDeleteNotFound struct {
}

OrderDeleteNotFound handles this case with default header values.

Order not found

func NewOrderDeleteNotFound

func NewOrderDeleteNotFound() *OrderDeleteNotFound

NewOrderDeleteNotFound creates a OrderDeleteNotFound with default headers values

func (*OrderDeleteNotFound) Error

func (o *OrderDeleteNotFound) Error() string

type OrderDeleteParams

type OrderDeleteParams struct {

	/*OrderID
	  ID of the order that needs to be deleted

	*/
	OrderID int64

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

OrderDeleteParams contains all the parameters to send to the API endpoint for the order delete operation typically these are written to a http.Request

func NewOrderDeleteParams

func NewOrderDeleteParams() *OrderDeleteParams

NewOrderDeleteParams creates a new OrderDeleteParams object with the default values initialized.

func NewOrderDeleteParamsWithContext

func NewOrderDeleteParamsWithContext(ctx context.Context) *OrderDeleteParams

NewOrderDeleteParamsWithContext creates a new OrderDeleteParams object with the default values initialized, and the ability to set a context for a request

func NewOrderDeleteParamsWithHTTPClient

func NewOrderDeleteParamsWithHTTPClient(client *http.Client) *OrderDeleteParams

NewOrderDeleteParamsWithHTTPClient creates a new OrderDeleteParams object with the default values initialized, and the ability to set a custom HTTPClient for a request

func NewOrderDeleteParamsWithTimeout

func NewOrderDeleteParamsWithTimeout(timeout time.Duration) *OrderDeleteParams

NewOrderDeleteParamsWithTimeout creates a new OrderDeleteParams object with the default values initialized, and the ability to set a timeout on a request

func (*OrderDeleteParams) SetContext

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

SetContext adds the context to the order delete params

func (*OrderDeleteParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the order delete params

func (*OrderDeleteParams) SetOrderID

func (o *OrderDeleteParams) SetOrderID(orderID int64)

SetOrderID adds the orderId to the order delete params

func (*OrderDeleteParams) SetTimeout

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

SetTimeout adds the timeout to the order delete params

func (*OrderDeleteParams) WithContext

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

WithContext adds the context to the order delete params

func (*OrderDeleteParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the order delete params

func (*OrderDeleteParams) WithOrderID

func (o *OrderDeleteParams) WithOrderID(orderID int64) *OrderDeleteParams

WithOrderID adds the orderID to the order delete params

func (*OrderDeleteParams) WithTimeout

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

WithTimeout adds the timeout to the order delete params

func (*OrderDeleteParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type OrderDeleteReader

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

OrderDeleteReader is a Reader for the OrderDelete structure.

func (*OrderDeleteReader) ReadResponse

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

ReadResponse reads a server response into the received o.

type OrderGetBadRequest

type OrderGetBadRequest struct {
}

OrderGetBadRequest handles this case with default header values.

Invalid ID supplied

func NewOrderGetBadRequest

func NewOrderGetBadRequest() *OrderGetBadRequest

NewOrderGetBadRequest creates a OrderGetBadRequest with default headers values

func (*OrderGetBadRequest) Error

func (o *OrderGetBadRequest) Error() string

type OrderGetNotFound

type OrderGetNotFound struct {
}

OrderGetNotFound handles this case with default header values.

Order not found

func NewOrderGetNotFound

func NewOrderGetNotFound() *OrderGetNotFound

NewOrderGetNotFound creates a OrderGetNotFound with default headers values

func (*OrderGetNotFound) Error

func (o *OrderGetNotFound) Error() string

type OrderGetOK

type OrderGetOK struct {
	Payload *models.Order
}

OrderGetOK handles this case with default header values.

successful operation

func NewOrderGetOK

func NewOrderGetOK() *OrderGetOK

NewOrderGetOK creates a OrderGetOK with default headers values

func (*OrderGetOK) Error

func (o *OrderGetOK) Error() string

type OrderGetParams

type OrderGetParams struct {

	/*OrderID
	  ID of pet that needs to be fetched

	*/
	OrderID int64

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

OrderGetParams contains all the parameters to send to the API endpoint for the order get operation typically these are written to a http.Request

func NewOrderGetParams

func NewOrderGetParams() *OrderGetParams

NewOrderGetParams creates a new OrderGetParams object with the default values initialized.

func NewOrderGetParamsWithContext

func NewOrderGetParamsWithContext(ctx context.Context) *OrderGetParams

NewOrderGetParamsWithContext creates a new OrderGetParams object with the default values initialized, and the ability to set a context for a request

func NewOrderGetParamsWithHTTPClient

func NewOrderGetParamsWithHTTPClient(client *http.Client) *OrderGetParams

NewOrderGetParamsWithHTTPClient creates a new OrderGetParams object with the default values initialized, and the ability to set a custom HTTPClient for a request

func NewOrderGetParamsWithTimeout

func NewOrderGetParamsWithTimeout(timeout time.Duration) *OrderGetParams

NewOrderGetParamsWithTimeout creates a new OrderGetParams object with the default values initialized, and the ability to set a timeout on a request

func (*OrderGetParams) SetContext

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

SetContext adds the context to the order get params

func (*OrderGetParams) SetHTTPClient

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

SetHTTPClient adds the HTTPClient to the order get params

func (*OrderGetParams) SetOrderID

func (o *OrderGetParams) SetOrderID(orderID int64)

SetOrderID adds the orderId to the order get params

func (*OrderGetParams) SetTimeout

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

SetTimeout adds the timeout to the order get params

func (*OrderGetParams) WithContext

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

WithContext adds the context to the order get params

func (*OrderGetParams) WithHTTPClient

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

WithHTTPClient adds the HTTPClient to the order get params

func (*OrderGetParams) WithOrderID

func (o *OrderGetParams) WithOrderID(orderID int64) *OrderGetParams

WithOrderID adds the orderID to the order get params

func (*OrderGetParams) WithTimeout

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

WithTimeout adds the timeout to the order get params

func (*OrderGetParams) WriteToRequest

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

WriteToRequest writes these params to a swagger request

type OrderGetReader

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

OrderGetReader is a Reader for the OrderGet structure.

func (*OrderGetReader) ReadResponse

func (o *OrderGetReader) 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