Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GRouter ¶
type GRouter struct {
// contains filtered or unexported fields
}
func (*GRouter) GetHandlersWithCache ¶
func (*GRouter) Group ¶
func (g *GRouter) Group(prefix string, groups ...func(group *RouterGroup)) *RouterGroup
type Request ¶
type Request struct { URL string Payload interface{} RouterMap map[string]string // Router parameters map, which might be nil if there're no router parameters. }
func (*Request) GetRouterString ¶
GetRouterString retrieves and returns the router value as string with given key name <key>. It returns <def> if <key> does not exist.
func (*Request) GetRouterValue ¶
GetRouterValue retrieves and returns the router value with given key name <key>. It returns <def> if <key> does not exist.
type Router ¶
type Router struct { Uri string // URI. RegRule string // Parsed regular expression for route matching. RegNames []string // Parsed router parameter names. Priority int // Just for reference. }
Router object.
type RouterGroup ¶
type RouterGroup struct {
// contains filtered or unexported fields
}
RouterGroup is a group wrapping multiple routes and middleware.
func (*RouterGroup) Clone ¶
func (g *RouterGroup) Clone() *RouterGroup
Clone returns a new router group which is a clone of current group.
func (*RouterGroup) GET ¶
func (g *RouterGroup) GET(pattern string, object HandlerFunc) *RouterGroup
GET registers a http handler to given route pattern and http method: GET.
Click to show internal directories.
Click to hide internal directories.