model

package
v0.0.0-...-41468e1 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2023 License: MIT Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddChannelMessageReactionReq

type AddChannelMessageReactionReq struct {
	MessageId string         `json:"messageId" binding:"required"` // 消息 ID
	Emoji     *ReactionEmoji `json:"emoji" binding:"required"`     // 反应表情
}

AddChannelMessageReactionReq 添加表情反应 request

func (*AddChannelMessageReactionReq) ValidParams

func (p *AddChannelMessageReactionReq) ValidParams() error

type AddRoleMemberReq

type AddRoleMemberReq struct {
	IslandSourceId string `json:"islandSourceId" binding:"required"` // 群ID
	DodoSourceId   string `json:"dodoSourceId" binding:"required"`   // DoDoID
	RoleId         string `json:"roleId" binding:"required"`         // 身份组ID
}

AddRoleMemberReq 赋予成员身份组 request

func (*AddRoleMemberReq) ValidParams

func (p *AddRoleMemberReq) ValidParams() error

type BanMemberReq

type BanMemberReq struct {
	IslandSourceId  string `json:"islandSourceId" binding:"required"` // 群ID
	DodoSourceId    string `json:"dodoSourceId" binding:"required"`   // DoDoID
	NoticeChannelId string `json:"noticeChannelId,omitempty"`         // 通知频道ID
	Reason          string `json:"reason,omitempty"`                  // 封禁理由,理由不能大于64个字符或32个汉字
}

BanMemberReq 永久封禁成员 request

func (*BanMemberReq) ValidParams

func (p *BanMemberReq) ValidParams() error

type CardBodyElement

type CardBodyElement struct {
	Type       string        `json:"type" binding:"required"`       // 类型,固定填写 card
	Components []interface{} `json:"components" binding:"required"` // 内容组件
	Theme      string        `json:"theme" binding:"required"`      // 卡片风格,grey,red,orange,yellow ,green,indigo,blue,purple,black,default
	Title      string        `json:"title,omitempty"`               // 卡片标题,只支持普通文本,可以为空字符串
}

CardBodyElement 卡片消息结构体

type CardMessage

type CardMessage struct {
	Content string           `json:"content,omitempty"`       // 附加文本,支持Markdown语法、菱形语法
	Card    *CardBodyElement `json:"card" binding:"required"` // 卡片,限制 10000 个字符,支持 Markdown 语法,不支持菱形语法
}

CardMessage 频道卡片消息内容

func (*CardMessage) MessageType

func (m *CardMessage) MessageType() MessageType

type ChannelElement

type ChannelElement struct {
	ChannelId   string      `json:"channelId"`   // 频道号
	ChannelName string      `json:"channelName"` // 频道名称
	ChannelType ChannelType `json:"channelType"` // 频道类型,1:文字频道,2:语音频道,4:帖子频道,5:链接频道,6:资料频道
	DefaultFlag int         `json:"defaultFlag"` // 默认频道标识,0:否,1:是
	GroupId     string      `json:"groupId"`     // 分组ID
	GroupName   string      `json:"groupName"`   // 分组名称
}

ChannelElement 获取频道列表 list element

type ChannelType

type ChannelType int
const (
	TextChannel    ChannelType = 1
	VoiceChannel   ChannelType = 2
	ArticleChannel ChannelType = 4
	LinkChannel    ChannelType = 5
	ResChannel     ChannelType = 6
)

type CreateChannelReq

type CreateChannelReq struct {
	IslandSourceId string      `json:"islandSourceId" binding:"required"` // 群ID
	ChannelName    string      `json:"channelName"`                       // 频道名称,非必传,不传时默认使用名称`新的频道`,不能大于32个字符或16个汉字
	ChannelType    ChannelType `json:"channelType" binding:"required"`    // 频道类型,1:文字频道,2:语音频道(默认自由模式),4:帖子频道(默认详细模式)
}

CreateChannelReq 创建频道 request

func (*CreateChannelReq) ValidParams

func (p *CreateChannelReq) ValidParams() error

type CreateChannelRsp

type CreateChannelRsp struct {
	ChannelId string `json:"channelId"` // 频道ID
}

CreateChannelRsp 创建频道 response

type CreateRoleReq

type CreateRoleReq struct {
	IslandSourceId string `json:"islandSourceId" binding:"required"` // 群ID
	RoleName       string `json:"roleName,omitempty"`                // 身份组名称,非必传,不传时默认使用`新的身份组`,不能大于32个字符或16个汉字
	RoleColor      string `json:"roleColor,omitempty"`               // 身份组颜色,非必传,不传时默认使用`#333333`,16进制HEX格式颜色码
	Position       int    `json:"position,omitempty"`                // 身份组排序位置,非必传,不传时默认为1,不可传比机器人身份组大的排序值
	Permission     string `json:"permission,omitempty"`              // 身份组权限值(16进制),非必传,不传时默认为0
}

CreateRoleReq 创建身份组 request

func (*CreateRoleReq) ValidParams

func (p *CreateRoleReq) ValidParams() error

type CreateRoleRsp

type CreateRoleRsp struct {
	RoleId string `json:"roleId"`
}

CreateRoleRsp 创建身份组 response

type EditChannelMessageReq

type EditChannelMessageReq struct {
	MessageId   string       `json:"messageId" binding:"required"`   // 欲编辑的消息 ID
	MessageType MessageType  `json:"messageType" binding:"required"` // 消息类型,该参数会在SDK中重新赋值,所以无需开发者主动设值
	MessageBody IMessageBody `json:"messageBody" binding:"required"` // 消息内容
}

EditChannelMessageReq 编辑消息 request

func (*EditChannelMessageReq) ValidParams

func (p *EditChannelMessageReq) ValidParams() error

type EditChannelMessageRsp

type EditChannelMessageRsp struct {
	MessageId string `json:"messageId"` // 消息 ID
}

EditChannelMessageRsp 编辑消息 response

type EditChannelReq

