Documentation
¶
Index ¶
- Constants
- Variables
- func SchemaPath(r *http.Request) (string, bool)
- func SpecFileHandler() http.Handler
- type API
- type Client
- type CreatePetJSON
- type ErrParseParam
- type HTTPClient
- type HTTPClientFunc
- type Maybe
- type Nullable
- type Pet
- type Pets
- type PostPetsHandlerFunc
- type PostPetsParams
- type PostPetsRequest
- type PostPetsResponse
- type PostPetsResponse200JSON
Constants ¶
View Source
const SpecFile string = `` /* 945-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 CreatePetJSON ¶
type CreatePetJSON struct { Name string Payload json.RawMessage }
type ErrParseParam ¶
func (ErrParseParam) Error ¶
func (e ErrParseParam) Error() string
func (ErrParseParam) Unwrap ¶
func (e ErrParseParam) Unwrap() error
type HTTPClientFunc ¶
type Pet ¶
type Pet struct { ID int64 Name string Payload json.RawMessage }
func (Pet) MarshalJSON ¶
func (*Pet) UnmarshalJSON ¶
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 CreatePetJSON
}
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
}
func NewPostPetsResponse200JSON ¶
func NewPostPetsResponse200JSON(body Pets) PostPetsResponse
type PostPetsResponse200JSON ¶
type PostPetsResponse200JSON struct {
Body Pets
}
PostPetsResponse200JSON - Pets response
func (PostPetsResponse200JSON) Write ¶
func (r PostPetsResponse200JSON) Write(w http.ResponseWriter)
Click to show internal directories.
Click to hide internal directories.