Files
open-im-server/pkg/base_info/friend_api_struct.go
T

138 lines
3.1 KiB
Go
Raw Normal View History

2021-12-26 18:47:11 +08:00
package base_info
import open_im_sdk "Open_IM/pkg/proto/sdk_ws"
2021-12-29 10:32:26 +08:00
type ParamsCommFriend struct {
2021-12-26 18:47:11 +08:00
OperationID string `json:"operationID" binding:"required"`
ToUserID string `json:"toUserID" binding:"required"`
FromUserID string `json:"fromUserID" binding:"required"`
}
type AddBlacklistReq struct {
2021-12-29 10:32:26 +08:00
ParamsCommFriend
2021-12-26 18:47:11 +08:00
}
type AddBlacklistResp struct {
CommResp
}
type ImportFriendReq struct {
FriendUserIDList []string `json:"friendUserIDList" binding:"required"`
OperationID string `json:"operationID" binding:"required"`
FromUserID string `json:"fromUserID" binding:"required"`
}
2021-12-29 16:17:55 +08:00
type UserIDResult struct {
UserID string `json:"userID" binding:"required"`
Result int32 `json:"result" binding:"required"`
}
2021-12-26 18:47:11 +08:00
type ImportFriendResp struct {
CommResp
2021-12-29 16:17:55 +08:00
UserIDResultList []UserIDResult `json:"data"`
2021-12-26 18:47:11 +08:00
}
type AddFriendReq struct {
2021-12-29 10:32:26 +08:00
ParamsCommFriend
2021-12-26 18:47:11 +08:00
ReqMsg string `json:"reqMsg"`
}
type AddFriendResp struct {
CommResp
}
type AddFriendResponseReq struct {
2021-12-29 10:32:26 +08:00
ParamsCommFriend
2021-12-29 13:30:50 +08:00
//binding:"oneof=0 1 2"`
//}
2021-12-29 13:34:13 +08:00
Flag int32 `json:"flag" binding:"required,oneof=-1 0 1"`
2021-12-26 18:47:11 +08:00
HandleMsg string `json:"handleMsg"`
}
type AddFriendResponseResp struct {
CommResp
}
type DeleteFriendReq struct {
2021-12-29 10:32:26 +08:00
ParamsCommFriend
2021-12-26 18:47:11 +08:00
}
type DeleteFriendResp struct {
CommResp
}
type GetBlackListReq struct {
2021-12-29 11:16:23 +08:00
OperationID string `json:"operationID" binding:"required"`
FromUserID string `json:"fromUserID" binding:"required"`
2021-12-26 18:47:11 +08:00
}
type GetBlackListResp struct {
CommResp
2021-12-28 18:33:36 +08:00
BlackUserInfoList []*BlackUserInfo `json:"data"`
2021-12-26 18:47:11 +08:00
}
//type PublicUserInfo struct {
// UserID string `json:"userID"`
// Nickname string `json:"nickname"`
// FaceUrl string `json:"faceUrl"`
// Gender int32 `json:"gender"`
//}
2021-12-28 18:33:36 +08:00
type BlackUserInfo struct {
2021-12-26 18:47:11 +08:00
open_im_sdk.PublicUserInfo
}
2021-12-29 14:25:39 +08:00
type SetFriendRemarkReq struct {
2021-12-29 10:32:26 +08:00
ParamsCommFriend
2021-12-26 18:47:11 +08:00
Remark string `json:"remark" binding:"required"`
}
2021-12-29 14:25:39 +08:00
type SetFriendRemarkResp struct {
2021-12-26 18:47:11 +08:00
CommResp
}
type RemoveBlackListReq struct {
2021-12-29 10:32:26 +08:00
ParamsCommFriend
2021-12-26 18:47:11 +08:00
}
type RemoveBlackListResp struct {
CommResp
}
type IsFriendReq struct {
2021-12-29 10:32:26 +08:00
ParamsCommFriend
2021-12-26 18:47:11 +08:00
}
2021-12-29 14:57:36 +08:00
type Response struct {
Friend bool `json:"isFriend"`
}
2021-12-26 18:47:11 +08:00
type IsFriendResp struct {
CommResp
2021-12-29 14:57:36 +08:00
Response Response `json:"data"`
2021-12-26 18:47:11 +08:00
}
type GetFriendsInfoReq struct {
2021-12-29 10:32:26 +08:00
ParamsCommFriend
2021-12-26 18:47:11 +08:00
}
type GetFriendsInfoResp struct {
CommResp
FriendInfoList []*open_im_sdk.FriendInfo `json:"data"`
}
type GetFriendListReq struct {
2021-12-29 13:40:26 +08:00
OperationID string `json:"operationID" binding:"required"`
FromUserID string `json:"fromUserID" binding:"required"`
2021-12-26 18:47:11 +08:00
}
type GetFriendListResp struct {
CommResp
FriendInfoList []*open_im_sdk.FriendInfo `json:"data"`
}
type GetFriendApplyListReq struct {
2021-12-29 11:29:51 +08:00
OperationID string `json:"operationID" binding:"required"`
FromUserID string `json:"fromUserID" binding:"required"`
2021-12-26 18:47:11 +08:00
}
type GetFriendApplyListResp struct {
CommResp
2021-12-29 10:18:10 +08:00
FriendRequestList []*open_im_sdk.FriendRequest `json:"data"`
2021-12-26 18:47:11 +08:00
}
type GetSelfApplyListReq struct {
2021-12-29 11:15:20 +08:00
OperationID string `json:"operationID" binding:"required"`
FromUserID string `json:"fromUserID" binding:"required"`
2021-12-26 18:47:11 +08:00
}
type GetSelfApplyListResp struct {
CommResp
2021-12-29 10:18:10 +08:00
FriendRequestList []*open_im_sdk.FriendRequest `json:"data"`
2021-12-26 18:47:11 +08:00
}