✨ 初始化项目
This commit is contained in:
39
profile/types.go
Normal file
39
profile/types.go
Normal file
@@ -0,0 +1,39 @@
|
||||
/**
|
||||
* @Author: Echo
|
||||
* @Author:1711788888@qq.com
|
||||
* @Date: 2021/5/29 17:38
|
||||
* @Desc: 资料管理结构体定义
|
||||
*/
|
||||
|
||||
package profile
|
||||
|
||||
import "git.echol.cn/loser/tencent-im/internal/types"
|
||||
|
||||
type (
|
||||
// 设置资料(请求)
|
||||
setProfileReq struct {
|
||||
UserId string `json:"From_Account"` // (必填)需要设置该 UserID 的资料
|
||||
Attrs []*types.TagPair `json:"ProfileItem"` // (必填)待设置的用户的资料对象数组
|
||||
}
|
||||
|
||||
// 获取资料(请求)
|
||||
getProfileReq struct {
|
||||
UserIds []string `json:"To_Account"` // (必填)需要拉取这些UserID的资料
|
||||
TagList []string `json:"TagList"` // (必填)指定要拉取的资料字段的 Tag,支持的字段有
|
||||
}
|
||||
|
||||
// 获取资料(响应)
|
||||
getProfileResp struct {
|
||||
types.ActionBaseResp
|
||||
ErrorDisplay string `json:"ErrorDisplay"` // 详细的客户端展示信息
|
||||
UserProfiles []UserProfile `json:"UserProfileItem"` // 用户资料结构化信息
|
||||
}
|
||||
|
||||
// UserProfile 用户资料
|
||||
UserProfile struct {
|
||||
UserId string `json:"To_Account"` // 用户的UserID
|
||||
Profile []types.TagPair `json:"ProfileItem"` // 用户的资料对象数组
|
||||
ResultCode int `json:"ResultCode"` // 处理结果,0表示成功,非0表示失败
|
||||
ResultInfo string `json:"ResultInfo"` // 错误描述信息,成功时该字段为空
|
||||
}
|
||||
)
|
Reference in New Issue
Block a user