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 NewPetJSON
- type Nullable
- type Pets2JSON
- type PostPets2HandlerFunc
- type PostPets2Params
- type PostPets2Request
- type PostPets2Response
- type PostPets2Response201
- type PostPets2ResponseDefault
- type PostPetsHandlerFunc
- type PostPetsParams
- type PostPetsRequest
- type PostPetsResponse
- type PostPetsResponse201
- type PostPetsResponseDefault
Constants ¶
View Source
const SpecFile string = `` /* 743-byte string literal not displayed */
Variables ¶
Functions ¶
func SpecFileHandler ¶
Types ¶
type API ¶
type API struct { PostPetsHandler PostPetsHandlerFunc PostPets2Handler PostPets2HandlerFunc // not found NotFoundHandler http.Handler // spec file SpecFileHandler http.Handler Middlewares []func(h http.Handler) http.Handler }
func (API) TestClient ¶ added in v0.1.28
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
func (*Client) PostPets2 ¶
func (c *Client) PostPets2(ctx context.Context, request PostPets2Params) (PostPets2Response, error)
PostPets2 POST /pets2
type ErrParseParam ¶
func (ErrParseParam) Error ¶
func (e ErrParseParam) Error() string
func (ErrParseParam) Unwrap ¶
func (e ErrParseParam) Unwrap() error
type HTTPClientFunc ¶
type NewPetJSON ¶
type NewPetJSON NewPet
type Nullable ¶ added in v0.1.25
func (Nullable[T]) MarshalJSON ¶ added in v0.1.28
func (*Nullable[T]) UnmarshalJSON ¶ added in v0.1.28
type Pets2JSON ¶
type Pets2JSON NewPetJSON
type PostPets2HandlerFunc ¶
type PostPets2HandlerFunc func(ctx context.Context, r PostPets2Request) PostPets2Response
func (PostPets2HandlerFunc) ServeHTTP ¶
func (f PostPets2HandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request)
type PostPets2Params ¶
type PostPets2Params struct {
Body Pets2JSON
}
func (PostPets2Params) HTTP ¶
func (r PostPets2Params) HTTP() *http.Request
func (PostPets2Params) Parse ¶
func (r PostPets2Params) Parse() (PostPets2Params, error)
type PostPets2Request ¶
type PostPets2Request interface { HTTP() *http.Request Parse() (PostPets2Params, error) }
func PostPets2HTTPRequest ¶
func PostPets2HTTPRequest(r *http.Request) PostPets2Request
type PostPets2Response ¶
type PostPets2Response interface {
// contains filtered or unexported methods
}
func NewPostPets2Response201 ¶
func NewPostPets2Response201() PostPets2Response
func NewPostPets2ResponseDefault ¶
func NewPostPets2ResponseDefault(code int) PostPets2Response
type PostPets2Response201 ¶
type PostPets2Response201 struct{}
func (PostPets2Response201) Write ¶
func (r PostPets2Response201) Write(w http.ResponseWriter)
type PostPets2ResponseDefault ¶
type PostPets2ResponseDefault struct {
Code int
}
func (PostPets2ResponseDefault) Write ¶
func (r PostPets2ResponseDefault) Write(w http.ResponseWriter)
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
}
func NewPostPetsResponse201 ¶
func NewPostPetsResponse201() PostPetsResponse
func NewPostPetsResponseDefault ¶
func NewPostPetsResponseDefault(code int) PostPetsResponse
type PostPetsResponse201 ¶
type PostPetsResponse201 struct{}
func (PostPetsResponse201) Write ¶
func (r PostPetsResponse201) Write(w http.ResponseWriter)
type PostPetsResponseDefault ¶
type PostPetsResponseDefault struct {
Code int
}
func (PostPetsResponseDefault) Write ¶
func (r PostPetsResponseDefault) Write(w http.ResponseWriter)
Click to show internal directories.
Click to hide internal directories.