Documentation
¶
Index ¶
- type Identify
- type Router
- func (r *Router) Degrade(p string)
- func (r *Router) Get(p string, hf xweb.HandlerFunc)
- func (r *Router) Group(p string, f func(r *Router))
- func (r *Router) GuestGet(p string, hf xweb.HandlerFunc)
- func (r *Router) GuestPost(p string, hf xweb.HandlerFunc)
- func (r *Router) Post(p string, hf xweb.HandlerFunc)
- func (r *Router) UserGet(p string, hf xweb.HandlerFunc)
- func (r *Router) UserPost(p string, hf xweb.HandlerFunc)
- func (r *Router) VerifyGet(p string, hf xweb.HandlerFunc)
- func (r *Router) VerifyPost(p string, hf xweb.HandlerFunc)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Router ¶
type Router struct {
// contains filtered or unexported fields
}
Router is http router. Statsd for stat, need set value by called.
func (*Router) Get ¶
func (r *Router) Get(p string, hf xweb.HandlerFunc)
Get support http method Get, no business access and verify.
func (*Router) Group ¶
Group add group paths.
eg: r.Group("/x/auth", func(cr *Router){ cr.Get("login", handlerFunc) })
func (*Router) GuestGet ¶
func (r *Router) GuestGet(p string, hf xweb.HandlerFunc)
GuestGet support http method Get, identify access will be called before hf, but cann't affect hf.
func (*Router) GuestPost ¶
func (r *Router) GuestPost(p string, hf xweb.HandlerFunc)
GuestPost support http method Post, identify access will be called before hf, but cann't affect hf.
func (*Router) Post ¶
func (r *Router) Post(p string, hf xweb.HandlerFunc)
Post support http method Post, no business access and verify.
func (*Router) UserGet ¶
func (r *Router) UserGet(p string, hf xweb.HandlerFunc)
UserGet support http method Get, identify access will be called before hf, and hf not be called when access failed.
func (*Router) UserPost ¶
func (r *Router) UserPost(p string, hf xweb.HandlerFunc)
UserPost support http method Post, identify access will be called before hf, and hf not be called when access failed.
func (*Router) VerifyGet ¶
func (r *Router) VerifyGet(p string, hf xweb.HandlerFunc)
VerifyGet support http method Get, identify verify will be called before hf, and hf not be called when verify failed.
func (*Router) VerifyPost ¶
func (r *Router) VerifyPost(p string, hf xweb.HandlerFunc)
VerifyPost support http method Post, identify verify will be called before hf, and hf not be called when verify failed.