store

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2018 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Code generated by mockery v1.0.0

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 InventoryGetOKBody
}

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 InventoryGetOKBody

type InventoryGetOKBody map[string]int32

InventoryGetOKBody inventory get o k body swagger:model InventoryGetOKBody

func (InventoryGetOKBody) Validate

func (o InventoryGetOKBody) Validate(formats strfmt.Registry) error

Validate validates this inventory get o k body

type InventoryGetParams

type InventoryGetParams struct {
	Timeout time.Duration
}

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

type MockAPI struct {
	mock.Mock
}

MockAPI is an autogenerated mock type for the API type

func (*MockAPI) InventoryGet

func (_m *MockAPI) InventoryGet(ctx context.Context, params *InventoryGetParams) (*InventoryGetOK, error)

InventoryGet provides a mock function with given fields: ctx, params

func (*MockAPI) OrderCreate

func (_m *MockAPI) OrderCreate(ctx context.Context, params *OrderCreateParams) (*OrderCreateOK, error)

OrderCreate provides a mock function with given fields: ctx, params

func (*MockAPI) OrderDelete

func (_m *MockAPI) OrderDelete(ctx context.Context, params *OrderDeleteParams) (*OrderDeleteNoContent, error)

OrderDelete provides a mock function with given fields: ctx, params

func (*MockAPI) OrderGet

func (_m *MockAPI) OrderGet(ctx context.Context, params *OrderGetParams) (*OrderGetOK, error)

OrderGet provides a mock function with given fields: ctx, params

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

	Timeout time.Duration
}

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

	Timeout time.Duration
}

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

	Timeout time.Duration
}

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