Documentation ¶
Index ¶
- type BotCallbackDataAtUserModel
- type BotCallbackDataModel
- type BotCallbackDataTextModel
- type ChatbotReplier
- func (r *ChatbotReplier) ReplyMessage(ctx context.Context, sessionWebhook string, requestBody map[string]interface{}) error
- func (r *ChatbotReplier) SimpleReplyMarkdown(ctx context.Context, sessionWebhook string, title, content []byte) error
- func (r *ChatbotReplier) SimpleReplyText(ctx context.Context, sessionWebhook string, content []byte) error
- type DefaultChatBotFrameHandler
- type IChatBotMessageHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BotCallbackDataModel ¶
type BotCallbackDataModel struct { ConversationId string `json:"conversationId"` AtUsers []BotCallbackDataAtUserModel `json:"atUsers"` ChatbotCorpId string `json:"chatbotCorpId"` ChatbotUserId string `json:"chatbotUserId"` MsgId string `json:"msgId"` SenderNick string `json:"senderNick"` IsAdmin bool `json:"isAdmin"` SenderStaffId string `json:"senderStaffId"` SessionWebhookExpiredTime int64 `json:"sessionWebhookExpiredTime"` CreateAt int64 `json:"createAt"` SenderCorpId string `json:"senderCorpId"` ConversationType string `json:"conversationType"` SenderId string `json:"senderId"` ConversationTitle string `json:"conversationTitle"` IsInAtList bool `json:"isInAtList"` SessionWebhook string `json:"sessionWebhook"` Text BotCallbackDataTextModel `json:"text"` Msgtype string `json:"msgtype"` Content interface{} `json:"content"` }
type BotCallbackDataTextModel ¶
type BotCallbackDataTextModel struct {
Content string `json:"content"`
}
type ChatbotReplier ¶ added in v0.0.4
type ChatbotReplier struct { }
func NewChatbotReplier ¶ added in v0.0.4
func NewChatbotReplier() *ChatbotReplier
func (*ChatbotReplier) ReplyMessage ¶ added in v0.0.4
func (*ChatbotReplier) SimpleReplyMarkdown ¶ added in v0.0.4
func (*ChatbotReplier) SimpleReplyText ¶ added in v0.0.4
type DefaultChatBotFrameHandler ¶
type DefaultChatBotFrameHandler struct {
// contains filtered or unexported fields
}
func NewDefaultChatBotFrameHandler ¶
func NewDefaultChatBotFrameHandler(defaultHandler IChatBotMessageHandler) *DefaultChatBotFrameHandler
func (*DefaultChatBotFrameHandler) OnEventReceived ¶
func (h *DefaultChatBotFrameHandler) OnEventReceived(ctx context.Context, df *payload.DataFrame) (*payload.DataFrameResponse, error)
type IChatBotMessageHandler ¶ added in v0.0.4
type IChatBotMessageHandler func(c context.Context, data *BotCallbackDataModel) ([]byte, error)
Click to show internal directories.
Click to hide internal directories.