type EditChannelReq struct {
	IslandSourceId string `json:"islandSourceId" binding:"required"` // 群ID
	ChannelId      string `json:"channelId" binding:"required"`      // 频道号
	ChannelName    string `json:"channelName,omitempty"`
}

EditChannelReq 编辑频道 request

func (*EditChannelReq) ValidParams

func (p *EditChannelReq) ValidParams() error

type EditRoleReq

type EditRoleReq struct {
	IslandSourceId string `json:"islandSourceId" binding:"required"` // 群ID
	RoleId         string `json:"roleId" binding:"required"`         // 身份组ID
	RoleName       string `json:"roleName,omitempty"`                // 身份组名称,非必传,不传时默认不改动,不能大于32个字符或16个汉字
	RoleColor      string `json:"roleColor,omitempty"`               // 身份组颜色,非必传,不传时默认不改动,16进制HEX格式颜色码
	Position       int    `json:"position,omitempty"`                // 身份组排序位置,非必传,不传时默认不改动,不可传比机器人身份组大的排序值
	Permission     string `json:"permission,omitempty"`              // 身份组权限值(16进制),非必传,不传时默认不改动
}

EditRoleReq 编辑身份组 request

func (*EditRoleReq) ValidParams

func (p *EditRoleReq) ValidParams() error

type FileMessage

type FileMessage struct {
	Url  string `json:"url" binding:"required"`  // 文件链接
	Name string `json:"name" binding:"required"` // 文件名称
	Size uint64 `json:"size" binding:"required"` // 文件大小
}

FileMessage 频道文件消息内容

func (*FileMessage) MessageType

func (m *FileMessage) MessageType() MessageType

type GetBotInfoRsp

type GetBotInfoRsp struct {
	ClientId     string `json:"clientId"`     // 机器人唯一标识
	DodoSourceId string `json:"dodoSourceId"` // 机器人DoDoID
	NickName     string `json:"nickName"`     // 机器人昵称
	AvatarUrl    string `json:"avatarUrl"`    // 机器人图标
}

GetBotInfoRsp 获取机器人信息 response

type GetBotInviteListReq

type GetBotInviteListReq struct {
	PageSize int   `json:"pageSize"`
	MaxId    int64 `json:"maxId"`
}

