store

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2015 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeleteOrder

type DeleteOrder struct {
	Context *middleware.Context
	Params  DeleteOrderParams
	Handler DeleteOrderHandler
}

DeleteOrder swagger:route DELETE /store/order/{orderId} store deleteOrder

Delete purchase order by ID

For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors

func NewDeleteOrder

func NewDeleteOrder(ctx *middleware.Context, handler DeleteOrderHandler) *DeleteOrder

NewDeleteOrder creates a new http.Handler for the delete order operation

func (*DeleteOrder) ServeHTTP

func (o *DeleteOrder) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type DeleteOrderBadRequest

type DeleteOrderBadRequest struct {
}

DeleteOrderBadRequest Invalid ID supplied

swagger:response deleteOrderBadRequest

func NewDeleteOrderBadRequest added in v0.2.0

func NewDeleteOrderBadRequest() DeleteOrderBadRequest

NewDeleteOrderBadRequest creates DeleteOrderBadRequest with default headers values

func (*DeleteOrderBadRequest) WriteResponse

func (o *DeleteOrderBadRequest) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type DeleteOrderHandler

type DeleteOrderHandler interface {
	Handle(DeleteOrderParams) middleware.Responder
}

DeleteOrderHandler interface for that can handle valid delete order params

type DeleteOrderHandlerFunc

type DeleteOrderHandlerFunc func(DeleteOrderParams) middleware.Responder

DeleteOrderHandlerFunc turns a function with the right signature into a delete order handler

func (DeleteOrderHandlerFunc) Handle

Handle executing the request and returning a response

type DeleteOrderNotFound

type DeleteOrderNotFound struct {
}

DeleteOrderNotFound Order not found

swagger:response deleteOrderNotFound

func NewDeleteOrderNotFound added in v0.2.0

func NewDeleteOrderNotFound() DeleteOrderNotFound

NewDeleteOrderNotFound creates DeleteOrderNotFound with default headers values

func (*DeleteOrderNotFound) WriteResponse

func (o *DeleteOrderNotFound) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type DeleteOrderParams

type DeleteOrderParams struct {
	/*ID of the order that needs to be deleted
	  Required: true
	  Min Length: 1
	  In: path
	*/
	OrderID string
}

DeleteOrderParams contains all the bound params for the delete order operation typically these are obtained from a http.Request

swagger:parameters deleteOrder

func NewDeleteOrderParams added in v0.2.0

func NewDeleteOrderParams() DeleteOrderParams

NewDeleteOrderParams creates a new DeleteOrderParams object with the default values initialized.

func (*DeleteOrderParams) BindRequest

