Documentation ¶
Index ¶
- func ConvertURL(url string) string
- func URLPathParam(r *http.Request, name string) string
- type RouterAdapter
- func (rt *RouterAdapter) HandlerFunc(method, path string, handler http.HandlerFunc)
- func (rt *RouterAdapter) Register(controllers ...mrserver.HttpController)
- func (rt *RouterAdapter) RegisterMiddleware(handlers ...func(next http.Handler) http.Handler)
- func (rt *RouterAdapter) ServeHTTP(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RouterAdapter ¶
type RouterAdapter struct {
// contains filtered or unexported fields
}
RouterAdapter - comment struct.
func New ¶
func New( logger mrlog.Logger, adapterFunc func(next mrserver.HttpHandlerFunc) http.HandlerFunc, notFoundFunc http.HandlerFunc, methodNotAllowedFunc http.HandlerFunc, ) *RouterAdapter
New - создаёт объект RouterAdapter.
func (*RouterAdapter) HandlerFunc ¶
func (rt *RouterAdapter) HandlerFunc(method, path string, handler http.HandlerFunc)
HandlerFunc - comment method.
func (*RouterAdapter) Register ¶
func (rt *RouterAdapter) Register(controllers ...mrserver.HttpController)
Register - comment method.
func (*RouterAdapter) RegisterMiddleware ¶
func (rt *RouterAdapter) RegisterMiddleware(handlers ...func(next http.Handler) http.Handler)
RegisterMiddleware - comment method.
func (*RouterAdapter) ServeHTTP ¶
func (rt *RouterAdapter) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP - comment method.
Click to show internal directories.
Click to hide internal directories.