Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RouterWrapper ¶
type RouterWrapper interface {
Add(child *Wrapper) error
FullPath() string
Router() *mux.Router
SetRouter(*mux.Router)
Children() []RouterWrapper
Handler() http.HandlerFunc
}
RouterWrapper is an interface for wrapper
type Wrapper ¶
type Wrapper struct {
// contains filtered or unexported fields
}
Wrapper wraps router with tree structure
func New ¶
func New(path string, methods []string, handler http.HandlerFunc) *Wrapper
New is a constructor for the wrapper
func (*Wrapper) Children ¶
func (w *Wrapper) Children() []RouterWrapper
Children returns its children
func (*Wrapper) Handler ¶
func (w *Wrapper) Handler() http.HandlerFunc
Click to show internal directories.
Click to hide internal directories.