go-swagger: github.com/go-swagger/go-swagger/examples/generated/restapi/operations/store Index | Files

package store

import "github.com/go-swagger/go-swagger/examples/generated/restapi/operations/store"

Index

Package Files

delete_order.go delete_order_parameters.go delete_order_responses.go delete_order_urlbuilder.go get_order_by_id.go get_order_by_id_parameters.go get_order_by_id_responses.go get_order_by_id_urlbuilder.go place_order.go place_order_parameters.go place_order_responses.go place_order_urlbuilder.go

Constants

const DeleteOrderBadRequestCode int = 400

DeleteOrderBadRequestCode is the HTTP code returned for type DeleteOrderBadRequest

const DeleteOrderNotFoundCode int = 404

DeleteOrderNotFoundCode is the HTTP code returned for type DeleteOrderNotFound

const GetOrderByIDBadRequestCode int = 400

GetOrderByIDBadRequestCode is the HTTP code returned for type GetOrderByIDBadRequest

const GetOrderByIDNotFoundCode int = 404

GetOrderByIDNotFoundCode is the HTTP code returned for type GetOrderByIDNotFound

const GetOrderByIDOKCode int = 200

GetOrderByIDOKCode is the HTTP code returned for type GetOrderByIDOK

const PlaceOrderBadRequestCode int = 400

PlaceOrderBadRequestCode is the HTTP code returned for type PlaceOrderBadRequest

const PlaceOrderOKCode int = 200

PlaceOrderOKCode is the HTTP code returned for type PlaceOrderOK

type DeleteOrder Uses

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

DeleteOrder swagger:route DELETE /stores/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 Uses

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

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

func (*DeleteOrder) ServeHTTP Uses

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

type DeleteOrderBadRequest Uses

type DeleteOrderBadRequest struct {
}

DeleteOrderBadRequest Invalid ID supplied

swagger:response deleteOrderBadRequest

func NewDeleteOrderBadRequest Uses

func NewDeleteOrderBadRequest() *DeleteOrderBadRequest

NewDeleteOrderBadRequest creates DeleteOrderBadRequest with default headers values

func (*DeleteOrderBadRequest) WriteResponse Uses

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

WriteResponse to the client

type DeleteOrderHandler Uses

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

DeleteOrderHandler interface for that can handle valid delete order params

type DeleteOrderHandlerFunc Uses

type DeleteOrderHandlerFunc func(DeleteOrderParams) middleware.Responder

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

func (DeleteOrderHandlerFunc) Handle Uses

func (fn DeleteOrderHandlerFunc) Handle(params DeleteOrderParams) middleware.Responder

Handle executing the request and returning a response

type DeleteOrderNotFound Uses

type DeleteOrderNotFound struct {
}

DeleteOrderNotFound Order not found

swagger:response deleteOrderNotFound

func NewDeleteOrderNotFound Uses

func NewDeleteOrderNotFound() *DeleteOrderNotFound

NewDeleteOrderNotFound creates DeleteOrderNotFound with default headers values

func (*DeleteOrderNotFound) WriteResponse Uses

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

WriteResponse to the client

type DeleteOrderParams Uses

type DeleteOrderParams struct {

    // HTTP Request Object
    HTTPRequest *http.Request `json:"-"`

    /*ID of the order that needs to be deleted
      Required: true
      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 Uses

func NewDeleteOrderParams() DeleteOrderParams

NewDeleteOrderParams creates a new DeleteOrderParams object no default values defined in spec.

func (*DeleteOrderParams) BindRequest Uses

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.

To ensure default values, the struct must have been initialized with NewDeleteOrderParams() beforehand.

type DeleteOrderURL Uses

type DeleteOrderURL struct {
    OrderID string
    // contains filtered or unexported fields
}

DeleteOrderURL generates an URL for the delete order operation

func (*DeleteOrderURL) Build Uses

func (o *DeleteOrderURL) Build() (*url.URL, error)

Build a url path and query string

func (*DeleteOrderURL) BuildFull Uses

func (o *DeleteOrderURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*DeleteOrderURL) Must Uses

func (o *DeleteOrderURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*DeleteOrderURL) SetBasePath Uses

func (o *DeleteOrderURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*DeleteOrderURL) String Uses

func (o *DeleteOrderURL) String() string

String returns the string representation of the path with query string

func (*DeleteOrderURL) StringFull Uses

func (o *DeleteOrderURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*DeleteOrderURL) WithBasePath Uses

func (o *DeleteOrderURL) WithBasePath(bp string) *DeleteOrderURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type GetOrderByID Uses

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

GetOrderByID swagger:route GET /stores/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 Uses

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

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

func (*GetOrderByID) ServeHTTP Uses

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

type GetOrderByIDBadRequest Uses

type GetOrderByIDBadRequest struct {
}

GetOrderByIDBadRequest Invalid ID supplied

swagger:response getOrderByIdBadRequest

func NewGetOrderByIDBadRequest Uses

func NewGetOrderByIDBadRequest() *GetOrderByIDBadRequest

NewGetOrderByIDBadRequest creates GetOrderByIDBadRequest with default headers values

func (*GetOrderByIDBadRequest) WriteResponse Uses

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

WriteResponse to the client

type GetOrderByIDHandler Uses

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

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

type GetOrderByIDHandlerFunc Uses

type GetOrderByIDHandlerFunc func(GetOrderByIDParams) middleware.Responder

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

func (GetOrderByIDHandlerFunc) Handle Uses

func (fn GetOrderByIDHandlerFunc) Handle(params GetOrderByIDParams) middleware.Responder

Handle executing the request and returning a response

type GetOrderByIDNotFound Uses

type GetOrderByIDNotFound struct {
}

GetOrderByIDNotFound Order not found

swagger:response getOrderByIdNotFound

func NewGetOrderByIDNotFound Uses

func NewGetOrderByIDNotFound() *GetOrderByIDNotFound

NewGetOrderByIDNotFound creates GetOrderByIDNotFound with default headers values

func (*GetOrderByIDNotFound) WriteResponse Uses

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

WriteResponse to the client

type GetOrderByIDOK Uses

type GetOrderByIDOK struct {

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

GetOrderByIDOK successful operation

swagger:response getOrderByIdOK

func NewGetOrderByIDOK Uses

func NewGetOrderByIDOK() *GetOrderByIDOK

NewGetOrderByIDOK creates GetOrderByIDOK with default headers values

func (*GetOrderByIDOK) SetPayload Uses

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

SetPayload sets the payload to the get order by Id o k response

func (*GetOrderByIDOK) WithPayload Uses

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

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

func (*GetOrderByIDOK) WriteResponse Uses

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

WriteResponse to the client

type GetOrderByIDParams Uses

type GetOrderByIDParams struct {

    // HTTP Request Object
    HTTPRequest *http.Request `json:"-"`

    /*ID of pet that needs to be fetched
      Required: true
      In: path
    */
    OrderID string
}

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 Uses

