Documentation ¶
Index ¶
Constants ¶
View Source
const RouterPath = "router-path"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HTTPRouter ¶
type HTTPRouter interface { GET(path string, handler HandlerFunc) POST(path string, handler HandlerFunc) PUT(path string, handler HandlerFunc) OPTIONS(path string, handler HandlerFunc) }
func New ¶
func New(prefix string, router Registrator) HTTPRouter
type HandlerFunc ¶
type HandlerFunc func(w http.ResponseWriter, r *http.Request) response.HTTPResponse
type Registrator ¶
type Registrator interface { AddMiddlewareWrapper(wrapper ...middleware.Wrapper) Registrator Register(method, path string, handler HandlerFunc) ServeHTTP(http.ResponseWriter, *http.Request) }
Click to show internal directories.
Click to hide internal directories.