Documentation ¶
Index ¶
- Constants
- Variables
- func SchemaPath(r *http.Request) (string, bool)
- func SpecFileHandler() http.Handler
- type API
- type Client
- type ErrParseParam
- type Float32
- type Float32Required
- type Float64
- type Float64Required
- type GetReviewsHandlerFunc
- type GetReviewsParams
- type GetReviewsRequest
- type GetReviewsResponse
- type GetReviewsResponseDefault
- type HTTPClient
- type HTTPClientFunc
- type Int
- type Int32
- type Int32Required
- type Int64
- type Int64Required
- type IntRequired
- type ShopPathRequired
- type String
- type StringRequired
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 Float32Required ¶ added in v0.1.2
type Float32Required float32
func (*Float32Required) ParseQuery ¶ added in v0.1.2
func (q *Float32Required) ParseQuery(vs []string) error
func (Float32Required) String ¶ added in v0.1.2
func (q Float32Required) String() string
type Float64Required ¶ added in v0.1.2
type Float64Required float64
func (*Float64Required) ParseQuery ¶ added in v0.1.2
func (q *Float64Required) ParseQuery(vs []string) error
func (Float64Required) String ¶ added in v0.1.2
func (q Float64Required) String() string
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 IntRequired Int *Int Int32Req Int32Required Int32 *Int32 Int64Req Int64Required Int64 *Int64 Float32Req Float32Required Float32 *Float32 Float64Req Float64Required Float64 *Float64 StringReq StringRequired String *String Tag []string Filter []int32 } Path struct { Shop ShopPathRequired } 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)
type HTTPClientFunc ¶ added in v0.0.11
type Int32Required ¶ added in v0.1.2
type Int32Required int32
func (*Int32Required) ParseQuery ¶ added in v0.1.2
func (q *Int32Required) ParseQuery(vs []string) error
func (Int32Required) String ¶ added in v0.1.2
func (q Int32Required) String() string
type Int64Required ¶ added in v0.1.2
type Int64Required int64
func (*Int64Required) ParseQuery ¶ added in v0.1.2
func (q *Int64Required) ParseQuery(vs []string) error
func (Int64Required) String ¶ added in v0.1.2
func (q Int64Required) String() string
type IntRequired ¶ added in v0.1.2
type IntRequired int
func (*IntRequired) ParseQuery ¶ added in v0.1.2
func (q *IntRequired) ParseQuery(vs []string) error
func (IntRequired) String ¶ added in v0.1.2
func (q IntRequired) String() string
type ShopPathRequired ¶ added in v0.1.2
type ShopPathRequired int32
func (*ShopPathRequired) Parse ¶ added in v0.1.2
func (q *ShopPathRequired) Parse(s string) error
func (ShopPathRequired) String ¶ added in v0.1.2
func (q ShopPathRequired) String() string
type StringRequired ¶ added in v0.1.2
type StringRequired string
func (*StringRequired) ParseQuery ¶ added in v0.1.2
func (q *StringRequired) ParseQuery(vs []string) error
func (StringRequired) String ¶ added in v0.1.2
func (q StringRequired) String() string
Click to show internal directories.
Click to hide internal directories.