Documentation
¶
Index ¶
- type CodeMessage
- type CodeMessageReq
- type ConsumeContactApply
- type ConsumeContactStatus
- type ConsumeGroupApply
- type ConsumeGroupJoin
- type ConsumeTalk
- type ConsumeTalkKeyboard
- type ConsumeTalkRead
- type ConsumeTalkRevoke
- type EmoticonMessage
- type EmoticonMessageReq
- type FileMessage
- type ImageMessage
- type ImageMessageReq
- type KeyboardMessage
- type LocationMessage
- type LocationMessageReq
- type Mention
- type MessageVoteReq
- type Receiver
- type Robot
- type SubscribeContent
- type TalkReadMessage
- type TalkRecord
- type TalkRecordCode
- type TalkRecordReply
- type TalkRecordsItem
- type TextMessage
- type TextMessageReq
- type VoteMessage
- type VoteStatistics
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CodeMessage ¶
type CodeMessage struct { AckId string `json:"ack_id"` Event string `json:"event"` Content CodeMessageReq `json:"content"` }
type CodeMessageReq ¶
type CodeMessageReq struct { Type string `json:"type,omitempty"` Receiver *Receiver `json:"receiver,omitempty"` // 消息接收者 TalkType int `json:"talk_type" v:"required|in:1,2"` ReceiverId int `json:"receiver_id" v:"required"` Lang string `json:"lang" v:"required"` Code string `json:"code" v:"required"` }
代码消息
type ConsumeContactApply ¶
type ConsumeContactStatus ¶
type ConsumeGroupApply ¶
type ConsumeGroupJoin ¶
type ConsumeTalk ¶
type ConsumeTalkKeyboard ¶
type ConsumeTalkRead ¶
type ConsumeTalkRevoke ¶
type ConsumeTalkRevoke struct {
RecordId int `json:"record_id"`
}
type EmoticonMessage ¶
type EmoticonMessage struct { MsgId string `json:"msg_id"` Event string `json:"event"` Content EmoticonMessageReq `json:"content"` }
type EmoticonMessageReq ¶
type EmoticonMessageReq struct { Type string `json:"type,omitempty"` Receiver *Receiver `json:"receiver,omitempty"` // 消息接收者 TalkType int `json:"talk_type" v:"required|in:1,2"` ReceiverId int `json:"receiver_id" v:"required"` EmoticonId string `json:"emoticon_id" v:"required"` }
表情消息
type FileMessage ¶
type FileMessage struct { MsgId string `json:"msg_id"` Event string `json:"event"` Content ImageMessageReq `json:"content"` }
type ImageMessage ¶
type ImageMessage struct { MsgId string `json:"msg_id"` Event string `json:"event"` Content ImageMessageReq `json:"content"` }
type ImageMessageReq ¶
type ImageMessageReq struct { Type string `json:"type,omitempty"` Url string `json:"url,omitempty" v:"required"` // 图片地址 Width int `json:"width,omitempty" v:"required"` // 图片宽度 Height int `json:"height,omitempty" v:"required"` // 图片高度 Size int `json:"size,omitempty" v:"required"` // 图片大小 Receiver *Receiver `json:"receiver,omitempty"` // 消息接收者 QuoteId string `json:"quote_id,omitempty"` // 引用的消息ID TalkType int `json:"talk_type" v:"required|in:1,2"` ReceiverId int `json:"receiver_id" v:"required"` }
图片消息
type KeyboardMessage ¶
type LocationMessage ¶
type LocationMessage struct { MsgId string `json:"msg_id"` Event string `json:"event"` Content LocationMessageReq `json:"content"` }
type LocationMessageReq ¶
type LocationMessageReq struct { Type string `json:"type,omitempty"` Longitude string `json:"longitude,omitempty" v:"required"` // 地理位置 经度 Latitude string `json:"latitude,omitempty" v:"required"` // 地理位置 纬度 Description string `json:"description,omitempty" v:"required"` // 位置描述 Receiver *Receiver `json:"receiver,omitempty"` // 消息接收者 TalkType int `json:"talk_type" v:"required|in:1,2"` ReceiverId int `json:"receiver_id" v:"required"` }
位置消息
type MessageVoteReq ¶
type MessageVoteReq struct { Type string `json:"type,omitempty"` Receiver *Receiver `json:"receiver,omitempty"` // 消息接收者 ReceiverId int `json:"receiver_id" v:"required"` Mode int `json:"mode" v:"in:0,1"` Anonymous int `json:"anonymous" v:"in:0,1"` Title string `json:"title" v:"required"` Options []string `json:"options"` }
投票消息接口请求参数
type Robot ¶
type Robot struct { UserId int `json:"user_id,omitempty"` // 关联用户ID RobotName string `json:"robot_name,omitempty"` // 机器人名称 Describe string `json:"describe,omitempty"` // 描述信息 Logo string `json:"logo,omitempty"` // 机器人logo IsTalk int `json:"is_talk,omitempty"` // 可发送消息[0:否;1:是;] Status int `json:"status,omitempty"` // 状态[-1:已删除;0:正常;1:已禁用;] Type int `json:"type,omitempty"` // 机器人类型 Company string `json:"company,omitempty"` // 公司 Model string `json:"model,omitempty"` // 模型 ModelType string `json:"model_type,omitempty"` // 模型类型, 聊天: chat, 画图: image Role string `json:"role,omitempty"` // 角色 Prompt string `json:"prompt,omitempty"` // 提示 MsgType int `json:"msg_type,omitempty"` // 消息类型[1:文本消息;2:文件消息;3:会话消息;4:代码消息;5:投票消息;6:群公告;7:好友申请;8:登录通知;9:入群消息/退群消息;] Proxy string `json:"proxy,omitempty"` // 代理 CreatedAt int64 `json:"created_at,omitempty"` // 创建时间 UpdatedAt int64 `json:"updated_at,omitempty"` // 更新时间 }
type SubscribeContent ¶
type TalkReadMessage ¶
type TalkRecord ¶
type TalkRecord struct { Id string `json:"id"` // ID RecordId int `json:"record_id"` // 记录ID MsgId string `json:"msg_id"` // 消息唯一ID Sequence int64 `json:"sequence"` // 消息时序ID TalkType int `json:"talk_type"` // 对话类型[1:私信;2:群聊;] MsgType int `json:"msg_type"` // 消息类型 UserId int `json:"user_id"` // 发送者ID[0:系统用户;] ReceiverId int `json:"receiver_id"` // 接收者ID(用户ID 或 群ID) IsRevoke int `json:"is_revoke"` // 是否撤回消息[0:否;1:是;] IsMark int `json:"is_mark"` // 是否重要消息[0:否;1:是;] IsRead int `json:"is_read"` // 是否已读[0:否;1:是;] QuoteId string `json:"quote_id"` // 引用消息ID Content string `json:"content"` // 文本消息 Extra string `json:"extra"` // 扩展信信息 CreatedAt string `json:"created_at"` // 创建时间 UpdatedAt string `json:"updated_at"` // 更新时间 }
type TalkRecordCode ¶
type TalkRecordReply ¶
type TalkRecordsItem ¶
type TalkRecordsItem struct { Id int `json:"id"` Sequence int `json:"sequence"` MsgId string `json:"msg_id"` TalkType int `json:"talk_type"` MsgType int `json:"msg_type"` UserId int `json:"user_id"` ReceiverId int `json:"receiver_id"` Nickname string `json:"nickname"` Avatar string `json:"avatar"` IsRevoke int `json:"is_revoke"` IsMark int `json:"is_mark"` IsRead int `json:"is_read"` Content string `json:"content"` CreatedAt string `json:"created_at"` Extra any `json:"extra"` // 额外参数 }
type TextMessage ¶
type TextMessage struct { AckId string `json:"ack_id"` Event string `json:"event"` Content TextMessageReq `json:"content"` }
type TextMessageReq ¶
type TextMessageReq struct { Type string `json:"type,omitempty"` // 消息类型 Content string `json:"content,omitempty" v:"required"` Mention *Mention `json:"mention,omitempty"` QuoteId string `json:"quote_id,omitempty"` // 引用的消息ID Receiver *Receiver `json:"receiver,omitempty"` // 消息接收者 TalkType int `json:"talk_type" v:"required|in:1,2"` ReceiverId int `json:"receiver_id" v:"required"` Text string `json:"text" v:"required"` }
文本消息
type VoteMessage ¶
type VoteMessage struct { MsgId string `json:"msg_id"` Event string `json:"event"` Content MessageVoteReq `json:"content"` }
type VoteStatistics ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.