Documentation ¶
Index ¶
- Constants
- Variables
- func SchemaPath(r *http.Request) (string, bool)
- func SpecFileHandler() http.Handler
- type API
- type Client
- func (c *Client) Get(ctx context.Context, request GetParams) (GetResponse, error)
- func (c *Client) GetShops(ctx context.Context, request GetShopsParams) (GetShopsResponse, error)
- func (c *Client) GetShopsActivate(ctx context.Context, request GetShopsActivateParams) (GetShopsActivateResponse, error)
- func (c *Client) GetShopsActivateRT(ctx context.Context, request GetShopsActivateRTParams) (GetShopsActivateRTResponse, error)
- func (c *Client) GetShopsActivateTag(ctx context.Context, request GetShopsActivateTagParams) (GetShopsActivateTagResponse, error)
- func (c *Client) GetShopsRT(ctx context.Context, request GetShopsRTParams) (GetShopsRTResponse, error)
- func (c *Client) GetShopsShop(ctx context.Context, request GetShopsShopParams) (GetShopsShopResponse, error)
- func (c *Client) GetShopsShopPets(ctx context.Context, request GetShopsShopPetsParams) (GetShopsShopPetsResponse, error)
- func (c *Client) GetShopsShopRT(ctx context.Context, request GetShopsShopRTParams) (GetShopsShopRTResponse, error)
- func (c *Client) ReviewShop(ctx context.Context, request ReviewShopParams) (ReviewShopResponse, error)
- type ErrParseParam
- type Error
- type GetHandlerFunc
- type GetParams
- type GetRequest
- type GetResponse
- type GetResponseDefault
- type GetShopsActivateHandlerFunc
- type GetShopsActivateParams
- type GetShopsActivateRTHandlerFunc
- type GetShopsActivateRTParams
- type GetShopsActivateRTRequest
- type GetShopsActivateRTResponse
- type GetShopsActivateRTResponseDefault
- type GetShopsActivateRequest
- type GetShopsActivateResponse
- type GetShopsActivateResponseDefault
- type GetShopsActivateTagHandlerFunc
- type GetShopsActivateTagParams
- type GetShopsActivateTagRequest
- type GetShopsActivateTagResponse
- type GetShopsActivateTagResponseDefault
- type GetShopsHandlerFunc
- type GetShopsParams
- type GetShopsRTHandlerFunc
- type GetShopsRTParams
- type GetShopsRTRequest
- type GetShopsRTResponse
- type GetShopsRTResponseDefault
- type GetShopsRequest
- type GetShopsResponse
- type GetShopsResponseDefault
- type GetShopsShopHandlerFunc
- type GetShopsShopParams
- type GetShopsShopPetsHandlerFunc
- type GetShopsShopPetsParams
- type GetShopsShopPetsRequest
- type GetShopsShopPetsResponse
- type GetShopsShopPetsResponse200JSON
- type GetShopsShopPetsResponse200JSONBody
- type GetShopsShopPetsResponseDefaultJSON
- type GetShopsShopRTHandlerFunc
- type GetShopsShopRTParams
- type GetShopsShopRTRequest
- type GetShopsShopRTResponse
- type GetShopsShopRTResponseDefault
- type GetShopsShopRequest
- type GetShopsShopResponse
- type GetShopsShopResponseDefault
- type HTTPClient
- type HTTPClientFunc
- type NewPet
- type Pet
- type Pets
- type ReviewShopHandlerFunc
- type ReviewShopParams
- type ReviewShopRequest
- type ReviewShopResponse
- type ReviewShopResponse200JSON
- type ReviewShopResponseDefaultJSON
Constants ¶
View Source
const SpecFile string = `` /* 3681-byte string literal not displayed */
Variables ¶
Functions ¶
func SpecFileHandler ¶
Types ¶
type API ¶
type API struct { GetHandler GetHandlerFunc GetShopsHandler GetShopsHandlerFunc GetShopsRTHandler GetShopsRTHandlerFunc GetShopsActivateHandler GetShopsActivateHandlerFunc GetShopsActivateRTHandler GetShopsActivateRTHandlerFunc GetShopsActivateTagHandler GetShopsActivateTagHandlerFunc GetShopsShopHandler GetShopsShopHandlerFunc GetShopsShopRTHandler GetShopsShopRTHandlerFunc GetShopsShopPetsHandler GetShopsShopPetsHandlerFunc ReviewShopHandler ReviewShopHandlerFunc // not found NotFoundHandler http.Handler // spec file SpecFileHandler http.Handler Middlewares []func(h http.Handler) http.Handler }
type Client ¶
type Client struct { BaseURL string HTTPClient HTTPClient }
func NewClient ¶
func NewClient(baseURL string, httpClient HTTPClient) *Client
func (*Client) GetShops ¶
func (c *Client) GetShops(ctx context.Context, request GetShopsParams) (GetShopsResponse, error)
GetShops - GET /shops
func (*Client) GetShopsActivate ¶
func (c *Client) GetShopsActivate(ctx context.Context, request GetShopsActivateParams) (GetShopsActivateResponse, error)
GetShopsActivate - GET /shops/activate
func (*Client) GetShopsActivateRT ¶
func (c *Client) GetShopsActivateRT(ctx context.Context, request GetShopsActivateRTParams) (GetShopsActivateRTResponse, error)
GetShopsActivateRT - GET /shops/activate/
func (*Client) GetShopsActivateTag ¶
func (c *Client) GetShopsActivateTag(ctx context.Context, request GetShopsActivateTagParams) (GetShopsActivateTagResponse, error)
GetShopsActivateTag - GET /shops/activate/tag
func (*Client) GetShopsRT ¶
func (c *Client) GetShopsRT(ctx context.Context, request GetShopsRTParams) (GetShopsRTResponse, error)
GetShopsRT - GET /shops/
func (*Client) GetShopsShop ¶
func (c *Client) GetShopsShop(ctx context.Context, request GetShopsShopParams) (GetShopsShopResponse, error)
GetShopsShop - GET /shops/{shop}
func (*Client) GetShopsShopPets ¶
func (c *Client) GetShopsShopPets(ctx context.Context, request GetShopsShopPetsParams) (GetShopsShopPetsResponse, error)
GetShopsShopPets - GET /shops/{shop}/pets
func (*Client) GetShopsShopRT ¶
func (c *Client) GetShopsShopRT(ctx context.Context, request GetShopsShopRTParams) (GetShopsShopRTResponse, error)
GetShopsShopRT - GET /shops/{shop}/
func (*Client) ReviewShop ¶ added in v0.0.5
func (c *Client) ReviewShop(ctx context.Context, request ReviewShopParams) (ReviewShopResponse, error)
ReviewShop - POST /shops/{shop}/review
type ErrParseParam ¶
func (ErrParseParam) Error ¶
func (e ErrParseParam) Error() string
func (ErrParseParam) Unwrap ¶
func (e ErrParseParam) Unwrap() error
type GetHandlerFunc ¶
type GetHandlerFunc func(ctx context.Context, r GetRequest) GetResponse
func (GetHandlerFunc) ServeHTTP ¶
func (f GetHandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request)
type GetRequest ¶
func GetHTTPRequest ¶
func GetHTTPRequest(r *http.Request) GetRequest
type GetResponse ¶
type GetResponse interface { Write(w http.ResponseWriter) // contains filtered or unexported methods }
func NewGetResponseDefault ¶
func NewGetResponseDefault(code int) GetResponse
type GetResponseDefault ¶
type GetResponseDefault struct {
Code int
}
func (GetResponseDefault) Write ¶
func (r GetResponseDefault) Write(w http.ResponseWriter)
type GetShopsActivateHandlerFunc ¶
type GetShopsActivateHandlerFunc func(ctx context.Context, r GetShopsActivateRequest) GetShopsActivateResponse
func (GetShopsActivateHandlerFunc) ServeHTTP ¶
func (f GetShopsActivateHandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request)
type GetShopsActivateParams ¶ added in v0.0.3
type GetShopsActivateParams struct { }
func (GetShopsActivateParams) HTTP ¶ added in v0.0.3
func (r GetShopsActivateParams) HTTP() *http.Request
func (GetShopsActivateParams) Parse ¶ added in v0.0.3
func (r GetShopsActivateParams) Parse() GetShopsActivateParams
type GetShopsActivateRTHandlerFunc ¶
type GetShopsActivateRTHandlerFunc func(ctx context.Context, r GetShopsActivateRTRequest) GetShopsActivateRTResponse
func (GetShopsActivateRTHandlerFunc) ServeHTTP ¶
func (f GetShopsActivateRTHandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request)
type GetShopsActivateRTParams ¶ added in v0.0.3
type GetShopsActivateRTParams struct { }
func (GetShopsActivateRTParams) HTTP ¶ added in v0.0.3
func (r GetShopsActivateRTParams) HTTP() *http.Request
func (GetShopsActivateRTParams) Parse ¶ added in v0.0.3
func (r GetShopsActivateRTParams) Parse() GetShopsActivateRTParams
type GetShopsActivateRTRequest ¶
type GetShopsActivateRTRequest interface { HTTP() *http.Request Parse() GetShopsActivateRTParams }
func GetShopsActivateRTHTTPRequest ¶
func GetShopsActivateRTHTTPRequest(r *http.Request) GetShopsActivateRTRequest
type GetShopsActivateRTResponse ¶
type GetShopsActivateRTResponse interface { Write(w http.ResponseWriter) // contains filtered or unexported methods }
func NewGetShopsActivateRTResponseDefault ¶
func NewGetShopsActivateRTResponseDefault(code int) GetShopsActivateRTResponse
type GetShopsActivateRTResponseDefault ¶
type GetShopsActivateRTResponseDefault struct {
Code int
}
func (GetShopsActivateRTResponseDefault) Write ¶
func (r GetShopsActivateRTResponseDefault) Write(w http.ResponseWriter)
type GetShopsActivateRequest ¶
type GetShopsActivateRequest interface { HTTP() *http.Request Parse() GetShopsActivateParams }
func GetShopsActivateHTTPRequest ¶
func GetShopsActivateHTTPRequest(r *http.Request) GetShopsActivateRequest
type GetShopsActivateResponse ¶
type GetShopsActivateResponse interface { Write(w http.ResponseWriter) // contains filtered or unexported methods }
func NewGetShopsActivateResponseDefault ¶
func NewGetShopsActivateResponseDefault(code int) GetShopsActivateResponse
type GetShopsActivateResponseDefault ¶
type GetShopsActivateResponseDefault struct {
Code int
}
func (GetShopsActivateResponseDefault) Write ¶
func (r GetShopsActivateResponseDefault) Write(w http.ResponseWriter)
type GetShopsActivateTagHandlerFunc ¶
type GetShopsActivateTagHandlerFunc func(ctx context.Context, r GetShopsActivateTagRequest) GetShopsActivateTagResponse
func (GetShopsActivateTagHandlerFunc) ServeHTTP ¶
func (f GetShopsActivateTagHandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request)
type GetShopsActivateTagParams ¶ added in v0.0.3
type GetShopsActivateTagParams struct { }
func (GetShopsActivateTagParams) HTTP ¶ added in v0.0.3
func (r GetShopsActivateTagParams) HTTP() *http.Request
func (GetShopsActivateTagParams) Parse ¶ added in v0.0.3
func (r GetShopsActivateTagParams) Parse() GetShopsActivateTagParams
type GetShopsActivateTagRequest ¶
type GetShopsActivateTagRequest interface { HTTP() *http.Request Parse() GetShopsActivateTagParams }
func GetShopsActivateTagHTTPRequest ¶
func GetShopsActivateTagHTTPRequest(r *http.Request) GetShopsActivateTagRequest
type GetShopsActivateTagResponse ¶
type GetShopsActivateTagResponse interface { Write(w http.ResponseWriter) // contains filtered or unexported methods }
func NewGetShopsActivateTagResponseDefault ¶
func NewGetShopsActivateTagResponseDefault(code int) GetShopsActivateTagResponse
type GetShopsActivateTagResponseDefault ¶
type GetShopsActivateTagResponseDefault struct {
Code int
}
func (GetShopsActivateTagResponseDefault) Write ¶
func (r GetShopsActivateTagResponseDefault) Write(w http.ResponseWriter)
type GetShopsHandlerFunc ¶
type GetShopsHandlerFunc func(ctx context.Context, r GetShopsRequest) GetShopsResponse
func (GetShopsHandlerFunc) ServeHTTP ¶
func (f GetShopsHandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request)
type GetShopsParams ¶ added in v0.0.3
type GetShopsParams struct { }
func (GetShopsParams) HTTP ¶ added in v0.0.3
func (r GetShopsParams) HTTP() *http.Request
func (GetShopsParams) Parse ¶ added in v0.0.3
func (r GetShopsParams) Parse() GetShopsParams
type GetShopsRTHandlerFunc ¶
type GetShopsRTHandlerFunc func(ctx context.Context, r GetShopsRTRequest) GetShopsRTResponse
func (GetShopsRTHandlerFunc) ServeHTTP ¶
func (f GetShopsRTHandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request)
type GetShopsRTParams ¶ added in v0.0.3
type GetShopsRTParams struct { }
func (GetShopsRTParams) HTTP ¶ added in v0.0.3
func (r GetShopsRTParams) HTTP() *http.Request
func (GetShopsRTParams) Parse ¶ added in v0.0.3
func (r GetShopsRTParams) Parse() GetShopsRTParams
type GetShopsRTRequest ¶
type GetShopsRTRequest interface { HTTP() *http.Request Parse() GetShopsRTParams }
func GetShopsRTHTTPRequest ¶
func GetShopsRTHTTPRequest(r *http.Request) GetShopsRTRequest
type GetShopsRTResponse ¶
type GetShopsRTResponse interface { Write(w http.ResponseWriter) // contains filtered or unexported methods }
func NewGetShopsRTResponseDefault ¶
func NewGetShopsRTResponseDefault(code int) GetShopsRTResponse
type GetShopsRTResponseDefault ¶
type GetShopsRTResponseDefault struct {
Code int
}
func (GetShopsRTResponseDefault) Write ¶
func (r GetShopsRTResponseDefault) Write(w http.ResponseWriter)
type GetShopsRequest ¶
type GetShopsRequest interface { HTTP() *http.Request Parse() GetShopsParams }
func GetShopsHTTPRequest ¶
func GetShopsHTTPRequest(r *http.Request) GetShopsRequest
type GetShopsResponse ¶
type GetShopsResponse interface { Write(w http.ResponseWriter) // contains filtered or unexported methods }
func NewGetShopsResponseDefault ¶
func NewGetShopsResponseDefault(code int) GetShopsResponse
type GetShopsResponseDefault ¶
type GetShopsResponseDefault struct {
Code int
}
func (GetShopsResponseDefault) Write ¶
func (r GetShopsResponseDefault) Write(w http.ResponseWriter)
type GetShopsShopHandlerFunc ¶
type GetShopsShopHandlerFunc func(ctx context.Context, r GetShopsShopRequest) GetShopsShopResponse
func (GetShopsShopHandlerFunc) ServeHTTP ¶
func (f GetShopsShopHandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request)
type GetShopsShopParams ¶ added in v0.0.3
type GetShopsShopParams struct { Path struct { Shop int32 } }
func (GetShopsShopParams) HTTP ¶ added in v0.0.3
func (r GetShopsShopParams) HTTP() *http.Request
func (GetShopsShopParams) Parse ¶ added in v0.0.3
func (r GetShopsShopParams) Parse() (GetShopsShopParams, error)
type GetShopsShopPetsHandlerFunc ¶
type GetShopsShopPetsHandlerFunc func(ctx context.Context, r GetShopsShopPetsRequest) GetShopsShopPetsResponse
func (GetShopsShopPetsHandlerFunc) ServeHTTP ¶
func (f GetShopsShopPetsHandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request)
type GetShopsShopPetsParams ¶ added in v0.0.3
type GetShopsShopPetsParams struct { Query struct { Page *int32 PageSize int32 } Path struct { Shop int32 } }
func (GetShopsShopPetsParams) HTTP ¶ added in v0.0.3
func (r GetShopsShopPetsParams) HTTP() *http.Request
func (GetShopsShopPetsParams) Parse ¶ added in v0.0.3
func (r GetShopsShopPetsParams) Parse() (GetShopsShopPetsParams, error)
type GetShopsShopPetsRequest ¶
type GetShopsShopPetsRequest interface { HTTP() *http.Request Parse() (GetShopsShopPetsParams, error) }
func GetShopsShopPetsHTTPRequest ¶
func GetShopsShopPetsHTTPRequest(r *http.Request) GetShopsShopPetsRequest
type GetShopsShopPetsResponse ¶
type GetShopsShopPetsResponse interface { Write(w http.ResponseWriter) // contains filtered or unexported methods }
func NewGetShopsShopPetsResponse200JSON ¶
func NewGetShopsShopPetsResponse200JSON(body GetShopsShopPetsResponse200JSONBody, xNext string) GetShopsShopPetsResponse
func NewGetShopsShopPetsResponseDefaultJSON ¶
func NewGetShopsShopPetsResponseDefaultJSON(code int, body Error) GetShopsShopPetsResponse
type GetShopsShopPetsResponse200JSON ¶
type GetShopsShopPetsResponse200JSON struct { Body GetShopsShopPetsResponse200JSONBody Headers struct { XNext string } }
GetShopsShopPetsResponse200JSON - List of pets
func (GetShopsShopPetsResponse200JSON) Write ¶
func (r GetShopsShopPetsResponse200JSON) Write(w http.ResponseWriter)
type GetShopsShopPetsResponseDefaultJSON ¶
func (GetShopsShopPetsResponseDefaultJSON) Write ¶
func (r GetShopsShopPetsResponseDefaultJSON) Write(w http.ResponseWriter)
type GetShopsShopRTHandlerFunc ¶
type GetShopsShopRTHandlerFunc func(ctx context.Context, r GetShopsShopRTRequest) GetShopsShopRTResponse
func (GetShopsShopRTHandlerFunc) ServeHTTP ¶
func (f GetShopsShopRTHandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request)
type GetShopsShopRTParams ¶ added in v0.0.3
type GetShopsShopRTParams struct { Path struct { Shop int32 } }
func (GetShopsShopRTParams) HTTP ¶ added in v0.0.3
func (r GetShopsShopRTParams) HTTP() *http.Request
func (GetShopsShopRTParams) Parse ¶ added in v0.0.3
func (r GetShopsShopRTParams) Parse() (GetShopsShopRTParams, error)
type GetShopsShopRTRequest ¶
type GetShopsShopRTRequest interface { HTTP() *http.Request Parse() (GetShopsShopRTParams, error) }
func GetShopsShopRTHTTPRequest ¶
func GetShopsShopRTHTTPRequest(r *http.Request) GetShopsShopRTRequest
type GetShopsShopRTResponse ¶
type GetShopsShopRTResponse interface { Write(w http.ResponseWriter) // contains filtered or unexported methods }
func NewGetShopsShopRTResponseDefault ¶
func NewGetShopsShopRTResponseDefault(code int) GetShopsShopRTResponse
type GetShopsShopRTResponseDefault ¶
type GetShopsShopRTResponseDefault struct {
Code int
}
func (GetShopsShopRTResponseDefault) Write ¶
func (r GetShopsShopRTResponseDefault) Write(w http.ResponseWriter)
type GetShopsShopRequest ¶
type GetShopsShopRequest interface { HTTP() *http.Request Parse() (GetShopsShopParams, error) }
func GetShopsShopHTTPRequest ¶
func GetShopsShopHTTPRequest(r *http.Request) GetShopsShopRequest
type GetShopsShopResponse ¶
type GetShopsShopResponse interface { Write(w http.ResponseWriter) // contains filtered or unexported methods }
func NewGetShopsShopResponseDefault ¶
func NewGetShopsShopResponseDefault(code int) GetShopsShopResponse
type GetShopsShopResponseDefault ¶
type GetShopsShopResponseDefault struct {
Code int
}
func (GetShopsShopResponseDefault) Write ¶
func (r GetShopsShopResponseDefault) Write(w http.ResponseWriter)
type HTTPClientFunc ¶ added in v0.0.11
type ReviewShopHandlerFunc ¶ added in v0.0.5
type ReviewShopHandlerFunc func(ctx context.Context, r ReviewShopRequest) ReviewShopResponse
func (ReviewShopHandlerFunc) ServeHTTP ¶ added in v0.0.5
func (f ReviewShopHandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request)
type ReviewShopParams ¶ added in v0.0.5
type ReviewShopParams struct { Query struct { Page *int32 PageSize int32 Tag []string Filter []int32 } Path struct { Shop int32 } Headers struct { RequestID *string UserID string } Body NewPet }
func (ReviewShopParams) HTTP ¶ added in v0.0.5
func (r ReviewShopParams) HTTP() *http.Request
func (ReviewShopParams) Parse ¶ added in v0.0.5
func (r ReviewShopParams) Parse() (ReviewShopParams, error)
type ReviewShopRequest ¶ added in v0.0.5
type ReviewShopRequest interface { HTTP() *http.Request Parse() (ReviewShopParams, error) }
func ReviewShopHTTPRequest ¶ added in v0.0.5
func ReviewShopHTTPRequest(r *http.Request) ReviewShopRequest
type ReviewShopResponse ¶ added in v0.0.5
type ReviewShopResponse interface { Write(w http.ResponseWriter) // contains filtered or unexported methods }
func NewReviewShopResponse200JSON ¶ added in v0.0.5
func NewReviewShopResponse200JSON(body Pet, xNext string) ReviewShopResponse
func NewReviewShopResponseDefaultJSON ¶ added in v0.0.5
func NewReviewShopResponseDefaultJSON(code int, body Error) ReviewShopResponse
type ReviewShopResponse200JSON ¶ added in v0.0.5
func (ReviewShopResponse200JSON) Write ¶ added in v0.0.5
func (r ReviewShopResponse200JSON) Write(w http.ResponseWriter)
type ReviewShopResponseDefaultJSON ¶ added in v0.0.5
func (ReviewShopResponseDefaultJSON) Write ¶ added in v0.0.5
func (r ReviewShopResponseDefaultJSON) Write(w http.ResponseWriter)
Click to show internal directories.
Click to hide internal directories.