Documentation ¶
Index ¶
- type HttpRouterSwagger
- func (hrs *HttpRouterSwagger) AddRoute(ws *WebService, method string, path string, function httprouter.Handle, ...) *restful.RouteBuilder
- func (hrs *HttpRouterSwagger) AddService(path string, serviceDoc ServiceDoc) *WebService
- func (hrs *HttpRouterSwagger) GetSwaggerHandler() http.Handler
- func (hrs *HttpRouterSwagger) Init(webServiceAddr string)
- func (hrs *HttpRouterSwagger) RegisterSwaggerService()
- type MethodDoc
- type ParamDoc
- type ServiceDoc
- type WebService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HttpRouterSwagger ¶
type HttpRouterSwagger struct { HttpRouter *httprouter.Router GoRestfulContainer *restful.Container //GoRestfulWebServices []*restful.WebService SwaggerConfig *swagger.Config // contains filtered or unexported fields }
func NewHRS ¶
func NewHRS(webServiceAddr string, httpRouter *httprouter.Router) *HttpRouterSwagger
func (*HttpRouterSwagger) AddRoute ¶
func (hrs *HttpRouterSwagger) AddRoute(ws *WebService, method string, path string, function httprouter.Handle, methodDoc MethodDoc) *restful.RouteBuilder
func (*HttpRouterSwagger) AddService ¶
func (hrs *HttpRouterSwagger) AddService(path string, serviceDoc ServiceDoc) *WebService
func (*HttpRouterSwagger) GetSwaggerHandler ¶
func (hrs *HttpRouterSwagger) GetSwaggerHandler() http.Handler
func (*HttpRouterSwagger) Init ¶
func (hrs *HttpRouterSwagger) Init(webServiceAddr string)
Not sure if this should have defaults or not, but it feels like there should be recommended swagger uri accross implementations.
func (*HttpRouterSwagger) RegisterSwaggerService ¶
func (hrs *HttpRouterSwagger) RegisterSwaggerService()
type ServiceDoc ¶
type WebService ¶
type WebService struct { *restful.WebService Hrs *HttpRouterSwagger Path string }
wrapper for restful.WebService
func (*WebService) AddRoute ¶
func (ws *WebService) AddRoute(method string, path string, function httprouter.Handle, methodDoc MethodDoc) *restful.RouteBuilder
Click to show internal directories.
Click to hide internal directories.