func (o *DeleteOrderParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls

type GetInventory added in v0.2.0

type GetInventory struct {
	Context *middleware.Context
	Handler GetInventoryHandler
}

GetInventory swagger:route GET /store/inventory store getInventory

Returns pet inventories by status

Returns a map of status codes to quantities

func NewGetInventory added in v0.2.0

func NewGetInventory(ctx *middleware.Context, handler GetInventoryHandler) *GetInventory

NewGetInventory creates a new http.Handler for the get inventory operation

func (*GetInventory) ServeHTTP added in v0.2.0

func (o *GetInventory) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type GetInventoryHandler added in v0.2.0

type GetInventoryHandler interface {
	Handle(interface{}) middleware.Responder
}

GetInventoryHandler interface for that can handle valid get inventory params

type GetInventoryHandlerFunc added in v0.2.0

type GetInventoryHandlerFunc func(interface{}) middleware.Responder

GetInventoryHandlerFunc turns a function with the right signature into a get inventory handler

func (GetInventoryHandlerFunc) Handle added in v0.2.0

func (fn GetInventoryHandlerFunc) Handle(principal interface{}) middleware.Responder

Handle executing the request and returning a response

type GetInventoryOK added in v0.2.0

type GetInventoryOK struct {

	// In: body
	Payload GetInventoryOKBodyBody `json:"body,omitempty"`
}

GetInventoryOK successful operation

swagger:response getInventoryOK

func NewGetInventoryOK added in v0.2.0

func NewGetInventoryOK() GetInventoryOK

NewGetInventoryOK creates GetInventoryOK with default headers values

func (*GetInventoryOK) WithPayload added in v0.2.0

func (o *GetInventoryOK) WithPayload(payload GetInventoryOKBodyBody) *GetInventoryOK

WithPayload adds the payload to the get inventory o k response

func (*GetInventoryOK) WriteResponse added in v0.2.0

func (o *GetInventoryOK) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type GetInventoryOKBodyBody added in v0.2.0

type GetInventoryOKBodyBody map[string]int32

GetInventoryOKBodyBody get inventory o k body body

swagger:model GetInventoryOKBodyBody

func (GetInventoryOKBodyBody) Validate added in v0.2.0

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

Validate validates this get inventory o k body body

type GetOrderByID

type GetOrderByID struct {
	Context *middleware.Context
	Params  GetOrderByIDParams
	Handler GetOrderByIDHandler
}

GetOrderByID swagger:route GET /store/order/{orderId} store getOrderById

Find purchase order by ID

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

func NewGetOrderByID

func NewGetOrderByID(ctx *middleware.Context, handler GetOrderByIDHandler) *GetOrderByID

NewGetOrderByID creates a new http.Handler for the get order by id operation

func (*GetOrderByID) ServeHTTP

func (o *GetOrderByID) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type GetOrderByIDBadRequest

type GetOrderByIDBadRequest struct {
}

GetOrderByIDBadRequest Invalid ID supplied

swagger:response getOrderByIdBadRequest

func NewGetOrderByIDBadRequest added in v0.2.0

func NewGetOrderByIDBadRequest() GetOrderByIDBadRequest

NewGetOrderByIDBadRequest creates GetOrderByIDBadRequest with default headers values

func (*GetOrderByIDBadRequest) WriteResponse

func (o *GetOrderByIDBadRequest) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type GetOrderByIDHandler

type GetOrderByIDHandler interface {
	Handle(GetOrderByIDParams) middleware.Responder
}

GetOrderByIDHandler interface for that can handle valid get order by id params

type GetOrderByIDHandlerFunc

type GetOrderByIDHandlerFunc func(GetOrderByIDParams) middleware.Responder

GetOrderByIDHandlerFunc turns a function with the right signature into a get order by id handler

func (GetOrderByIDHandlerFunc) Handle

Handle executing the request and returning a response

type GetOrderByIDNotFound

type GetOrderByIDNotFound struct {
}

GetOrderByIDNotFound Order not found

swagger:response getOrderByIdNotFound

func NewGetOrderByIDNotFound added in v0.2.0

func NewGetOrderByIDNotFound() GetOrderByIDNotFound

NewGetOrderByIDNotFound creates GetOrderByIDNotFound with default headers values

func (*GetOrderByIDNotFound) WriteResponse

func (o *GetOrderByIDNotFound) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type GetOrderByIDOK

type GetOrderByIDOK struct {

	// In: body
	Payload *models.Order `json:"body,omitempty"`
}

GetOrderByIDOK successful operation

swagger:response getOrderByIdOK

func NewGetOrderByIDOK added in v0.2.0

func NewGetOrderByIDOK() GetOrderByIDOK

NewGetOrderByIDOK creates GetOrderByIDOK with default headers values

func (*GetOrderByIDOK) WithPayload added in v0.2.0

func (o *GetOrderByIDOK) WithPayload(payload *models.Order) *GetOrderByIDOK

WithPayload adds the payload to the get order by id o k response

func (*GetOrderByIDOK) WriteResponse

func (o *GetOrderByIDOK) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type GetOrderByIDParams

type GetOrderByIDParams struct {
	/*ID of pet that needs to be fetched
	  Required: true
	  Maximum: 5
	  Minimum: 1
	  In: path
	*/
	OrderID int64
}

GetOrderByIDParams contains all the bound params for the get order by id operation typically these are obtained from a http.Request

swagger:parameters getOrderById

func NewGetOrderByIDParams added in v0.2.0

func NewGetOrderByIDParams() GetOrderByIDParams

NewGetOrderByIDParams creates a new GetOrderByIDParams object with the default values initialized.

func (*GetOrderByIDParams) BindRequest

func (o *GetOrderByIDParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls

type PlaceOrder

type PlaceOrder struct {
	Context *middleware.Context
	Params  PlaceOrderParams
	Handler PlaceOrderHandler
}

PlaceOrder swagger:route POST /store/order store placeOrder

Place an order for a pet

func NewPlaceOrder

func NewPlaceOrder(ctx *middleware.Context, handler PlaceOrderHandler) *PlaceOrder

NewPlaceOrder creates a new http.Handler for the place order operation

func (*PlaceOrder) ServeHTTP

func (o *PlaceOrder) ServeHTTP(rw http.ResponseWriter, r *http.Request)

type PlaceOrderBadRequest

type PlaceOrderBadRequest struct {
}

PlaceOrderBadRequest Invalid Order

swagger:response placeOrderBadRequest

func NewPlaceOrderBadRequest added in v0.2.0

func NewPlaceOrderBadRequest() PlaceOrderBadRequest

NewPlaceOrderBadRequest creates PlaceOrderBadRequest with default headers values

func (*PlaceOrderBadRequest) WriteResponse

func (o *PlaceOrderBadRequest) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type PlaceOrderHandler

type PlaceOrderHandler interface {
	Handle(PlaceOrderParams) middleware.Responder
}

PlaceOrderHandler interface for that can handle valid place order params

type PlaceOrderHandlerFunc

type PlaceOrderHandlerFunc func(PlaceOrderParams) middleware.Responder

PlaceOrderHandlerFunc turns a function with the right signature into a place order handler

func (PlaceOrderHandlerFunc) Handle

Handle executing the request and returning a response

type PlaceOrderOK

type PlaceOrderOK struct {

	// In: body
	Payload *models.Order `json:"body,omitempty"`
}

PlaceOrderOK successful operation

swagger:response placeOrderOK

func NewPlaceOrderOK added in v0.2.0

func NewPlaceOrderOK() PlaceOrderOK

NewPlaceOrderOK creates PlaceOrderOK with default headers values

func (*PlaceOrderOK) WithPayload added in v0.2.0

func (o *PlaceOrderOK) WithPayload(payload *models.Order) *PlaceOrderOK

WithPayload adds the payload to the place order o k response

func (*PlaceOrderOK) WriteResponse

func (o *PlaceOrderOK) WriteResponse(rw http.ResponseWriter, producer httpkit.Producer)

WriteResponse to the client

type PlaceOrderParams

type PlaceOrderParams struct {
	/*order placed for purchasing the pet
	  Required: true
	  In: body
	*/
	Body *models.Order
}

PlaceOrderParams contains all the bound params for the place order operation typically these are obtained from a http.Request

swagger:parameters placeOrder

func NewPlaceOrderParams added in v0.2.0

func NewPlaceOrderParams() PlaceOrderParams

NewPlaceOrderParams creates a new PlaceOrderParams object with the default values initialized.

func (*PlaceOrderParams) BindRequest

func (o *PlaceOrderParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error

BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls

Jump to

Keyboard shortcuts

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