Documentation ¶
Index ¶
- Constants
- Variables
- func SchemaPath(r *http.Request) (string, bool)
- func SpecFileHandler() http.Handler
- type API
- type Client
- type ErrParseParam
- type GetReviewsHandlerFunc
- type GetReviewsParams
- type GetReviewsRequest
- type GetReviewsResponse
- type GetReviewsResponseDefault
- type HTTPClient
- type HTTPClientFunc
Constants ¶
View Source
const SpecFile string = `` /* 2881-byte string literal not displayed */
Variables ¶
Functions ¶
func SpecFileHandler ¶
Types ¶
type API ¶
type Client ¶
type Client struct { BaseURL string HTTPClient HTTPClient }
func NewClient ¶
func NewClient(baseURL string, httpClient HTTPClient) *Client
func (*Client) GetReviews ¶
func (c *Client) GetReviews(ctx context.Context, request GetReviewsParams) (GetReviewsResponse, error)
GetReviews - GET /shops/{shop}/reviews
type ErrParseParam ¶
func (ErrParseParam) Error ¶
func (e ErrParseParam) Error() string
func (ErrParseParam) Unwrap ¶
func (e ErrParseParam) Unwrap() error
type GetReviewsHandlerFunc ¶
type GetReviewsHandlerFunc func(ctx context.Context, r GetReviewsRequest) GetReviewsResponse
func (GetReviewsHandlerFunc) ServeHTTP ¶
func (f GetReviewsHandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request)
type GetReviewsParams ¶
type GetReviewsParams struct { Query struct { IntReq int Int *int Int32Req int32 Int32 *int32 Int64Req int64 Int64 *int64 Float32Req float32 Float32 *float32 Float64Req float64 Float64 *float64 StringReq string String *string Tag []string Filter []int32 } Path struct { Shop int32 } Headers struct { RequestID *string UserID string } }
func (GetReviewsParams) HTTP ¶
func (r GetReviewsParams) HTTP() *http.Request
func (GetReviewsParams) Parse ¶
func (r GetReviewsParams) Parse() (GetReviewsParams, error)
type GetReviewsRequest ¶
type GetReviewsRequest interface { HTTP() *http.Request Parse() (GetReviewsParams, error) }
func GetReviewsHTTPRequest ¶
func GetReviewsHTTPRequest(r *http.Request) GetReviewsRequest
type GetReviewsResponse ¶
type GetReviewsResponse interface { Write(w http.ResponseWriter) // contains filtered or unexported methods }
func NewGetReviewsResponseDefault ¶
func NewGetReviewsResponseDefault(code int) GetReviewsResponse
type GetReviewsResponseDefault ¶
type GetReviewsResponseDefault struct {
Code int
}
func (GetReviewsResponseDefault) Write ¶
func (r GetReviewsResponseDefault) Write(w http.ResponseWriter)
Click to show internal directories.
Click to hide internal directories.