Documentation
¶
Index ¶
- func DefaultAuthFunc(w *http.ResponseWriter, r *http.Request) bool
- type IRoute
- type IRouteGroup
- type Mux
- func (m *Mux) AddFileDir(pattern string, dir string, memo string)
- func (m *Mux) AddIRoute(route IRoute)
- func (m *Mux) AddIRouteGroup(group IRouteGroup)
- func (m *Mux) AddRoute(route *Route)
- func (m *Mux) AddRouteGroup(group *RouteGroup)
- func (m *Mux) CreateRouteGroup(pattern string, memo string) *RouteGroup
- func (m *Mux) Serve(addr string)
- func (m *Mux) ServerTLS(addr string, cert string, key string)
- func (m *Mux) SetAuthFunc(Func func(w *http.ResponseWriter, r *http.Request) bool)
- func (m *Mux) SetCORS(allow bool)
- func (m *Mux) ShowRouteMap() string
- type Route
- type RouteGroup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultAuthFunc ¶
func DefaultAuthFunc(w *http.ResponseWriter, r *http.Request) bool
Types ¶
type IRouteGroup ¶
type IRouteGroup interface {
RouteGroup() *RouteGroup
}
type Mux ¶
type Mux struct {
// contains filtered or unexported fields
}
func (*Mux) AddIRouteGroup ¶
func (m *Mux) AddIRouteGroup(group IRouteGroup)
func (*Mux) AddRouteGroup ¶
func (m *Mux) AddRouteGroup(group *RouteGroup)
func (*Mux) CreateRouteGroup ¶
func (m *Mux) CreateRouteGroup(pattern string, memo string) *RouteGroup
type RouteGroup ¶
type RouteGroup struct {
Pattern string
Memo string
Array []*Route
// contains filtered or unexported fields
}
func NewRouteGroup ¶
func NewRouteGroup(pattern string, memo string, mux *Mux) *RouteGroup
Click to show internal directories.
Click to hide internal directories.