Documentation
¶
Index ¶
- func InitRoutes(a *MuxRouterAdapter)
- type IRouter
- type MuxRouterAdapter
- func (a MuxRouterAdapter) HandleFunc(path string, f func(http.ResponseWriter, *http.Request)) *mux.Route
- func (a MuxRouterAdapter) PathPrefix(tpl string) *mux.Route
- func (a MuxRouterAdapter) ServeHTTP(writer http.ResponseWriter, request *http.Request)
- func (a MuxRouterAdapter) SetNotFoundHandler(handler func(http.ResponseWriter, *http.Request))
- func (a MuxRouterAdapter) Use(mwf ...mux.MiddlewareFunc)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitRoutes ¶
func InitRoutes(a *MuxRouterAdapter)
Types ¶
type IRouter ¶
type IRouter interface { HandleFunc(path string, f func(http.ResponseWriter, *http.Request)) *mux.Route PathPrefix(tpl string) *mux.Route Use(mwf ...mux.MiddlewareFunc) SetNotFoundHandler(handler func(http.ResponseWriter, *http.Request)) ServeHTTP(http.ResponseWriter, *http.Request) }
type MuxRouterAdapter ¶
type MuxRouterAdapter struct { MuxRouter *mux.Router NotFoundHandler *handler2.NotFoundHandler IndexHandler *handler2.IndexHandler Middlewares middleware.APIMiddleware }
func NewMuxRouterAdapter ¶
func NewMuxRouterAdapter( notFoundHandler *handler2.NotFoundHandler, indexHandler *handler2.IndexHandler, middlewares middleware.APIMiddleware, ) *MuxRouterAdapter
func (MuxRouterAdapter) HandleFunc ¶
func (a MuxRouterAdapter) HandleFunc(path string, f func(http.ResponseWriter, *http.Request)) *mux.Route
HandleFunc HandleFunc
func (MuxRouterAdapter) PathPrefix ¶
func (a MuxRouterAdapter) PathPrefix(tpl string) *mux.Route
PathPrefix PathPrefix
func (MuxRouterAdapter) ServeHTTP ¶
func (a MuxRouterAdapter) ServeHTTP(writer http.ResponseWriter, request *http.Request)
ServeHTTP ServeHTTP
func (MuxRouterAdapter) SetNotFoundHandler ¶
func (a MuxRouterAdapter) SetNotFoundHandler(handler func(http.ResponseWriter, *http.Request))
SetNotFoundHandler SetNotFoundHandler
Click to show internal directories.
Click to hide internal directories.