Documentation ¶
Index ¶
- func BotRecvMsgHandler(ctx context.Context, data []byte) error
- func BotRecvMsgRegister(appID string, cmdName string, handler HandlerBotMsg) error
- func CardCallBack(ctx context.Context, appID string, header map[string]string, body []byte) (*protocol.CardForm, string, error)
- func CardRegister(appID string, method string, handler ActionMethod) error
- func EventCallback(ctx context.Context, body string, appID string) (string, error)
- func EventRegister(appID, eventTypeList string, eventHandler EventHandler) error
- func IgnoreSign(appid string, ignore bool)
- type ActionHandlerManager
- type ActionMethod
- type CommandHandlerManager
- type EventHandler
- type EventHandlerManager
- type HandlerBotMsg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BotRecvMsgHandler ¶
BotRecvMsgHandler callback botRecvMsg
func BotRecvMsgRegister ¶
func BotRecvMsgRegister(appID string, cmdName string, handler HandlerBotMsg) error
BotRecvMsgRegister appid+cmd --> handler
func CardCallBack ¶
func CardRegister ¶
func CardRegister(appID string, method string, handler ActionMethod) error
func EventCallback ¶
func EventRegister ¶
func EventRegister(appID, eventTypeList string, eventHandler EventHandler) error
func IgnoreSign ¶
Types ¶
type ActionHandlerManager ¶
type ActionHandlerManager struct {
// contains filtered or unexported fields
}
func (*ActionHandlerManager) Get ¶
func (a *ActionHandlerManager) Get(appID string, method string) (ActionMethod, error)
func (*ActionHandlerManager) Set ¶
func (a *ActionHandlerManager) Set(appID string, method string, v ActionMethod)
type ActionMethod ¶
type CommandHandlerManager ¶
type CommandHandlerManager struct {
// contains filtered or unexported fields
}
CommandHandlerManager cmd --> handler
func (*CommandHandlerManager) Get ¶
func (p *CommandHandlerManager) Get(appID string, cmdName string) (HandlerBotMsg, error)
func (*CommandHandlerManager) Set ¶
func (p *CommandHandlerManager) Set(appID string, cmdName string, handler HandlerBotMsg)
type EventHandlerManager ¶
type EventHandlerManager struct {
// contains filtered or unexported fields
}
func (*EventHandlerManager) Get ¶
func (a *EventHandlerManager) Get(appID string, eventType string) (EventHandler, error)
func (*EventHandlerManager) Set ¶
func (a *EventHandlerManager) Set(appID, eventTypeList string, eventHandler EventHandler)
type HandlerBotMsg ¶
type HandlerBotMsg func(ctx context.Context, msg *protocol.BotRecvMsg) error
Click to show internal directories.
Click to hide internal directories.