Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RouterWrapper ¶
type RouterWrapper struct {
Router *mux.Router
SubPath string
Methods []string
Handler http.HandlerFunc
Children []*RouterWrapper
Parent *RouterWrapper
}
RouterWrapper wraps router with tree structure
func New ¶
func New(path string, methods []string, handler http.HandlerFunc) *RouterWrapper
New is a constructor for the RouterWrapper
func (*RouterWrapper) Add ¶
func (w *RouterWrapper) Add(child *RouterWrapper) error
Add adds child as a child (child node of a tree) of w
func (*RouterWrapper) FullPath ¶
func (w *RouterWrapper) FullPath() string
FullPath builds full path string of the api
Click to show internal directories.
Click to hide internal directories.