Documentation ¶
Index ¶
- type APIBaseModel
- type AuditModel
- type CheckMemberBotAccessTokenModel
- type CreateRoleModel
- type CreateRoomModel
- type EmptyModel
- type GetAllEmoticonsModel
- type GetGroupListModel
- type GetMemberModel
- type GetRoleInfoModel
- type GetRoomModel
- type GetVillaGroupRoomListModel
- type GetVillaMemberRolesModel
- type GetVillaMembersModel
- type GetVillaModel
- type MemberModel
- type MemberRoleModel
- type MsgContentType
- type MsgEntityLink
- type MsgEntityMentionAll
- type MsgEntityMentionRobot
- type MsgEntityMentionUser
- type MsgEntityType
- type MsgEntityVillaRoomLink
- type MsgInputModel
- func (msg MsgInputModel) AppendText(args ...interface{}) error
- func (msg MsgInputModel) Finialize(room_id uint64) MsgInputModel
- func (msg MsgInputModel) SetImage(url string, width int, height int, file_size int) error
- func (msg MsgInputModel) SetPost(post_id string) error
- func (msg MsgInputModel) SetText(args ...interface{}) error
- func (msg MsgInputModel) SetTextQuote(quoted_message_id string, quoted_message_send_time int64, ...) error
- type MsgMentionType
- type SendMessageModel
- type UploadImageModel
- type UserInputAudit
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIBaseModel ¶
type AuditModel ¶
type AuditModel struct { APIBaseModel Data struct { AuditID string `json:"audit_id"` } `json:"data"` }
type CheckMemberBotAccessTokenModel ¶
type CheckMemberBotAccessTokenModel struct { APIBaseModel Data struct { AccessInfo struct { UID string `json:"uid"` VillaID string `json:"villa_id"` MemberAccessToken string `json:"member_access_token"` BotTplID string `json:"bot_tpl_id"` } `json:"access_info"` Member struct { Basic struct { UID string `json:"uid"` Nickname string `json:"nickname"` Introduce string `json:"introduce"` Avatar string `json:"avatar"` AvatarURL string `json:"avatar_url"` } `json:"basic"` RoleIDList []string `json:"role_id_list"` JoinedAt string `json:"joined_at"` RoleList []struct { ID string `json:"id"` Name string `json:"name"` Color string `json:"color"` RoleType string `json:"role_type"` VillaID string `json:"villa_id"` } `json:"role_list"` } `json:"member"` } `json:"data"` }
type CreateRoleModel ¶
type CreateRoleModel struct { APIBaseModel Data struct { ID uint64 `json:"id,string"` } `json:"data"` }
type CreateRoomModel ¶
type CreateRoomModel struct { APIBaseModel Data struct { GoomID uint64 `json:"group_id,string"` } `json:"data"` }
type EmptyModel ¶
type EmptyModel struct { APIBaseModel Data struct{} `json:"data"` }
type GetAllEmoticonsModel ¶
type GetAllEmoticonsModel struct { APIBaseModel Data struct { List []struct { EmoticonID uint64 `json:"emoticon_id,string"` DescribeText string `json:"describe_text"` Icon string `json:"icon"` } `json:"list"` } `json:"data"` }
type GetGroupListModel ¶
type GetGroupListModel struct { APIBaseModel Data struct { List []struct { GroupID uint64 `json:"group_id,string"` GroupName string `json:"group_name"` } `json:"list"` } `json:"data"` }
type GetMemberModel ¶
type GetMemberModel struct { APIBaseModel Data struct { Member MemberModel `json:"member"` } `json:"data"` }
type GetRoleInfoModel ¶
type GetRoleInfoModel struct { APIBaseModel Data struct { Role struct { ID string `json:"id"` Name string `json:"name"` Color string `json:"color"` VillaID string `json:"villa_id"` RoleType string `json:"role_type"` MemberNum string `json:"member_num"` Permissions []struct { Key string `json:"key"` Name string `json:"name"` Describe string `json:"describe"` } `json:"permissions"` } `json:"role"` } `json:"data"` }
type GetRoomModel ¶
type GetRoomModel struct { APIBaseModel Data struct { Room struct { RoomID uint64 `json:"room_id,string"` RoomName string `json:"room_name"` RoomType string `json:"room_type"` GroupID uint64 `json:"group_id,string"` RoomDefaultNotifyType string `json:"room_default_notify_type"` SendMsgAuthRange struct { IsAllSendMsg bool `json:"is_all_send_msg"` Roles []uint64 `json:"roles,string"` } `json:"send_msg_auth_range"` } `json:"room"` } `json:"data"` }
type GetVillaGroupRoomListModel ¶
type GetVillaGroupRoomListModel struct { APIBaseModel Data struct { GroupID uint64 `json:"group_id,string"` GroupName string `json:"group_name"` RoomList []struct { RoomID uint64 `json:"room_id,string"` RoomName string `json:"room_name"` RoomType string `json:"room_type"` GroupID uint64 `json:"group_id,string"` } `json:"room_list"` } `json:"data"` }
type GetVillaMembersModel ¶
type GetVillaMembersModel struct { APIBaseModel Data struct { List []MemberModel `json:"list"` NextOffsetStr string `json:"next_offset_str"` } `json:"data"` }
type GetVillaModel ¶
type GetVillaModel struct { APIBaseModel Data struct { Villa struct { VillaID uint64 `json:"villa_id,string"` Name string `json:"name"` VillaAvatarURL string `json:"villa_avatar_url"` OwnerUID uint64 `json:"owner_uid,string"` IsOfficial bool `json:"is_official"` Introduce string `json:"introduce"` CategoryID uint32 `json:"category_id"` Tags []string `json:"tags"` } `json:"villa"` } `json:"data"` }
type MemberModel ¶
type MemberModel struct { Basic struct { UID string `json:"uid"` Nickname string `json:"nickname"` Introduce string `json:"introduce"` AvatarURL string `json:"avatar_url"` } `json:"basic"` RoleIDList []string `json:"role_id_list"` JoinedAt string `json:"joined_at"` RoleList []MemberRoleModel `json:"role_list"` }
type MemberRoleModel ¶
type MsgContentType ¶
type MsgContentType string
user input message struct wrapper
const ( MsgTypeText MsgContentType = "MHY:Text" MsgTypeImage MsgContentType = "MHY:Image" MsgTypePost MsgContentType = "MHY:Post" )
type MsgEntityLink ¶
type MsgEntityMentionAll ¶
type MsgEntityMentionAll struct {
Text string
}
type MsgEntityMentionRobot ¶
type MsgEntityMentionUser ¶
type MsgEntityType ¶ added in v0.3.0
type MsgEntityType string
const ( MsgEntityMentionRobotType MsgEntityType = "mentioned_robot" MsgEntityMentionUserType MsgEntityType = "mentioned_user" MsgEntityMentionAllType MsgEntityType = "mention_all" MsgEntityVillaRoomLinkType MsgEntityType = "villa_room_link" MsgEntityLinkType MsgEntityType = "link" )
type MsgEntityVillaRoomLink ¶
type MsgInputModel ¶
type MsgInputModel map[string]interface{}
func NewMsg ¶
func NewMsg(msg_type MsgContentType) (MsgInputModel, error)
func (MsgInputModel) AppendText ¶
func (msg MsgInputModel) AppendText(args ...interface{}) error
func (MsgInputModel) Finialize ¶
func (msg MsgInputModel) Finialize(room_id uint64) MsgInputModel
return a deep copy of msg
func (MsgInputModel) SetImage ¶
设置图片消息内容,接受图片url, 图片宽度, 图片高度, 图片大小 4种类型的参数,宽高单位为像素,图片大小单位为字节,不应超过10M
func (MsgInputModel) SetPost ¶
func (msg MsgInputModel) SetPost(post_id string) error
func (MsgInputModel) SetTextQuote ¶
func (msg MsgInputModel) SetTextQuote(quoted_message_id string, quoted_message_send_time int64, original_message_id string, original_message_send_time int64) error
设置引用回复消息,接受被引用消息的id和发送时间
type MsgMentionType ¶
type MsgMentionType uint64
const ( MentionAll MsgMentionType = 1 MentionUser MsgMentionType = 2 )
type SendMessageModel ¶
type SendMessageModel struct { APIBaseModel Data struct { BotMsgId string `json:"bot_msg_id"` } `json:"data"` }
type UploadImageModel ¶ added in v0.4.0
type UploadImageModel struct { APIBaseModel Data struct { NewURL string `json:"new_url"` } `json:"data"` }
type UserInputAudit ¶
type UserInputAudit struct { AuditContent string `json:"audit_content,omitempty"` // 待审核内容,必填 PassThrough string `json:"pass_through,omitempty"` // 透传信息,该字段会在审核结果回调时携带给开发者,选填 UID uint64 `json:"room_id,omitempty"` // 用户id, 必填 RoomID uint64 `json:"uid,omitempty"` // 房间id,选填 }
user input audit struct wrapper
Click to show internal directories.
Click to hide internal directories.