Documentation
¶
Index ¶
- Variables
- func Command(eventKey string, data string, client e.Client)
- func DoWebhook(topic string, data map[string]any, identifier string, eventType string, ...)
- func GetClientId(identifier string) string
- func GetResolverInfo(commandName string, sn string) config.ContextInfo
- func Parse(eventKey string, data string, client e.Client) (bool, string, map[string]any, string)
- func ParseHandle(data string, client e.Client, info config.ContextInfo) (map[string]any, *config.ParseHandleInfo, string)
- func RegisterEvent(topic string, event HandleEvent, eventType string)
- func ResolveHandle(data string, client e.Client, info config.ContextInfo) []model.CommandModel
- func UpdateResolveInfoCacheValue(commandName string, sn string, field string, value string, digit int)
- type CallbackHandler
- type CommandEventHandleFun
- type CommandParseEventsMap
- type Events
- type HandleEvent
- type ParseEventHandleFun
- type ParseEventsMap
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Parsers ParseEventsMap Commands CommandParseEventsMap PARSE = "parse" COMMAND = "command" )
Functions ¶
func GetClientId ¶
func GetResolverInfo ¶
func GetResolverInfo(commandName string, sn string) config.ContextInfo
获取解析对象,优先从缓存取
func ParseHandle ¶
func ParseHandle(data string, client e.Client, info config.ContextInfo) (map[string]any, *config.ParseHandleInfo, string)
func RegisterEvent ¶
func RegisterEvent(topic string, event HandleEvent, eventType string)
func ResolveHandle ¶
func ResolveHandle(data string, client e.Client, info config.ContextInfo) []model.CommandModel
Types ¶
type CallbackHandler ¶
type CommandEventHandleFun ¶
type CommandParseEventsMap ¶
type CommandParseEventsMap map[string]CommandEventHandleFun
type Events ¶
type Events struct { OnProcessMessage e.OnProcessMessage OnMessage e.OnMessage OnError e.OnError OnConnect e.OnConnect OnDisconnect e.OnDisconnect OnSubscribe e.OnSubscribe OnUnsubscribe e.OnUnsubscribe OnWsMessage func(clientId string, res http.ResponseWriter, req *http.Request, data map[string]any) *map[string]any }
type ParseEventHandleFun ¶
type ParseEventsMap ¶
type ParseEventsMap map[string]ParseEventHandleFun
Click to show internal directories.
Click to hide internal directories.