Documentation ¶
Index ¶
- Constants
- Variables
- func SchemaPath(r *http.Request) (string, bool)
- func SpecFileHandler() http.Handler
- type API
- type Client
- type ErrParseParam
- type HTTPClient
- type HTTPClientFunc
- type Maybe
- type NewPet
- type Nullable
- type Pet
- type PetResponse
- type PostPetsHandlerFunc
- type PostPetsParams
- type PostPetsRequest
- type PostPetsResponse
Constants ¶
View Source
const SpecFile string = `` /* 1005-byte string literal not displayed */
Variables ¶
Functions ¶
func SpecFileHandler ¶
Types ¶
type API ¶
type API struct { PostPetsHandler PostPetsHandlerFunc // 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) PostPets ¶
func (c *Client) PostPets(ctx context.Context, request PostPetsParams) (PostPetsResponse, error)
PostPets POST /pets
type ErrParseParam ¶
func (ErrParseParam) Error ¶
func (e ErrParseParam) Error() string
func (ErrParseParam) Unwrap ¶
func (e ErrParseParam) Unwrap() error
type HTTPClientFunc ¶
type PetResponse ¶
type PetResponse struct {
Body Pet
}
PetResponse - Pet output response
func NewPetResponse ¶
func NewPetResponse(body Pet) PetResponse
func (PetResponse) Write ¶
func (r PetResponse) Write(w http.ResponseWriter, code int)
type PostPetsHandlerFunc ¶
type PostPetsHandlerFunc func(ctx context.Context, r PostPetsRequest) PostPetsResponse
func (PostPetsHandlerFunc) ServeHTTP ¶
func (f PostPetsHandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request)
type PostPetsParams ¶
type PostPetsParams struct {
Body NewPet
}
func (PostPetsParams) HTTP ¶
func (r PostPetsParams) HTTP() *http.Request
func (PostPetsParams) Parse ¶
func (r PostPetsParams) Parse() (PostPetsParams, error)
type PostPetsRequest ¶
type PostPetsRequest interface { HTTP() *http.Request Parse() (PostPetsParams, error) }
func PostPetsHTTPRequest ¶
func PostPetsHTTPRequest(r *http.Request) PostPetsRequest
type PostPetsResponse ¶
type PostPetsResponse interface {
// contains filtered or unexported methods
}
Click to show internal directories.
Click to hide internal directories.