Documentation ¶
Index ¶
- Constants
- Variables
- func SchemaPath(r *http.Request) (string, bool)
- func SpecFileHandler() http.Handler
- type API
- type Client
- type ErrParseParam
- type GetPetHandlerFunc
- type GetPetParams
- type GetPetRequest
- type GetPetResponse
- type GetPetResponse200JSON
- type HTTPClient
- type HTTPClientFunc
- type Maybe
- type Nullable
- type Pet
Constants ¶
View Source
const SpecFile string = `` /* 484-byte string literal not displayed */
Variables ¶
Functions ¶
func SpecFileHandler ¶
Types ¶
type API ¶
type API struct { GetPetHandler GetPetHandlerFunc // 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) GetPet ¶
func (c *Client) GetPet(ctx context.Context, request GetPetParams) (GetPetResponse, error)
GetPet GET /pet
type ErrParseParam ¶
func (ErrParseParam) Error ¶
func (e ErrParseParam) Error() string
func (ErrParseParam) Unwrap ¶
func (e ErrParseParam) Unwrap() error
type GetPetHandlerFunc ¶
type GetPetHandlerFunc func(ctx context.Context, r GetPetRequest) GetPetResponse
func (GetPetHandlerFunc) ServeHTTP ¶
func (f GetPetHandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request)
type GetPetParams ¶
type GetPetParams struct { }
func (GetPetParams) HTTP ¶
func (r GetPetParams) HTTP() *http.Request
func (GetPetParams) Parse ¶
func (r GetPetParams) Parse() GetPetParams
type GetPetRequest ¶
type GetPetRequest interface { HTTP() *http.Request Parse() GetPetParams }
func GetPetHTTPRequest ¶
func GetPetHTTPRequest(r *http.Request) GetPetRequest
type GetPetResponse ¶
type GetPetResponse interface {
// contains filtered or unexported methods
}
func NewGetPetResponse200JSON ¶
func NewGetPetResponse200JSON(body Pet) GetPetResponse
type GetPetResponse200JSON ¶
type GetPetResponse200JSON struct {
Body Pet
}
func (GetPetResponse200JSON) Write ¶
func (r GetPetResponse200JSON) Write(w http.ResponseWriter)
type HTTPClientFunc ¶
type Nullable ¶
func (Nullable[T]) MarshalJSON ¶ added in v0.1.28
func (*Nullable[T]) UnmarshalJSON ¶ added in v0.1.28
Click to show internal directories.
Click to hide internal directories.