Documentation ¶
Index ¶
- Constants
- Variables
- func SchemaPath(r *http.Request) (string, bool)
- func SpecFileHandler() http.Handler
- type API
- type AuthMiddleware
- type AuthMiddlewareFunc
- type Client
- type ErrParseParam
- type HTTPClient
- type HTTPClientFunc
- type Maybe
- type Middleware
- type MiddlewareFunc
- type Nullable
- type PostLoginHandlerFunc
- type PostLoginParams
- type PostLoginRequest
- type PostLoginResponse
- type PostLoginResponse200JSON
- type PostLoginResponse200JSONBody
- type PostLoginResponse401
- type PostShopsHandlerFunc
- type PostShopsParams
- type PostShopsParamsHeaders
- type PostShopsRequest
- type PostShopsResponse
- type PostShopsResponse200JSON
- type PostShopsResponse200JSONBody
- type PostShopsResponse401
- type SecurityAPIKeyAuthAccessTokenMiddleware
- type SecurityAPIKeyAuthPersonalAccessTokenMiddleware
- type SecurityBearerAuthMiddleware
Constants ¶
View Source
const SpecFile string = `` /* 1147-byte string literal not displayed */
Variables ¶
Functions ¶
func SpecFileHandler ¶
Types ¶
type API ¶
type API struct { PostLoginHandler PostLoginHandlerFunc PostShopsHandler PostShopsHandlerFunc // not found NotFoundHandler http.Handler // spec file SpecFileHandler http.Handler Middlewares []func(h http.Handler) http.Handler SecurityBearerAuth SecurityBearerAuthMiddleware SecurityAPIKeyAuthAccessToken SecurityAPIKeyAuthAccessTokenMiddleware SecurityAPIKeyAuthPersonalAccessToken SecurityAPIKeyAuthPersonalAccessTokenMiddleware }
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) PostLogin ¶
func (c *Client) PostLogin(ctx context.Context, request PostLoginParams) (PostLoginResponse, error)
PostLogin POST /login
func (*Client) PostShops ¶
func (c *Client) PostShops(ctx context.Context, request PostShopsParams) (PostShopsResponse, error)
PostShops POST /shops
type ErrParseParam ¶
func (ErrParseParam) Error ¶
func (e ErrParseParam) Error() string
func (ErrParseParam) Unwrap ¶
func (e ErrParseParam) Unwrap() error
type HTTPClientFunc ¶
type MiddlewareFunc ¶
func (MiddlewareFunc) Middleware ¶
func (m MiddlewareFunc) Middleware(next http.Handler) http.Handler
type Nullable ¶
func (Nullable[T]) MarshalJSON ¶ added in v0.1.28
func (*Nullable[T]) UnmarshalJSON ¶ added in v0.1.28
type PostLoginHandlerFunc ¶
type PostLoginHandlerFunc func(ctx context.Context, r PostLoginRequest) PostLoginResponse
func (PostLoginHandlerFunc) ServeHTTP ¶
func (f PostLoginHandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request)
type PostLoginParams ¶
type PostLoginParams struct { }
func (PostLoginParams) HTTP ¶
func (r PostLoginParams) HTTP() *http.Request
func (PostLoginParams) Parse ¶
func (r PostLoginParams) Parse() PostLoginParams
type PostLoginRequest ¶
type PostLoginRequest interface { HTTP() *http.Request Parse() PostLoginParams }
func PostLoginHTTPRequest ¶
func PostLoginHTTPRequest(r *http.Request) PostLoginRequest
type PostLoginResponse ¶
type PostLoginResponse interface {
// contains filtered or unexported methods
}
func NewPostLoginResponse200JSON ¶
func NewPostLoginResponse200JSON(body PostLoginResponse200JSONBody) PostLoginResponse
func NewPostLoginResponse401 ¶
func NewPostLoginResponse401() PostLoginResponse
type PostLoginResponse200JSON ¶
type PostLoginResponse200JSON struct {
Body PostLoginResponse200JSONBody
}
PostLoginResponse200JSON - OK
func (PostLoginResponse200JSON) Write ¶
func (r PostLoginResponse200JSON) Write(w http.ResponseWriter)
type PostLoginResponse200JSONBody ¶
type PostLoginResponse200JSONBody struct {
Output string `json:"output"`
}
type PostLoginResponse401 ¶
type PostLoginResponse401 struct{}
PostLoginResponse401 - Unauthorized
func (PostLoginResponse401) Write ¶
func (r PostLoginResponse401) Write(w http.ResponseWriter)
type PostShopsHandlerFunc ¶
type PostShopsHandlerFunc func(ctx context.Context, r PostShopsRequest) PostShopsResponse
func (PostShopsHandlerFunc) ServeHTTP ¶
func (f PostShopsHandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request)
type PostShopsParams ¶
type PostShopsParams struct {
Headers PostShopsParamsHeaders
}
func (PostShopsParams) HTTP ¶
func (r PostShopsParams) HTTP() *http.Request
func (PostShopsParams) Parse ¶
func (r PostShopsParams) Parse() (PostShopsParams, error)
type PostShopsParamsHeaders ¶
type PostShopsRequest ¶
type PostShopsRequest interface { HTTP() *http.Request Parse() (PostShopsParams, error) }
func PostShopsHTTPRequest ¶
func PostShopsHTTPRequest(r *http.Request) PostShopsRequest
type PostShopsResponse ¶
type PostShopsResponse interface {
// contains filtered or unexported methods
}
func NewPostShopsResponse200JSON ¶
func NewPostShopsResponse200JSON(body PostShopsResponse200JSONBody) PostShopsResponse
func NewPostShopsResponse401 ¶
func NewPostShopsResponse401() PostShopsResponse
type PostShopsResponse200JSON ¶
type PostShopsResponse200JSON struct {
Body PostShopsResponse200JSONBody
}
PostShopsResponse200JSON - OK
func (PostShopsResponse200JSON) Write ¶
func (r PostShopsResponse200JSON) Write(w http.ResponseWriter)
type PostShopsResponse200JSONBody ¶
type PostShopsResponse200JSONBody struct {
Output string `json:"output"`
}
type PostShopsResponse401 ¶
type PostShopsResponse401 struct{}
PostShopsResponse401 - Unauthorized
func (PostShopsResponse401) Write ¶
func (r PostShopsResponse401) Write(w http.ResponseWriter)
type SecurityAPIKeyAuthAccessTokenMiddleware ¶
Click to show internal directories.
Click to hide internal directories.