Documentation
¶
Index ¶
- Constants
- Variables
- func SchemaPath(r *http.Request) (string, bool)
- func SpecFileHandler() http.Handler
- type API
- type Client
- type ErrParseParam
- type GetPetsHandlerFunc
- type GetPetsParams
- type GetPetsRequest
- type GetPetsResponse
- type GetPetsResponse200JSON
- type GetPetsResponse200JSONBody
- type HTTPClient
- type HTTPClientFunc
- type Maybe
- type Nullable
Constants ¶
View Source
const SpecFile string = `` /* 616-byte string literal not displayed */
Variables ¶
Functions ¶
func SpecFileHandler ¶
Types ¶
type API ¶
type API struct {
GetPetsHandler GetPetsHandlerFunc
// not found
NotFoundHandler http.Handler
// spec file
SpecFileHandler http.Handler
Middlewares []func(h http.Handler) http.Handler
}
func (API) TestClient ¶
type Client ¶
type Client struct {
BaseURL string
HTTPClient HTTPClient
}
func NewClient ¶
func NewClient(baseURL string, httpClient HTTPClient) *Client
func (*Client) GetPets ¶
func (c *Client) GetPets(ctx context.Context, request GetPetsParams) (GetPetsResponse, error)
GetPets GET /pets
type ErrParseParam ¶
func (ErrParseParam) Error ¶
func (e ErrParseParam) Error() string
func (ErrParseParam) Unwrap ¶
func (e ErrParseParam) Unwrap() error
type GetPetsHandlerFunc ¶
type GetPetsHandlerFunc func(ctx context.Context, r GetPetsRequest) GetPetsResponse
func (GetPetsHandlerFunc) ServeHTTP ¶
func (f GetPetsHandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request)
type GetPetsParams ¶
type GetPetsParams struct {
}
func (GetPetsParams) HTTP ¶
func (r GetPetsParams) HTTP() *http.Request
func (GetPetsParams) Parse ¶
func (r GetPetsParams) Parse() GetPetsParams
type GetPetsRequest ¶
type GetPetsRequest interface {
HTTP() *http.Request
Parse() GetPetsParams
}
func GetPetsHTTPRequest ¶
func GetPetsHTTPRequest(r *http.Request) GetPetsRequest
type GetPetsResponse ¶
type GetPetsResponse interface {
// contains filtered or unexported methods
}
func NewGetPetsResponse200JSON ¶
func NewGetPetsResponse200JSON(body GetPetsResponse200JSONBody) GetPetsResponse
type GetPetsResponse200JSON ¶
type GetPetsResponse200JSON struct {
Body GetPetsResponse200JSONBody
}
GetPetsResponse200JSON - OK
func (GetPetsResponse200JSON) Write ¶
func (r GetPetsResponse200JSON) Write(w http.ResponseWriter)
type GetPetsResponse200JSONBody ¶
func (GetPetsResponse200JSONBody) MarshalJSON ¶
func (c GetPetsResponse200JSONBody) MarshalJSON() ([]byte, error)
func (*GetPetsResponse200JSONBody) UnmarshalJSON ¶
func (c *GetPetsResponse200JSONBody) UnmarshalJSON(bs []byte) error
type HTTPClientFunc ¶
Click to show internal directories.
Click to hide internal directories.