GetBotInviteListReq 获取机器人邀请列表 [https://open.imdodo.com/dev/api/bot.html#%E8%8E%B7%E5%8F%96%E6%9C%BA%E5%99%A8%E4%BA%BA%E9%82%80%E8%AF%B7%E5%88%97%E8%A1%A8]

func (*GetBotInviteListReq) ValidParams

func (p *GetBotInviteListReq) ValidParams() error

type GetBotInviteListRsp

type GetBotInviteListRsp struct {
	MaxId int64 `json:"maxId"`
	List  []struct {
		DodoSourceId string `json:"dodoSourceId"`
		NickName     string `json:"nickName"`
		AvatarUrl    string `json:"avatarUrl"`
	} `json:"list"`
}

GetBotInviteListRsp 获取机器人邀请列表 [https://open.imdodo.com/dev/api/bot.html#%E8%8E%B7%E5%8F%96%E6%9C%BA%E5%99%A8%E4%BA%BA%E9%82%80%E8%AF%B7%E5%88%97%E8%A1%A8]

type GetChannelInfoReq

type GetChannelInfoReq struct {
	ChannelId string `json:"channelId" binding:"required"` // 频道号
}

GetChannelInfoReq 获取频道信息 request

func (*GetChannelInfoReq) ValidParams

func (p *GetChannelInfoReq) ValidParams() error

type GetChannelInfoRsp

type GetChannelInfoRsp struct {
	ChannelElement

	IslandSourceId string `json:"islandSourceId"` // 群ID
}

GetChannelInfoRsp 获取频道信息 response

type GetChannelListReq

type GetChannelListReq struct {
	IslandSourceId string `json:"islandSourceId" binding:"required"` // 群ID
}

GetChannelListReq 获取频道列表 request

func (*GetChannelListReq) ValidParams

func (p *GetChannelListReq) ValidParams() error

type GetChannelMessageReactionListReq

type GetChannelMessageReactionListReq struct {
	MessageId string `json:"messageId"`
}

GetChannelMessageReactionListReq 获取消息反应列表 [https://open.imdodo.com/dev/api/channel-text.html#%E8%8E%B7%E5%8F%96%E6%B6%88%E6%81%AF%E5%8F%8D%E5%BA%94%E5%88%97%E8%A1%A8]

func (*GetChannelMessageReactionListReq) ValidParams

func (p *GetChannelMessageReactionListReq) ValidParams() error

type GetChannelMessageReactionListRsp

type GetChannelMessageReactionListRsp struct {
	Count int `json:"count"`
	Emoji struct {
		Id   string `json:"id"`
		Type int    `json:"type"`
	} `json:"emoji"`
}

GetChannelMessageReactionListRsp 获取消息反应列表 [https://open.imdodo.com/dev/api/channel-text.html#%E8%8E%B7%E5%8F%96%E6%B6%88%E6%81%AF%E5%8F%8D%E5%BA%94%E5%88%97%E8%A1%A8]

type GetChannelMessageReactionMemberListReq

type GetChannelMessageReactionMemberListReq struct {
	MessageId string `json:"messageId"`
	Emoji     struct {
		Type int    `json:"type"`
		Id   string `json:"id"`
	} `json:"emoji"`
	PageSize int `json:"pageSize"`
	MaxId    int `json:"maxId"`
}

GetChannelMessageReactionMemberListReq 获取消息反应内成员列表 [https://open.imdodo.com/dev/api/channel-text.html#%E8%8E%B7%E5%8F%96%E6%B6%88%E6%81%AF%E5%8F%8D%E5%BA%94%E5%86%85%E6%88%90%E5%91%98%E5%88%97%E8%A1%A8]

func (*GetChannelMessageReactionMemberListReq) ValidParams

type GetChannelMessageReactionMemberListRsp

type GetChannelMessageReactionMemberListRsp struct {
	List []struct {
		DodoSourceId string `json:"dodoSourceId"`
		NickName     string `json:"nickName"`
	} `json:"list"`
	MaxId int `json:"maxId"`
}

GetChannelMessageReactionMemberListRsp 获取消息反应内成员列表 [https://open.imdodo.com/dev/api/channel-text.html#%E8%8E%B7%E5%8F%96%E6%B6%88%E6%81%AF%E5%8F%8D%E5%BA%94%E5%86%85%E6%88%90%E5%91%98%E5%88%97%E8%A1%A8]

type GetChannelVoiceMemberStatusReq

type GetChannelVoiceMemberStatusReq struct {
	IslandSourceId string `json:"islandSourceId"`
	DodoSourceId   string `json:"dodoSourceId"`
}

GetChannelVoiceMemberStatusReq 获取成员语音频道状态 [https://open.imdodo.com/dev/api/channel-voice.html#%E8%8E%B7%E5%8F%96%E6%88%90%E5%91%98%E8%AF%AD%E9%9F%B3%E9%A2%91%E9%81%93%E7%8A%B6%E6%80%81]

func (*GetChannelVoiceMemberStatusReq) ValidParams

func (p *GetChannelVoiceMemberStatusReq) ValidParams() error

type GetChannelVoiceMemberStatusRsp

type GetChannelVoiceMemberStatusRsp struct {
	ChannelId     string `json:"channelId"`
	MicStatus     int    `json:"micStatus"`
	SpkStatus     int    `json:"spkStatus"`
	MicSortStatus int    `json:"micSortStatus"`
}

GetChannelVoiceMemberStatusRsp 获取成员语音频道状态 [https://open.imdodo.com/dev/api/channel-voice.html#%E8%8E%B7%E5%8F%96%E6%88%90%E5%91%98%E8%AF%AD%E9%9F%B3%E9%A2%91%E9%81%93%E7%8A%B6%E6%80%81]

type GetGiftAccountReq

type GetGiftAccountReq struct {
	IslandSourceId string `json:"islandSourceId"`
}

GetGiftAccountReq 获取群收入 请求 [https://open.imdodo.com/dev/api/gift.html#%E8%8E%B7%E5%8F%96%E7%BE%A4%E6%94%B6%E5%85%A5]

func (*GetGiftAccountReq) ValidParams

func (p *GetGiftAccountReq) ValidParams() error

type GetGiftAccountRsp

type GetGiftAccountRsp struct {
	TotalIncome        float64 `json:"totalIncome"`
	SettlableIncome    float64 `json:"settlableIncome"`
	TransferableIncome float64 `json:"transferableIncome"`
}

GetGiftAccountRsp 获取群收入 响应 [https://open.imdodo.com/dev/api/gift.html#%E8%8E%B7%E5%8F%96%E7%BE%A4%E6%94%B6%E5%85%A5]

type GetGiftGrossValueListReq

type GetGiftGrossValueListReq struct {
	TargetType int    `json:"targetType"`
	TargetId   string `json:"targetId"`
	PageSize   int    `json:"pageSize"`
	MaxId      int    `json:"maxId"`
}

GetGiftGrossValueListReq 获取内容礼物总值列表 请求 [https://open.imdodo.com/dev/api/gift.html#%E8%8E%B7%E5%8F%96%E5%86%85%E5%AE%B9%E7%A4%BC%E7%89%A9%E6%80%BB%E5%80%BC%E5%88%97%E8%A1%A8]

func (*GetGiftGrossValueListReq) ValidParams

func (p *GetGiftGrossValueListReq) ValidParams() error

type GetGiftGrossValueListRsp

type GetGiftGrossValueListRsp struct {
	List []struct {
		DodoSourceId    string  `json:"dodoSourceId"`
		NickName        string  `json:"nickName"`
		GiftTotalAmount float64 `json:"giftTotalAmount"`
	} `json:"list"`
	MaxId int `json:"maxId"`
}

GetGiftGrossValueListRsp 获取内容礼物总值列表 响应 [https://open.imdodo.com/dev/api/gift.html#%E8%8E%B7%E5%8F%96%E5%86%85%E5%AE%B9%E7%A4%BC%E7%89%A9%E6%80%BB%E5%80%BC%E5%88%97%E8%A1%A8]

type GetGiftListReq

type GetGiftListReq struct {
	TargetType int    `json:"targetType"`
	TargetId   string `json:"targetId"`
}

GetGiftListReq 获取内容礼物列表 请求 [https://open.imdodo.com/dev/api/gift.html#%E8%8E%B7%E5%8F%96%E5%86%85%E5%AE%B9%E7%A4%BC%E7%89%A9%E5%88%97%E8%A1%A8]

func (*GetGiftListReq) ValidParams

func (p *GetGiftListReq) ValidParams() error

type GetGiftListRsp

type GetGiftListRsp struct {
	GiftId          string  `json:"giftId"`
	GiftCount       int     `json:"giftCount"`
	GiftTotalAmount float64 `json:"giftTotalAmount"`
}

GetGiftListRsp 获取内容礼物列表 响应 [https://open.imdodo.com/dev/api/gift.html#%E8%8E%B7%E5%8F%96%E5%86%85%E5%AE%B9%E7%A4%BC%E7%89%A9%E5%88%97%E8%A1%A8]

type GetGiftMemberListReq

type GetGiftMemberListReq struct {
	TargetType int    `json:"targetType"`
	TargetId   string `json:"targetId"`
	GiftId     string `json:"giftId"`
	PageSize   int    `json:"pageSize"`
	MaxId      int    `json:"maxId"`
}

GetGiftMemberListReq 获取内容礼物内成员列表 请求 [https://open.imdodo.com/dev/api/gift.html#%E8%8E%B7%E5%8F%96%E5%86%85%E5%AE%B9%E7%A4%BC%E7%89%A9%E5%86%85%E6%88%90%E5%91%98%E5%88%97%E8%A1%A8]

func (*GetGiftMemberListReq) ValidParams

func (p *GetGiftMemberListReq) ValidParams() error

type GetGiftMemberListRsp

type GetGiftMemberListRsp struct {
	List []struct {
		DodoSourceId string `json:"dodoSourceId"`
		NickName     string `json:"nickName"`
		GiftCount    int    `json:"giftCount"`
	} `json:"list"`
	MaxId int `json:"maxId"`
}

GetGiftMemberListRsp 获取内容礼物内成员列表 响应 [https://open.imdodo.com/dev/api/gift.html#%E8%8E%B7%E5%8F%96%E5%86%85%E5%AE%B9%E7%A4%BC%E7%89%A9%E5%86%85%E6%88%90%E5%91%98%E5%88%97%E8%A1%A8]

type GetGiftShareRatioInfoReq

type GetGiftShareRatioInfoReq struct {
	IslandSourceId string `json:"islandSourceId"`
}

GetGiftShareRatioInfoReq 获取成员分成管理 请求 [https://open.imdodo.com/dev/api/gift.html#%E8%8E%B7%E5%8F%96%E6%88%90%E5%91%98%E5%88%86%E6%88%90%E7%AE%A1%E7%90%86]

func (*GetGiftShareRatioInfoReq) ValidParams

func (p *GetGiftShareRatioInfoReq) ValidParams() error

type GetGiftShareRatioInfoRsp

type GetGiftShareRatioInfoRsp struct {
	DefaultRatio struct {
		IslandRatio   float64 `json:"islandRatio"`
		UserRatio     float64 `json:"userRatio"`
		PlatformRatio float64 `json:"platformRatio"`
	} `json:"defaultRatio"`
	RoleRatioList []struct {
		RoleId        string  `json:"roleId"`
		RoleName      string  `json:"roleName"`
		IslandRatio   float64 `json:"islandRatio"`
		UserRatio     float64 `json:"userRatio"`
		PlatformRatio float64 `json:"platformRatio"`
	} `json:"roleRatioList"`
}

GetGiftShareRatioInfoRsp 获取成员分成管理 响应 [https://open.imdodo.com/dev/api/gift.html#%E8%8E%B7%E5%8F%96%E6%88%90%E5%91%98%E5%88%86%E6%88%90%E7%AE%A1%E7%90%86]

type GetIslandBanElement

type GetIslandBanElement struct {
	DodoSourceId string `json:"dodoSourceId"` // DoDoID
}

GetIslandBanElement 获取群封禁名单 list element

type GetIslandBanListReq

type GetIslandBanListReq struct {
	IslandSourceId string `json:"islandSourceId" binding:"required"` // 群ID
	PageSize       int    `json:"pageSize" binding:"required"`       // 页大小,最大100
	MaxId          uint64 `json:"maxId" binding:"required"`          // 上一页最大 ID 值,为提升分页查询性能,需要传入上一页查询记录中的最大 ID 值,首页请传 0
}

GetIslandBanListReq 获取群封禁名单 request

func (*GetIslandBanListReq) ValidParams

func (p *GetIslandBanListReq) ValidParams() error

type GetIslandBanListRsp

type GetIslandBanListRsp struct {
	MaxId uint64                 `json:"maxId"` // 最大 ID 值
	List  []*GetIslandBanElement `json:"list"`  // 数据列表
}

GetIslandBanListRsp 获取群封禁名单 response

type GetIslandInfoReq

type GetIslandInfoReq struct {
	IslandSourceId string `json:"islandSourceId" binding:"required"` // 群ID
}

GetIslandInfoReq 获取群信息 request

func (*GetIslandInfoReq) ValidParams

func (p *GetIslandInfoReq) ValidParams() error

type GetIslandInfoRsp

type GetIslandInfoRsp struct {
	IslandElement

	Description string `json:"description"` // 群描述
}

GetIslandInfoRsp 获取群信息 response

type GetIslandLevelRankElement

type GetIslandLevelRankElement struct {
	DodoSourceId string `json:"dodoSourceId"` // DoDoID
	NickName     string `json:"nickName"`     // 群昵称
	Level        int    `json:"level"`        // 等级
	Rank         int    `json:"rank"`         // 排名,返回前100名
}

GetIslandLevelRankElement 获取群等级排行榜 list element

type GetIslandLevelRankListReq

type GetIslandLevelRankListReq struct {
	IslandSourceId string `json:"islandSourceId" binding:"required"` // 群ID
}

GetIslandLevelRankListReq 获取群等级排行榜 request

func (*GetIslandLevelRankListReq) ValidParams

func (p *GetIslandLevelRankListReq) ValidParams() error

type GetIslandListReq

type GetIslandListReq struct {
}

GetIslandListReq 获取群列表 request

type GetIslandMuteElement

type GetIslandMuteElement struct {
	DodoSourceId string `json:"dodoSourceId"` // DoDoID
}

GetIslandMuteElement 获取群禁言名单 list element

type GetIslandMuteListReq

type GetIslandMuteListReq struct {
	IslandSourceId string `json:"islandSourceId" binding:"required"` // 群ID
	PageSize       int    `json:"pageSize" binding:"required"`       // 页大小,最大100
	MaxId          uint64 `json:"maxId" binding:"required"`          // 上一页最大 ID 值,为提升分页查询性能,需要传入上一页查询记录中的最大 ID 值,首页请传 0
}

GetIslandMuteListReq 获取群禁言名单 request

func (*GetIslandMuteListReq) ValidParams

func (p *GetIslandMuteListReq) ValidParams() error

type GetIslandMuteListRsp

type GetIslandMuteListRsp struct {
	MaxId uint64                  `json:"maxId"` // 最大 ID 值
	List  []*GetIslandMuteElement `json:"list"`  // 数据列表
}

GetIslandMuteListRsp 获取群禁言名单 response

type GetMemberInfoReq

type GetMemberInfoReq struct {
	IslandSourceId string `json:"islandSourceId" binding:"required"` // 群ID
	DodoSourceId   string `json:"dodoSourceId" binding:"required"`   // DoDoID
}

GetMemberInfoReq 获取成员信息 request

func (*GetMemberInfoReq) ValidParams

func (p *GetMemberInfoReq) ValidParams() error

type GetMemberInfoRsp

type GetMemberInfoRsp struct {
	MemberElement
	IslandSourceId string `json:"islandSourceId"` // 群ID
}

GetMemberInfoRsp 获取成员信息 response

type GetMemberInviteInfoReq

type GetMemberInviteInfoReq struct {
	IslandSourceId string `json:"islandSourceId" binding:"required"` // 群ID
	DodoSourceId   string `json:"dodoSourceId" binding:"required"`   // DoDoID
}

GetMemberInviteInfoReq 获取成员邀请信息 request

func (*GetMemberInviteInfoReq) ValidParams

func (p *GetMemberInviteInfoReq) ValidParams() error

type GetMemberInviteInfoRsp

type GetMemberInviteInfoRsp struct {
	DodoSourceId    string `json:"dodoSourceId"`    // DoDoID
	NickName        string `json:"nickName"`        // 在群昵称
	InvitationCount int    `json:"invitationCount"` // 邀请人数
}

GetMemberInviteInfoRsp 获取成员邀请信息 response

type GetMemberListReq

type GetMemberListReq struct {
	IslandSourceId string `json:"islandSourceId" binding:"required"` // 群ID
	PageSize       int    `json:"pageSize" binding:"required"`       // 页大小,最大100
	MaxId          uint64 `json:"maxId" binding:"required"`          // 上一页最大ID值,为提升分页查询性能,需要传入上一页查询记录中的最大ID值,首页请传0
}

GetMemberListReq 获取成员列表 request

func (*GetMemberListReq) ValidParams

func (p *GetMemberListReq) ValidParams() error

type GetMemberListRsp

type GetMemberListRsp struct {
	MaxId uint64           `json:"maxId"` // 最大 ID 值
	List  []*MemberElement `json:"list"`  // 列表
}

GetMemberListRsp 获取成员列表 response

type GetMemberNFTStatusReq

type GetMemberNFTStatusReq struct {
	IslandSourceId string `json:"islandSourceId" binding:"required"` // 群ID
	DodoSourceId   string `json:"dodoSourceId" binding:"required"`   // DoDoID
	Platform       string `json:"platform" binding:"required"`       // 数藏平台,upower:高能链,ubanquan:优版权,metamask:Opensea
	Issuer         string `json:"issuer,omitempty"`                  // 发行方,若填写了系列,则发行方必填
	Series         string `json:"series,omitempty"`                  // 系列
}

GetMemberNFTStatusReq 获取成员数字藏品判断 request

func (*GetMemberNFTStatusReq) ValidParams

func (p *GetMemberNFTStatusReq) ValidParams() error

type GetMemberNFTStatusRsp

type GetMemberNFTStatusRsp struct {
	IsBandPlatform int `json:"isBandPlatform"` // 是否已绑定该数藏平台,0:否,1:是
	IsHaveIssuer   int `json:"isHaveIssuer"`   // 是否拥有该发行方的NFT,0:否,1:是
	IsHaveSeries   int `json:"isHaveSeries"`   // 是否拥有该系列的NFT,0:否,1:是
}

GetMemberNFTStatusRsp 获取成员数字藏品判断 response

type GetMemberRoleListReq

type GetMemberRoleListReq struct {
	IslandSourceId string `json:"islandSourceId" binding:"required"` // 群ID
	DodoSourceId   string `json:"dodoSourceId" binding:"required"`   // DoDoID
}

GetMemberRoleListReq 获取成员身份组列表 request

func (*GetMemberRoleListReq) ValidParams

func (p *GetMemberRoleListReq) ValidParams() error

type GetMemberUPowerchainInfoReq

type GetMemberUPowerchainInfoReq struct {
	IslandSourceId string `json:"islandSourceId" binding:"required"` // 群ID
	DodoSourceId   string `json:"dodoSourceId" binding:"required"`   // DoDoID
	Issuer         string `json:"issuer" binding:"required"`         // 发行商
	Series         string `json:"series,omitempty"`                  // 系列
}

GetMemberUPowerchainInfoReq 取成员高能链数字藏品信息 request

func (*GetMemberUPowerchainInfoReq) ValidParams

func (p *GetMemberUPowerchainInfoReq) ValidParams() error

type GetMemberUPowerchainInfoRsp

type GetMemberUPowerchainInfoRsp struct {
	DodoSourceId     string `json:"dodoSourceId"`     // DoDoID
	NickName         string `json:"nickName"`         // 在群昵称
	PersonalNickName string `json:"personalNickName"` // 个人昵称
	IsHaveIssuer     int    `json:"isHaveIssuer"`     // 是否拥有该发行方的NFT,0:否,1:是
	IsHaveSeries     int    `json:"isHaveSeries"`     // 是否拥有该系列的NFT,0:否,1:是
	NftCount         int    `json:"nftCount"`         // 拥有的该系列下NFT数量
}

GetMemberUPowerchainInfoRsp 取成员高能链数字藏品信息 response

type GetRoleListReq

type GetRoleListReq struct {
	IslandSourceId string `json:"islandSourceId" binding:"required"` // 群ID
}

GetRoleListReq 获取身份组列表 request

func (*GetRoleListReq) ValidParams

func (p *GetRoleListReq) ValidParams() error

type GetRoleMemberListReq

type GetRoleMemberListReq struct {
	IslandSourceId string `json:"islandSourceId"`
	RoleId         string `json:"roleId"`
	PageSize       int    `json:"pageSize"`
	MaxId          int    `json:"maxId"`
}

GetRoleMemberListReq 获取身份组成员列表 请求 [https://open.imdodo.com/dev/api/role.html#%E8%8E%B7%E5%8F%96%E8%BA%AB%E4%BB%BD%E7%BB%84%E6%88%90%E5%91%98%E5%88%97%E8%A1%A8]

func (*GetRoleMemberListReq) ValidParams

func (p *GetRoleMemberListReq) ValidParams() error

type GetRoleMemberListRsp

type GetRoleMemberListRsp struct {
	List []struct {
		DodoSourceId string `json:"dodoSourceId"`
		NickName     string `json:"nickName"`
	} `json:"list"`
	MaxId int `json:"maxId"`
}

GetRoleMemberListRsp 获取身份组成员列表 响应 [https://open.imdodo.com/dev/api/role.html#%E8%8E%B7%E5%8F%96%E8%BA%AB%E4%BB%BD%E7%BB%84%E6%88%90%E5%91%98%E5%88%97%E8%A1%A8]

type GetWebsocketConnectionReq

type GetWebsocketConnectionReq struct {
}

GetWebsocketConnectionReq 获取 Websocket 连接 request

type GetWebsocketConnectionRsp

type GetWebsocketConnectionRsp struct {
	Endpoint string `json:"endpoint"` // 连接节点
}

GetWebsocketConnectionRsp 获取 Websocket 连接 response

type IMessageBody

type IMessageBody interface {
	MessageType() MessageType // 获取消息类型
}

IMessageBody 消息内容

type ImageMessage

type ImageMessage struct {
	Url        string `json:"url" binding:"required"`    // 图片链接,必须是官方的
	Width      int    `json:"width" binding:"required"`  // 图片宽度
	Height     int    `json:"height" binding:"required"` // 图片高度
	IsOriginal int    `json:"isOriginal,omitempty"`      // 是否原图,0:压缩图,1:原图
}

ImageMessage 频道图片消息内容

func (*ImageMessage) MessageType

func (m *ImageMessage) MessageType() MessageType

type IslandElement

type IslandElement struct {
	IslandSourceId    string `json:"islandSourceId"`    // 群ID
	IslandName        string `json:"islandName"`        // 群名称
	CoverUrl          string `json:"coverUrl"`          // 群头像
	MemberCount       int    `json:"memberCount"`       // 成员数
	OnlineMemberCount int    `json:"onlineMemberCount"` // 在线成员数
	DefaultChannelId  string `json:"defaultChannelId"`  // 默认进入频道
	SystemChannelId   string `json:"systemChannelId"`   // 系统消息频道
}

IslandElement 获取群列表 list element

type MemberElement

type MemberElement struct {
	DodoSourceId     string `json:"dodoSourceId"`     // DoDoID
	NickName         string `json:"nickName"`         // 在群昵称
	PersonalNickName string `json:"personalNickName"` // DoDo昵称
	AvatarUrl        string `json:"avatarUrl"`        // 头像
	JoinTime         string `json:"joinTime"`         // 加群时间
	Sex              int    `json:"sex"`              // 性别,-1:保密,0:女,1:男
	Level            int    `json:"level"`            // 等级
	IsBot            int    `json:"isBot"`            // 是否机器人,0:否,1:是
	OnlineDevice     int    `json:"onlineDevice"`     // 在线设备,0:无,1:PC在线,2:手机在线
	OnlineStatus     int    `json:"onlineStatus"`     // 在线状态,0:离线,1:在线,2:请勿打扰,3:离开
}

MemberElement 获取成员列表 list element

type MessageType

type MessageType int
const (
	TextMsg  MessageType = 1 // 频道文本消息
	ImageMsg MessageType = 2 // 频道图片消息
	VideoMsg MessageType = 3 // 频道视频消息
	FileMsg  MessageType = 5 // 频道文件消息
	CardMsg  MessageType = 6 // 频道卡片消息
	Unknown  MessageType = 0 // 未知格式消息
)

type MuteMemberReq

type MuteMemberReq struct {
	IslandSourceId string `json:"islandSourceId" binding:"required"` // 群ID
	DodoSourceId   string `json:"dodoSourceId" binding:"required"`   // DoDoID
	Duration       int64  `json:"duration" binding:"required"`       // 禁言时长(单位:秒),最长 7 天
	Reason         string `json:"reason,omitempty"`                  // 禁言原因
}

MuteMemberReq 禁言成员 request

func (*MuteMemberReq) ValidParams

func (p *MuteMemberReq) ValidParams() error

type OpenAPIRsp

type OpenAPIRsp struct {
	Status  int                 `json:"status"`
	Message string              `json:"message"`
	Data    jsoniter.RawMessage `json:"data"`
}

OpenAPIRsp wrapped OpenAPI RPC response

type ReactionEmoji

type ReactionEmoji struct {
	Type int    `json:"type"` // 表情类型,1:Emoji
	Id   string `json:"id"`   // 表情 ID
}

ReactionEmoji 表情内容 表情 ID 参考文档:https://open.imdodo.com/api/message/emoji.html#%E8%A1%A8%E6%83%85%E5%86%85%E5%AE%B9

type ReactionTarget

type ReactionTarget struct {
	Type int    `json:"type"` // 对象类型,0:消息
	Id   string `json:"id"`   // 对象ID,若对象类型为0,则代表消息ID
}

ReactionTarget 反映对象

type RemChannelMessageReactionReq

type RemChannelMessageReactionReq struct {
	MessageId    string         `json:"messageId" binding:"required"` // 消息 ID
	Emoji        *ReactionEmoji `json:"emoji" binding:"required"`     // 反应表情
	DodoSourceId string         `json:"dodoSourceId,omitempty"`       // DoDoID,不传或传空时表示移除机器人自身的反应
}

RemChannelMessageReactionReq 取消表情反应 request

func (*RemChannelMessageReactionReq) ValidParams

func (p *RemChannelMessageReactionReq) ValidParams() error

type RemoveChannelReq

type RemoveChannelReq struct {
	IslandSourceId string `json:"islandSourceId" binding:"required"` // 群ID
	ChannelId      string `json:"channelId" binding:"required"`      // 频道号
}

RemoveChannelReq 删除频道 request

func (*RemoveChannelReq) ValidParams

func (p *RemoveChannelReq) ValidParams() error

type RemoveRoleMemberReq

type RemoveRoleMemberReq struct {
	IslandSourceId string `json:"islandSourceId" binding:"required"` // 群ID
	DodoSourceId   string `json:"dodoSourceId" binding:"required"`   // DoDoID
	RoleId         string `json:"roleId" binding:"required"`         // 身份组ID
}

RemoveRoleMemberReq 取消成员身份组 request

func (*RemoveRoleMemberReq) ValidParams

func (p *RemoveRoleMemberReq) ValidParams() error

type RemoveRoleReq

type RemoveRoleReq struct {
	IslandSourceId string `json:"islandSourceId" binding:"required"` // 群ID
	RoleId         string `json:"roleId" binding:"required"`         // 身份组ID
}

RemoveRoleReq 删除身份组 request

func (*RemoveRoleReq) ValidParams

func (p *RemoveRoleReq) ValidParams() error

type RoleElement

type RoleElement struct {
	RoleId      string `json:"roleId"`      // 身份组ID
	RoleName    string `json:"roleName"`    // 身份组名称
	RoleColor   string `json:"roleColor"`   // 身份组颜色,例:#ffffff
	Position    int    `json:"position"`    // 身份组排序位置
	Permission  string `json:"permission"`  // 身份组权限值,16进制
	MemberCount int    `json:"memberCount"` // 身份组成员数
}

RoleElement 身份组数据对象 list element

type SendChannelMessageReq

type SendChannelMessageReq struct {
	ChannelId           string       `json:"channelId" binding:"required"`   // 频道号
	MessageType         MessageType  `json:"messageType" binding:"required"` // 消息类型,该参数会在SDK中重新赋值,所以无需开发者主动设值
	MessageBody         IMessageBody `json:"messageBody" binding:"required"` // 消息内容
	ReferencedMessageId string       `json:"referencedMessageId,omitempty"`  // 回复消息ID
	DodoSourceId        string       `json:"dodoSourceId,omitempty"`         // DoDoID,非必传,如果传了,则给该成员发送频道私信
}

SendChannelMessageReq 发送消息 request

func (*SendChannelMessageReq) ValidParams

func (p *SendChannelMessageReq) ValidParams() error

type SendChannelMessageRsp

type SendChannelMessageRsp struct {
	MessageId string `json:"messageId"` // 消息 ID
}

SendChannelMessageRsp 发送消息 response

type SendDirectMessageReq

type SendDirectMessageReq struct {
	IslandSourceId string       `json:"islandSourceId" binding:"required"` // 来源群ID,可自行指定,亦可从私信事件中获取
	DodoSourceId   string       `json:"dodoSourceId" binding:"required"`   // DoDoID
	MessageType    MessageType  `json:"messageType" binding:"required"`    // 消息类型,该参数会在SDK中重新赋值,所以无需开发者主动设值
	MessageBody    IMessageBody `json:"messageBody" binding:"required"`    // 消息内容
}

SendDirectMessageReq 发送私信 request

func (*SendDirectMessageReq) ValidParams

func (p *SendDirectMessageReq) ValidParams() error

type SendDirectMessageRsp

type SendDirectMessageRsp struct {
	MessageId string `json:"messageId"` // 消息 ID
}

SendDirectMessageRsp 发送私信 response

type SetBotInviteAddReq

type SetBotInviteAddReq struct {
	DodoSourceId string `json:"dodoSourceId"`
}

SetBotInviteAddReq 添加成员到机器人邀请列表 请求 [https://open.imdodo.com/dev/api/bot.html#%E6%B7%BB%E5%8A%A0%E6%88%90%E5%91%98%E5%88%B0%E6%9C%BA%E5%99%A8%E4%BA%BA%E9%82%80%E8%AF%B7%E5%88%97%E8%A1%A8]

func (*SetBotInviteAddReq) ValidParams

func (p *SetBotInviteAddReq) ValidParams() error

type SetBotInviteRemoveReq

type SetBotInviteRemoveReq struct {
	DodoSourceId string `json:"dodoSourceId"`
}

SetBotInviteRemoveReq 移除成员出机器人邀请列表 请求 [https://open.imdodo.com/dev/api/bot.html#%E7%A7%BB%E9%99%A4%E6%88%90%E5%91%98%E5%87%BA%E6%9C%BA%E5%99%A8%E4%BA%BA%E9%82%80%E8%AF%B7%E5%88%97%E8%A1%A8]

func (*SetBotInviteRemoveReq) ValidParams

func (p *SetBotInviteRemoveReq) ValidParams() error

type SetBotLeaveIslandReq

type SetBotLeaveIslandReq struct {
	IslandSourceId string `json:"islandSourceId" binding:"required"` // 群ID
}

SetBotLeaveIslandReq 机器人退群 request

func (*SetBotLeaveIslandReq) ValidParams

func (p *SetBotLeaveIslandReq) ValidParams() error

type SetChannelArticleAddReq

type SetChannelArticleAddReq struct {
	ChannelId string `json:"channelId"`
	Title     string `json:"title"`
	Content   string `json:"content"`
	ImageUrl  string `json:"imageUrl"`
}

SetChannelArticleAddReq 发布帖子 [https://open.imdodo.com/dev/api/channel-article.html#%E5%8F%91%E5%B8%83%E5%B8%96%E5%AD%90]

func (*SetChannelArticleAddReq) ValidParams

func (p *SetChannelArticleAddReq) ValidParams() error

type SetChannelArticleAddRsp

type SetChannelArticleAddRsp struct {
	ArticleId string `json:"articleId"`
}

SetChannelArticleAddRsp 发布帖子 [https://open.imdodo.com/dev/api/channel-article.html#%E5%8F%91%E5%B8%83%E5%B8%96%E5%AD%90]

type SetChannelArticleRemoveReq

type SetChannelArticleRemoveReq struct {
	ChannelId string `json:"channelId"`
	Type      int    `json:"type"`
	Id        string `json:"id"`
}

SetChannelArticleRemoveReq 删除帖子评论回复 [https://open.imdodo.com/dev/api/channel-article.html#%E5%88%A0%E9%99%A4%E5%B8%96%E5%AD%90%E8%AF%84%E8%AE%BA%E5%9B%9E%E5%A4%8D]

func (*SetChannelArticleRemoveReq) ValidParams

func (p *SetChannelArticleRemoveReq) ValidParams() error

type SetChannelMessageTopReq

type SetChannelMessageTopReq struct {
	MessageId   string `json:"messageId"`
	OperateType int    `json:"operateType"`
}

SetChannelMessageTopReq 置顶消息 [https://open.imdodo.com/dev/api/channel-text.html#%E7%BD%AE%E9%A1%B6%E6%B6%88%E6%81%AF]

func (*SetChannelMessageTopReq) ValidParams

func (p *SetChannelMessageTopReq) ValidParams() error

type SetChannelVoiceMemberEditReq

type SetChannelVoiceMemberEditReq struct {
	ChannelId    string `json:"channelId"`
	DodoSourceId string `json:"dodoSourceId"`
	OperateType  int    `json:"operateType"`
}

SetChannelVoiceMemberEditReq 管理语音中的成员 [https://open.imdodo.com/dev/api/channel-voice.html#%E7%AE%A1%E7%90%86%E8%AF%AD%E9%9F%B3%E4%B8%AD%E7%9A%84%E6%88%90%E5%91%98]

func (*SetChannelVoiceMemberEditReq) ValidParams

func (p *SetChannelVoiceMemberEditReq) ValidParams() error

type SetChannelVoiceMemberMoveReq

type SetChannelVoiceMemberMoveReq struct {
	IslandSourceId string `json:"islandSourceId"`
	DodoSourceId   string `json:"dodoSourceId"`
	ChannelId      string `json:"channelId"`
}

SetChannelVoiceMemberMoveReq 移动语音频道成员 [https://open.imdodo.com/dev/api/channel-voice.html#%E7%A7%BB%E5%8A%A8%E8%AF%AD%E9%9F%B3%E9%A2%91%E9%81%93%E6%88%90%E5%91%98]

func (*SetChannelVoiceMemberMoveReq) ValidParams

func (p *SetChannelVoiceMemberMoveReq) ValidParams() error

type SetMemberNickReq

type SetMemberNickReq struct {
	IslandSourceId string `json:"islandSourceId" binding:"required"` // 群ID
	DodoSourceId   string `json:"dodoSourceId" binding:"required"`   // DoDoID
	NickName       string `json:"nickName" binding:"required"`       // 在群昵称
}

SetMemberNickReq 编辑成员群昵称 request

func (*SetMemberNickReq) ValidParams

func (p *SetMemberNickReq) ValidParams() error

type TextMessage

type TextMessage struct {
	Content string `json:"content" binding:"required"` // 文本内容
}

TextMessage 频道文本消息内容

func (*TextMessage) MessageType

func (m *TextMessage) MessageType() MessageType

type UnbanMemberReq

type UnbanMemberReq struct {
	IslandSourceId string `json:"islandSourceId" binding:"required"` // 群ID
	DodoSourceId   string `json:"dodoSourceId" binding:"required"`   // DoDoID
}

UnbanMemberReq 取消成员永久封禁 request

func (*UnbanMemberReq) ValidParams

func (p *UnbanMemberReq) ValidParams() error

type UnknownMessage

type UnknownMessage struct {
}

UnknownMessage 未知格式消息内容

func (*UnknownMessage) MessageType

func (m *UnknownMessage) MessageType() MessageType

type UnmuteMemberReq

type UnmuteMemberReq struct {
	IslandSourceId string `json:"islandSourceId" binding:"required"` // 群ID
	DodoSourceId   string `json:"dodoSourceId" binding:"required"`   // DoDoID
}

UnmuteMemberReq 取消禁言成员 request

func (*UnmuteMemberReq) ValidParams

func (p *UnmuteMemberReq) ValidParams() error

type UploadImageByBytesReq

type UploadImageByBytesReq struct {
	Filename string `binding:"required"` // 文件名
	Bytes    []byte `binding:"required"` // 文件字节数组
}

UploadImageByBytesReq 上传图片资源(字节方式) request

func (*UploadImageByBytesReq) ValidParams

func (p *UploadImageByBytesReq) ValidParams() error

type UploadImageByPathReq

type UploadImageByPathReq struct {
	Path string `binding:"required"` // 文件绝对路径
}

UploadImageByPathReq 上传图片资源(路径方式) request

func (*UploadImageByPathReq) ValidParams

func (p *UploadImageByPathReq) ValidParams() error

type UploadImageRsp

type UploadImageRsp struct {
	Url    string `json:"url"`    // 图片链接
	Width  int    `json:"width"`  // 图片宽度
	Height int    `json:"height"` // 图片高度
}

UploadImageRsp 上传图片资源 response

type Validator

type Validator interface {
	ValidParams() error
}

Validator request payload validator

type VideoMessage

type VideoMessage struct {
	Url      string `json:"url" binding:"required"` // 视频链接,必须是官方的(后期会提供视频上传接口,前期可通过DoDo群内上传资源,事件内接收消息,从而获取到官方资源链接)
	CoverUrl string `json:"coverUrl,omitempty"`     // 封面链接,必须是官方的
	Duration uint64 `json:"duration,omitempty"`     // 视频时长
	Size     uint64 `json:"size,omitempty"`         // 视频大小
}

VideoMessage 频道视频消息内容

func (*VideoMessage) MessageType

func (m *VideoMessage) MessageType() MessageType

type WithdrawChannelMessageReq

type WithdrawChannelMessageReq struct {
	MessageId string `json:"messageId" binding:"required"` // 消息ID
	Reason    string `json:"reason,omitempty"`             // 撤回原因
}

WithdrawChannelMessageReq 撤回消息 request

func (*WithdrawChannelMessageReq) ValidParams

func (p *WithdrawChannelMessageReq) ValidParams() error

Jump to

Keyboard shortcuts

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