Documentation
¶
Index ¶
Constants ¶
View Source
const SpecFile string = `paths:
/pets:
post:
responses:
'200': {}
`
Variables ¶
Functions ¶
func SpecFileHandler ¶
Types ¶
type API ¶
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) PostPets ¶ added in v0.0.2
func (c *Client) PostPets(ctx context.Context, request PostPetsRequest) (PostPetsResponse, error)
PostPets - POST /pets
type ErrParseParam ¶
func (ErrParseParam) Error ¶
func (e ErrParseParam) Error() string
func (ErrParseParam) Unwrap ¶
func (e ErrParseParam) Unwrap() error
type HTTPClient ¶ added in v0.0.2
type PostPetsHandlerFunc ¶
type PostPetsHandlerFunc func(r PostPetsRequestParser) PostPetsResponse
func (PostPetsHandlerFunc) ServeHTTP ¶
func (f PostPetsHandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request)
type PostPetsRequest ¶
func (PostPetsRequest) Parse ¶ added in v0.0.2
func (r PostPetsRequest) Parse() PostPetsRequest
type PostPetsRequestParser ¶ added in v0.0.2
type PostPetsRequestParser interface {
Parse() PostPetsRequest
}
func PostPetsHTTPRequest ¶ added in v0.0.2
func PostPetsHTTPRequest(r *http.Request) PostPetsRequestParser
type PostPetsResponse ¶ added in v0.0.2
type PostPetsResponse interface { Write(w http.ResponseWriter) // contains filtered or unexported methods }
func NewPostPetsResponse200 ¶ added in v0.0.2
func NewPostPetsResponse200() PostPetsResponse
type PostPetsResponse200 ¶
type PostPetsResponse200 struct{}
func (PostPetsResponse200) Write ¶ added in v0.0.2
func (r PostPetsResponse200) Write(w http.ResponseWriter)
Click to show internal directories.
Click to hide internal directories.