Documentation ¶
Index ¶
- Constants
- Variables
- func SchemaPath(r *http.Request) (string, bool)
- func SpecFileHandler() http.Handler
- type API
- type Client
- type ErrParseParam
- type Error
- type ErrorResponse
- type GetPetHandlerFunc
- type GetPetParams
- type GetPetRequest
- type GetPetResponse
- type GetV2PetHandlerFunc
- type GetV2PetParams
- type GetV2PetRequest
- type GetV2PetResponse
- type GetV3PetHandlerFunc
- type GetV3PetParams
- type GetV3PetRequest
- type GetV3PetResponse
- type HTTPClient
- type HTTPClientFunc
- type Maybe
- type Nullable
- type Pet
- type Pet2Response
- type Pet3Response
- type PetResponse
Constants ¶
View Source
const SpecFile string = `` /* 1117-byte string literal not displayed */
Variables ¶
Functions ¶
func SpecFileHandler ¶
Types ¶
type API ¶
type API struct { GetPetHandler GetPetHandlerFunc GetV2PetHandler GetV2PetHandlerFunc GetV3PetHandler GetV3PetHandlerFunc // 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
func (*Client) GetV2Pet ¶
func (c *Client) GetV2Pet(ctx context.Context, request GetV2PetParams) (GetV2PetResponse, error)
GetV2Pet GET /v2/pet
func (*Client) GetV3Pet ¶
func (c *Client) GetV3Pet(ctx context.Context, request GetV3PetParams) (GetV3PetResponse, error)
GetV3Pet GET /v3/pet
type ErrParseParam ¶
func (ErrParseParam) Error ¶
func (e ErrParseParam) Error() string
func (ErrParseParam) Unwrap ¶
func (e ErrParseParam) Unwrap() error
type ErrorResponse ¶
ErrorResponse - Error output response
func NewErrorResponse ¶
func NewErrorResponse(code int, body Error) ErrorResponse
func (ErrorResponse) Write ¶
func (r ErrorResponse) Write(w http.ResponseWriter)
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
}
type GetV2PetHandlerFunc ¶
type GetV2PetHandlerFunc func(ctx context.Context, r GetV2PetRequest) GetV2PetResponse
func (GetV2PetHandlerFunc) ServeHTTP ¶
func (f GetV2PetHandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request)
type GetV2PetParams ¶
type GetV2PetParams struct { }
func (GetV2PetParams) HTTP ¶
func (r GetV2PetParams) HTTP() *http.Request
func (GetV2PetParams) Parse ¶
func (r GetV2PetParams) Parse() GetV2PetParams
type GetV2PetRequest ¶
type GetV2PetRequest interface { HTTP() *http.Request Parse() GetV2PetParams }
func GetV2PetHTTPRequest ¶
func GetV2PetHTTPRequest(r *http.Request) GetV2PetRequest
type GetV2PetResponse ¶
type GetV2PetResponse interface {
// contains filtered or unexported methods
}
type GetV3PetHandlerFunc ¶
type GetV3PetHandlerFunc func(ctx context.Context, r GetV3PetRequest) GetV3PetResponse
func (GetV3PetHandlerFunc) ServeHTTP ¶
func (f GetV3PetHandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request)
type GetV3PetParams ¶
type GetV3PetParams struct { }
func (GetV3PetParams) HTTP ¶
func (r GetV3PetParams) HTTP() *http.Request
func (GetV3PetParams) Parse ¶
func (r GetV3PetParams) Parse() GetV3PetParams
type GetV3PetRequest ¶
type GetV3PetRequest interface { HTTP() *http.Request Parse() GetV3PetParams }
func GetV3PetHTTPRequest ¶
func GetV3PetHTTPRequest(r *http.Request) GetV3PetRequest
type GetV3PetResponse ¶
type GetV3PetResponse interface {
// contains filtered or unexported methods
}
type HTTPClientFunc ¶
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 Pet2Response ¶
type Pet2Response = PetResponse
Pet2Response - Pet output response
func NewPet2Response ¶
func NewPet2Response(body Pet) Pet2Response
NewPet2Response - Pet output response
type Pet3Response ¶
type Pet3Response = Pet2Response
Pet3Response - Pet output response
func NewPet3Response ¶
func NewPet3Response(body Pet) Pet3Response
NewPet3Response - Pet output response
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)
Click to show internal directories.
Click to hide internal directories.