Documentation
¶
Index ¶
- Constants
- Variables
- func SchemaPath(r *http.Request) (string, bool)
- func SpecFileHandler() http.Handler
- type API
- type ErrParseParam
- type GetRTHandlerFunc
- type GetRTRequest
- type GetRTRequester
- type GetRTResponder
- type GetShopsActivateHandlerFunc
- type GetShopsActivateRequest
- type GetShopsActivateRequester
- type GetShopsActivateResponder
- type GetShopsHandlerFunc
- type GetShopsRTHandlerFunc
- type GetShopsRTRequest
- type GetShopsRTRequester
- type GetShopsRTResponder
- type GetShopsRequest
- type GetShopsRequester
- type GetShopsResponder
- type GetShopsShopHandlerFunc
- type GetShopsShopPetsHandlerFunc
- type GetShopsShopPetsRequest
- type GetShopsShopPetsRequester
- type GetShopsShopPetsResponder
- type GetShopsShopRTHandlerFunc
- type GetShopsShopRTRequest
- type GetShopsShopRTRequester
- type GetShopsShopRTResponder
- type GetShopsShopRequest
- type GetShopsShopRequester
- type GetShopsShopResponder
Constants ¶
View Source
const SpecFile string = `servers:
# - url: "https://demo.example.com:8443/api/v1"
- url: https://{username}.example.com:{port}/{basePath}
description: The production API server
variables:
username:
default: demo
port:
default: '8443'
basePath:
default: api/v1
paths:
# some ` + "`" + `comment` + "`" + `
/: {get: {responses: {default: {}}}}
/shops: {get: {responses: {default: {}}}}
/shops/: {get: {responses: {default: {}}}}
/shops/{shop}: {get: {parameters: [{in: path, name: shop, required: true, schema: {type: string}}], responses: {default: {}}}}
/shops/{shop}/: {get: {parameters: [{in: path, name: shop, required: true, schema: {type: string}}], responses: {default: {}}}}
/shops/{shop}/pets: {get: {parameters: [{in: path, name: shop, required: true, schema: {type: string}}], responses: {default: {}}}}
/shops/activate: {get: {responses: {default: {}}}}
`
Variables ¶
Functions ¶
func SpecFileHandler ¶
Types ¶
type API ¶
type API struct {
GetRTHandler GetRTHandlerFunc
GetShopsHandler GetShopsHandlerFunc
GetShopsRTHandler GetShopsRTHandlerFunc
GetShopsActivateHandler GetShopsActivateHandlerFunc
GetShopsShopHandler GetShopsShopHandlerFunc
GetShopsShopRTHandler GetShopsShopRTHandlerFunc
GetShopsShopPetsHandler GetShopsShopPetsHandlerFunc
// not found
NotFoundHandler http.Handler
// spec file
SpecFileHandler http.Handler
Middlewares []func(h http.Handler) http.Handler
}
type ErrParseParam ¶
func (ErrParseParam) Error ¶
func (e ErrParseParam) Error() string
func (ErrParseParam) Unwrap ¶
func (e ErrParseParam) Unwrap() error
type GetRTHandlerFunc ¶
type GetRTHandlerFunc func(r GetRTRequester) GetRTResponder
func (GetRTHandlerFunc) ServeHTTP ¶
func (f GetRTHandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request)
type GetRTRequest ¶
type GetRTRequester ¶
type GetRTRequester interface {
Parse() GetRTRequest
}
type GetRTResponder ¶
type GetRTResponder interface {
// contains filtered or unexported methods
}
func GetRTResponseDefault ¶
func GetRTResponseDefault(code int) GetRTResponder
type GetShopsActivateHandlerFunc ¶
type GetShopsActivateHandlerFunc func(r GetShopsActivateRequester) GetShopsActivateResponder
func (GetShopsActivateHandlerFunc) ServeHTTP ¶
func (f GetShopsActivateHandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request)
type GetShopsActivateRequest ¶
type GetShopsActivateRequester ¶
type GetShopsActivateRequester interface {
Parse() GetShopsActivateRequest
}
type GetShopsActivateResponder ¶
type GetShopsActivateResponder interface {
// contains filtered or unexported methods
}
func GetShopsActivateResponseDefault ¶
func GetShopsActivateResponseDefault(code int) GetShopsActivateResponder
type GetShopsHandlerFunc ¶
type GetShopsHandlerFunc func(r GetShopsRequester) GetShopsResponder
func (GetShopsHandlerFunc) ServeHTTP ¶
func (f GetShopsHandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request)
type GetShopsRTHandlerFunc ¶
type GetShopsRTHandlerFunc func(r GetShopsRTRequester) GetShopsRTResponder
func (GetShopsRTHandlerFunc) ServeHTTP ¶
func (f GetShopsRTHandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request)
type GetShopsRTRequest ¶
type GetShopsRTRequester ¶
type GetShopsRTRequester interface {
Parse() GetShopsRTRequest
}
type GetShopsRTResponder ¶
type GetShopsRTResponder interface {
// contains filtered or unexported methods
}
func GetShopsRTResponseDefault ¶
func GetShopsRTResponseDefault(code int) GetShopsRTResponder
type GetShopsRequest ¶
type GetShopsRequester ¶
type GetShopsRequester interface {
Parse() GetShopsRequest
}
type GetShopsResponder ¶
type GetShopsResponder interface {
// contains filtered or unexported methods
}
func GetShopsResponseDefault ¶
func GetShopsResponseDefault(code int) GetShopsResponder
type GetShopsShopHandlerFunc ¶
type GetShopsShopHandlerFunc func(r GetShopsShopRequester) GetShopsShopResponder
func (GetShopsShopHandlerFunc) ServeHTTP ¶
func (f GetShopsShopHandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request)
type GetShopsShopPetsHandlerFunc ¶
type GetShopsShopPetsHandlerFunc func(r GetShopsShopPetsRequester) GetShopsShopPetsResponder
func (GetShopsShopPetsHandlerFunc) ServeHTTP ¶
func (f GetShopsShopPetsHandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request)
type GetShopsShopPetsRequest ¶
type GetShopsShopPetsRequester ¶
type GetShopsShopPetsRequester interface {
Parse() (GetShopsShopPetsRequest, error)
}
type GetShopsShopPetsResponder ¶
type GetShopsShopPetsResponder interface {
// contains filtered or unexported methods
}
func GetShopsShopPetsResponseDefault ¶
func GetShopsShopPetsResponseDefault(code int) GetShopsShopPetsResponder
type GetShopsShopRTHandlerFunc ¶
type GetShopsShopRTHandlerFunc func(r GetShopsShopRTRequester) GetShopsShopRTResponder
func (GetShopsShopRTHandlerFunc) ServeHTTP ¶
func (f GetShopsShopRTHandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request)
type GetShopsShopRTRequest ¶
type GetShopsShopRTRequester ¶
type GetShopsShopRTRequester interface {
Parse() (GetShopsShopRTRequest, error)
}
type GetShopsShopRTResponder ¶
type GetShopsShopRTResponder interface {
// contains filtered or unexported methods
}
func GetShopsShopRTResponseDefault ¶
func GetShopsShopRTResponseDefault(code int) GetShopsShopRTResponder
type GetShopsShopRequest ¶
type GetShopsShopRequester ¶
type GetShopsShopRequester interface {
Parse() (GetShopsShopRequest, error)
}
type GetShopsShopResponder ¶
type GetShopsShopResponder interface {
// contains filtered or unexported methods
}
func GetShopsShopResponseDefault ¶
func GetShopsShopResponseDefault(code int) GetShopsShopResponder
Click to show internal directories.
Click to hide internal directories.