Documentation ¶
Index ¶
- Constants
- Variables
- func SchemaPath(r *http.Request) (string, bool)
- func SpecFileHandler() http.Handler
- type API
- type Client
- type ErrParseParam
- type HTTPClient
- type HTTPClientFunc
- type Maybe
- type PostLoginHandlerFunc
- type PostLoginParams
- type PostLoginRequest
- type PostLoginResponse
- type PostLoginResponse200
- type PostLoginResponse401
- type PostShopsHandlerFunc
- type PostShopsParams
- type PostShopsRequest
- type PostShopsResponse
- type PostShopsResponse200
- type PostShopsResponse401
- type SecurityBearerAuthMiddleware
Constants ¶
View Source
const SpecFile string = `` /* 305-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 }
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 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 NewPostLoginResponse200 ¶
func NewPostLoginResponse200() PostLoginResponse
func NewPostLoginResponse401 ¶
func NewPostLoginResponse401() PostLoginResponse
type PostLoginResponse200 ¶
type PostLoginResponse200 struct{}
func (PostLoginResponse200) Write ¶
func (r PostLoginResponse200) Write(w http.ResponseWriter)
type PostLoginResponse401 ¶
type PostLoginResponse401 struct{}
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 struct { // Authorization - JWT Authorization string } }
func (PostShopsParams) HTTP ¶
func (r PostShopsParams) HTTP() *http.Request
func (PostShopsParams) Parse ¶
func (r PostShopsParams) Parse() (PostShopsParams, error)
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 NewPostShopsResponse200 ¶
func NewPostShopsResponse200() PostShopsResponse
func NewPostShopsResponse401 ¶
func NewPostShopsResponse401() PostShopsResponse
type PostShopsResponse200 ¶
type PostShopsResponse200 struct{}
func (PostShopsResponse200) Write ¶
func (r PostShopsResponse200) Write(w http.ResponseWriter)
type PostShopsResponse401 ¶
type PostShopsResponse401 struct{}
func (PostShopsResponse401) Write ¶
func (r PostShopsResponse401) Write(w http.ResponseWriter)
type SecurityBearerAuthMiddleware ¶
type SecurityBearerAuthMiddleware func(w http.ResponseWriter, r *http.Request, token string, next http.Handler)
func (SecurityBearerAuthMiddleware) Middleware ¶
func (m SecurityBearerAuthMiddleware) Middleware(next http.Handler) http.Handler
Click to show internal directories.
Click to hide internal directories.