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 GetPetsResponse200
- type HTTPClient
- type HTTPClientFunc
- type Maybe
- type Nullable
Constants ¶
View Source
const SpecFile string = `paths:
/pets:
get:
responses:
'200': {}
`
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 ¶ added in v0.1.28
type Client ¶ added in v0.0.2
type Client struct { BaseURL string HTTPClient HTTPClient }
func NewClient ¶ added in v0.0.2
func NewClient(baseURL string, httpClient HTTPClient) *Client
func (*Client) GetPets ¶ added in v0.0.2
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 ¶ added in v0.0.3
type GetPetsParams struct { }
func (GetPetsParams) HTTP ¶ added in v0.0.3
func (r GetPetsParams) HTTP() *http.Request
func (GetPetsParams) Parse ¶ added in v0.0.3
func (r GetPetsParams) Parse() GetPetsParams
type GetPetsRequest ¶
type GetPetsRequest interface { HTTP() *http.Request Parse() GetPetsParams }
func GetPetsHTTPRequest ¶ added in v0.0.2
func GetPetsHTTPRequest(r *http.Request) GetPetsRequest
type GetPetsResponse ¶ added in v0.0.2
type GetPetsResponse interface {
// contains filtered or unexported methods
}
func NewGetPetsResponse200 ¶ added in v0.0.2
func NewGetPetsResponse200() GetPetsResponse
type GetPetsResponse200 ¶
type GetPetsResponse200 struct{}
func (GetPetsResponse200) Write ¶ added in v0.0.2
func (r GetPetsResponse200) Write(w http.ResponseWriter)
type HTTPClient ¶ added in v0.0.2
type HTTPClientFunc ¶ added in v0.0.11
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
Click to show internal directories.
Click to hide internal directories.