chatbot

package
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2024 License: MIT Imports: 8 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BotCallbackDataAtUserModel

type BotCallbackDataAtUserModel struct {
	DingtalkId string `json:"dingtalkId"`
	StaffId    string `json:"staffId"`
}

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 (r *ChatbotReplier) ReplyMessage(ctx context.Context, sessionWebhook string, requestBody map[string]interface{}) error

func (*ChatbotReplier) SimpleReplyMarkdown added in v0.0.4

func (r *ChatbotReplier) SimpleReplyMarkdown(ctx context.Context, sessionWebhook string, title, content []byte) error

func (*ChatbotReplier) SimpleReplyText added in v0.0.4

func (r *ChatbotReplier) SimpleReplyText(ctx context.Context, sessionWebhook string, content []byte) error

type DefaultChatBotFrameHandler

type DefaultChatBotFrameHandler struct {
	// contains filtered or unexported fields
}

func NewDefaultChatBotFrameHandler

func NewDefaultChatBotFrameHandler(defaultHandler IChatBotMessageHandler) *DefaultChatBotFrameHandler

func (*DefaultChatBotFrameHandler) OnEventReceived

type IChatBotMessageHandler added in v0.0.4

type IChatBotMessageHandler func(c context.Context, data *BotCallbackDataModel) ([]byte, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL