Documentation ¶
Index ¶
- Constants
- Variables
- func SchemaPath(r *http.Request) (string, bool)
- func SpecFileHandler() http.Handler
- type API
- type Client
- func (c *Client) GetShops(ctx context.Context, request GetShopsParams) (GetShopsResponse, error)
- func (c *Client) GetShopsShop(ctx context.Context, request GetShopsShopParams) (GetShopsShopResponse, error)
- func (c *Client) PostShopsShop(ctx context.Context, request PostShopsShopParams) (PostShopsShopResponse, error)
- type CorsHandlerFunc
- type ErrParseParam
- type GetShopsHandlerFunc
- type GetShopsParams
- type GetShopsParamsHeaders
- type GetShopsParamsQuery
- type GetShopsRequest
- type GetShopsResponse
- type GetShopsResponse200
- type GetShopsResponseDefault
- type GetShopsShopHandlerFunc
- type GetShopsShopParams
- type GetShopsShopParamsHeaders
- type GetShopsShopParamsPath
- type GetShopsShopParamsQuery
- type GetShopsShopRequest
- type GetShopsShopResponse
- type GetShopsShopResponse200
- type GetShopsShopResponseDefault
- type HTTPClient
- type HTTPClientFunc
- type Maybe
- type Nullable
- type PostShopsShopHandlerFunc
- type PostShopsShopParams
- type PostShopsShopParamsHeaders
- type PostShopsShopParamsPath
- type PostShopsShopParamsQuery
- type PostShopsShopRequest
- type PostShopsShopResponse
- type PostShopsShopResponse200
- type PostShopsShopResponseDefault
Constants ¶
View Source
const SpecFile string = `` /* 1101-byte string literal not displayed */
Variables ¶
Functions ¶
func SpecFileHandler ¶
Types ¶
type API ¶
type API struct { GetShopsHandler GetShopsHandlerFunc GetShopsShopHandler GetShopsShopHandlerFunc PostShopsShopHandler PostShopsShopHandlerFunc // not found NotFoundHandler http.Handler // spec file SpecFileHandler http.Handler CORSHandler CorsHandlerFunc 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) GetShops ¶
func (c *Client) GetShops(ctx context.Context, request GetShopsParams) (GetShopsResponse, error)
GetShops GET /shops
func (*Client) GetShopsShop ¶
func (c *Client) GetShopsShop(ctx context.Context, request GetShopsShopParams) (GetShopsShopResponse, error)
GetShopsShop GET /shops/{shop}
func (*Client) PostShopsShop ¶
func (c *Client) PostShopsShop(ctx context.Context, request PostShopsShopParams) (PostShopsShopResponse, error)
PostShopsShop POST /shops/{shop}
type CorsHandlerFunc ¶
type ErrParseParam ¶
func (ErrParseParam) Error ¶
func (e ErrParseParam) Error() string
func (ErrParseParam) Unwrap ¶
func (e ErrParseParam) Unwrap() error
type GetShopsHandlerFunc ¶
type GetShopsHandlerFunc func(ctx context.Context, r GetShopsRequest) GetShopsResponse
func (GetShopsHandlerFunc) ServeHTTP ¶
func (f GetShopsHandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request)
type GetShopsParams ¶
type GetShopsParams struct { Query GetShopsParamsQuery Headers GetShopsParamsHeaders }
func (GetShopsParams) HTTP ¶
func (r GetShopsParams) HTTP() *http.Request
func (GetShopsParams) Parse ¶
func (r GetShopsParams) Parse() (GetShopsParams, error)
type GetShopsParamsHeaders ¶ added in v0.1.18
type GetShopsParamsQuery ¶ added in v0.1.18
type GetShopsRequest ¶
type GetShopsRequest interface { HTTP() *http.Request Parse() (GetShopsParams, error) }
func GetShopsHTTPRequest ¶
func GetShopsHTTPRequest(r *http.Request) GetShopsRequest
type GetShopsResponse ¶
type GetShopsResponse interface {
// contains filtered or unexported methods
}
func NewGetShopsResponse200 ¶
func NewGetShopsResponse200() GetShopsResponse
func NewGetShopsResponseDefault ¶
func NewGetShopsResponseDefault(code int) GetShopsResponse
type GetShopsResponse200 ¶
type GetShopsResponse200 struct{}
func (GetShopsResponse200) Write ¶
func (r GetShopsResponse200) Write(w http.ResponseWriter)
type GetShopsResponseDefault ¶
type GetShopsResponseDefault struct {
Code int
}
func (GetShopsResponseDefault) Write ¶
func (r GetShopsResponseDefault) Write(w http.ResponseWriter)
type GetShopsShopHandlerFunc ¶
type GetShopsShopHandlerFunc func(ctx context.Context, r GetShopsShopRequest) GetShopsShopResponse
func (GetShopsShopHandlerFunc) ServeHTTP ¶
func (f GetShopsShopHandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request)
type GetShopsShopParams ¶
type GetShopsShopParams struct { Query GetShopsShopParamsQuery Path GetShopsShopParamsPath Headers GetShopsShopParamsHeaders }
func (GetShopsShopParams) HTTP ¶
func (r GetShopsShopParams) HTTP() *http.Request
func (GetShopsShopParams) Parse ¶
func (r GetShopsShopParams) Parse() (GetShopsShopParams, error)
type GetShopsShopParamsHeaders ¶ added in v0.1.18
type GetShopsShopParamsPath ¶ added in v0.1.18
type GetShopsShopParamsPath struct {
Shop string
}
type GetShopsShopParamsQuery ¶ added in v0.1.18
type GetShopsShopRequest ¶
type GetShopsShopRequest interface { HTTP() *http.Request Parse() (GetShopsShopParams, error) }
func GetShopsShopHTTPRequest ¶
func GetShopsShopHTTPRequest(r *http.Request) GetShopsShopRequest
type GetShopsShopResponse ¶
type GetShopsShopResponse interface {
// contains filtered or unexported methods
}
func NewGetShopsShopResponse200 ¶
func NewGetShopsShopResponse200() GetShopsShopResponse
func NewGetShopsShopResponseDefault ¶
func NewGetShopsShopResponseDefault(code int) GetShopsShopResponse
type GetShopsShopResponse200 ¶
type GetShopsShopResponse200 struct{}
func (GetShopsShopResponse200) Write ¶
func (r GetShopsShopResponse200) Write(w http.ResponseWriter)
type GetShopsShopResponseDefault ¶
type GetShopsShopResponseDefault struct {
Code int
}
func (GetShopsShopResponseDefault) Write ¶
func (r GetShopsShopResponseDefault) Write(w http.ResponseWriter)
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 PostShopsShopHandlerFunc ¶
type PostShopsShopHandlerFunc func(ctx context.Context, r PostShopsShopRequest) PostShopsShopResponse
func (PostShopsShopHandlerFunc) ServeHTTP ¶
func (f PostShopsShopHandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request)
type PostShopsShopParams ¶
type PostShopsShopParams struct { Query PostShopsShopParamsQuery Path PostShopsShopParamsPath Headers PostShopsShopParamsHeaders }
func (PostShopsShopParams) HTTP ¶
func (r PostShopsShopParams) HTTP() *http.Request
func (PostShopsShopParams) Parse ¶
func (r PostShopsShopParams) Parse() (PostShopsShopParams, error)
type PostShopsShopParamsHeaders ¶ added in v0.1.18
type PostShopsShopParamsPath ¶ added in v0.1.18
type PostShopsShopParamsPath struct {
Shop string
}
type PostShopsShopParamsQuery ¶ added in v0.1.18
type PostShopsShopRequest ¶
type PostShopsShopRequest interface { HTTP() *http.Request Parse() (PostShopsShopParams, error) }
func PostShopsShopHTTPRequest ¶
func PostShopsShopHTTPRequest(r *http.Request) PostShopsShopRequest
type PostShopsShopResponse ¶
type PostShopsShopResponse interface {
// contains filtered or unexported methods
}
func NewPostShopsShopResponse200 ¶
func NewPostShopsShopResponse200() PostShopsShopResponse
func NewPostShopsShopResponseDefault ¶
func NewPostShopsShopResponseDefault(code int) PostShopsShopResponse
type PostShopsShopResponse200 ¶
type PostShopsShopResponse200 struct{}
func (PostShopsShopResponse200) Write ¶
func (r PostShopsShopResponse200) Write(w http.ResponseWriter)
type PostShopsShopResponseDefault ¶
type PostShopsShopResponseDefault struct {
Code int
}
func (PostShopsShopResponseDefault) Write ¶
func (r PostShopsShopResponseDefault) Write(w http.ResponseWriter)
Click to show internal directories.
Click to hide internal directories.