Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GMqtt ¶
type GMqtt struct {
// contains filtered or unexported fields
}
func (*GMqtt) GetConnEvent ¶
GetConnEvent 建立连接后触发后续事件 true:连接成功;false:失去连接
func (*GMqtt) Group ¶
func (g *GMqtt) Group(prefix string, groups ...func(group *RouterGroup)) *RouterGroup
type Request ¶
type Request struct {
Client mqtt.Client
Message mqtt.Message
// contains filtered or unexported fields
}
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.
Method string // HTTP method
Domain string // Bound domain.
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.
func (*RouterGroup) Group ¶
func (g *RouterGroup) Group(prefix string, groups ...func(group *RouterGroup)) *RouterGroup
Group creates and returns a sub-group of current router group.
Click to show internal directories.
Click to hide internal directories.