func NewGetOrderByIDParams() GetOrderByIDParams

NewGetOrderByIDParams creates a new GetOrderByIDParams object no default values defined in spec.

func (*GetOrderByIDParams) BindRequest Uses

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.

To ensure default values, the struct must have been initialized with NewGetOrderByIDParams() beforehand.

type GetOrderByIDURL Uses

type GetOrderByIDURL struct {
    OrderID string
    // contains filtered or unexported fields
}

GetOrderByIDURL generates an URL for the get order by Id operation

func (*GetOrderByIDURL) Build Uses

func (o *GetOrderByIDURL) Build() (*url.URL, error)

Build a url path and query string

func (*GetOrderByIDURL) BuildFull Uses

func (o *GetOrderByIDURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*GetOrderByIDURL) Must Uses

func (o *GetOrderByIDURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*GetOrderByIDURL) SetBasePath Uses

func (o *GetOrderByIDURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*GetOrderByIDURL) String Uses

func (o *GetOrderByIDURL) String() string

String returns the string representation of the path with query string

func (*GetOrderByIDURL) StringFull Uses

func (o *GetOrderByIDURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*GetOrderByIDURL) WithBasePath Uses

func (o *GetOrderByIDURL) WithBasePath(bp string) *GetOrderByIDURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

type PlaceOrder Uses

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

PlaceOrder swagger:route POST /stores/order store placeOrder

Place an order for a pet

func NewPlaceOrder Uses

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

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

func (*PlaceOrder) ServeHTTP Uses

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

type PlaceOrderBadRequest Uses

type PlaceOrderBadRequest struct {
}

PlaceOrderBadRequest Invalid Order

swagger:response placeOrderBadRequest

func NewPlaceOrderBadRequest Uses

func NewPlaceOrderBadRequest() *PlaceOrderBadRequest

NewPlaceOrderBadRequest creates PlaceOrderBadRequest with default headers values

func (*PlaceOrderBadRequest) WriteResponse Uses

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

WriteResponse to the client

type PlaceOrderHandler Uses

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

PlaceOrderHandler interface for that can handle valid place order params

type PlaceOrderHandlerFunc Uses

type PlaceOrderHandlerFunc func(PlaceOrderParams) middleware.Responder

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

func (PlaceOrderHandlerFunc) Handle Uses

func (fn PlaceOrderHandlerFunc) Handle(params PlaceOrderParams) middleware.Responder

Handle executing the request and returning a response

type PlaceOrderOK Uses

type PlaceOrderOK struct {

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

PlaceOrderOK successful operation

swagger:response placeOrderOK

func NewPlaceOrderOK Uses

func NewPlaceOrderOK() *PlaceOrderOK

NewPlaceOrderOK creates PlaceOrderOK with default headers values

func (*PlaceOrderOK) SetPayload Uses

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

SetPayload sets the payload to the place order o k response

func (*PlaceOrderOK) WithPayload Uses

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

WithPayload adds the payload to the place order o k response

func (*PlaceOrderOK) WriteResponse Uses

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

WriteResponse to the client

type PlaceOrderParams Uses

type PlaceOrderParams struct {

    // HTTP Request Object
    HTTPRequest *http.Request `json:"-"`

    /*order placed for purchasing the pet
      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 Uses

func NewPlaceOrderParams() PlaceOrderParams

NewPlaceOrderParams creates a new PlaceOrderParams object no default values defined in spec.

func (*PlaceOrderParams) BindRequest Uses

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.

To ensure default values, the struct must have been initialized with NewPlaceOrderParams() beforehand.

type PlaceOrderURL Uses

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

PlaceOrderURL generates an URL for the place order operation

func (*PlaceOrderURL) Build Uses

func (o *PlaceOrderURL) Build() (*url.URL, error)

Build a url path and query string

func (*PlaceOrderURL) BuildFull Uses

func (o *PlaceOrderURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*PlaceOrderURL) Must Uses

func (o *PlaceOrderURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*PlaceOrderURL) SetBasePath Uses

func (o *PlaceOrderURL) SetBasePath(bp string)

SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

func (*PlaceOrderURL) String Uses

func (o *PlaceOrderURL) String() string

String returns the string representation of the path with query string

func (*PlaceOrderURL) StringFull Uses

func (o *PlaceOrderURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*PlaceOrderURL) WithBasePath Uses

func (o *PlaceOrderURL) WithBasePath(bp string) *PlaceOrderURL

WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string

Package store imports 10 packages (graph) and is imported by 12 packages. Updated 2019-04-07. Refresh now. Tools for package owners.