Documentation
¶
Index ¶
- Variables
- type Controller
- type ControllerWrapper
- type Router
- func (r *Router) HandleFunc(path string, handler http.HandlerFunc)
- func (r *Router) Handler() *http.ServeMux
- func (r *Router) RegisterHandler(path string, handler http.Handler)
- func (r *Router) RegisterRoute(path string, handler http.HandlerFunc)
- func (r *Router) RegisterRouteGroup(path string, router *Router)
- type RouterWrapper
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Controller ¶ added in v0.2.1
type Controller struct {
RouterWrapper
}
Controller is the struct for the route controller
type ControllerWrapper ¶ added in v0.2.2
type ControllerWrapper interface {
RegisterRoutes()
RegisterRouteGroups()
}
ControllerWrapper is the interface for the route controller
type Router ¶ added in v0.2.2
type Router struct {
// contains filtered or unexported fields
}
Router is the route group struct
func NewRouterGroup ¶ added in v0.2.2
NewRouterGroup creates a new route group
func (*Router) HandleFunc ¶ added in v0.2.2
func (r *Router) HandleFunc(path string, handler http.HandlerFunc)
HandleFunc registers a new route with a path and a handler function
func (*Router) RegisterHandler ¶ added in v0.2.2
RegisterHandler registers a new route group with a path and a handler function
func (*Router) RegisterRoute ¶ added in v0.2.2
func (r *Router) RegisterRoute(path string, handler http.HandlerFunc)
RegisterRoute registers a new route with a path and a handler function
func (*Router) RegisterRouteGroup ¶ added in v0.2.2
RegisterRouteGroup registers a new route group with a path and a router
type RouterWrapper ¶ added in v0.2.2
type RouterWrapper interface {
Handler() *http.ServeMux
HandleFunc(path string, handler http.HandlerFunc)
RegisterRoute(path string, handler http.HandlerFunc)
RegisterHandler(path string, handler http.Handler)
RegisterRouteGroup(path string, router *Router)
}
RouterWrapper is the interface for the routes
Click to show internal directories.
Click to hide internal directories.