You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Open-IM-Server/pkg/base_info/friend_api_struct.go

137 lines
3.2 KiB

3 years ago
package base_info
import open_im_sdk "Open_IM/pkg/proto/sdk_ws"
3 years ago
type ParamsCommFriend struct {
3 years ago
OperationID string `json:"operationID" binding:"required"`
ToUserID string `json:"toUserID" binding:"required"`
FromUserID string `json:"fromUserID" binding:"required"`
}
type AddBlacklistReq struct {
3 years ago
ParamsCommFriend
3 years ago
}
type AddBlacklistResp struct {
CommResp
}
type ImportFriendReq struct {
FriendUserIDList []string `json:"friendUserIDList" binding:"required"`
3 years ago
OperationID string `json:"operationID" binding:"required"`
FromUserID string `json:"fromUserID" binding:"required"`
3 years ago
}
3 years ago
type UserIDResult struct {
3 years ago
UserID string `json:"userID""`
Result int32 `json:"result"`
3 years ago
}
3 years ago
type ImportFriendResp struct {
CommResp
3 years ago
UserIDResultList []UserIDResult `json:"data"`
3 years ago
}
type AddFriendReq struct {
3 years ago
ParamsCommFriend
3 years ago
ReqMsg string `json:"reqMsg"`
}
type AddFriendResp struct {
CommResp
}
type AddFriendResponseReq struct {
3 years ago
ParamsCommFriend
3 years ago
Flag int32 `json:"flag" binding:"required,oneof=-1 0 1"`
3 years ago
HandleMsg string `json:"handleMsg"`
}
type AddFriendResponseResp struct {
CommResp
}
type DeleteFriendReq struct {
3 years ago
ParamsCommFriend
3 years ago
}
type DeleteFriendResp struct {
CommResp
}
type GetBlackListReq struct {
3 years ago
OperationID string `json:"operationID" binding:"required"`
FromUserID string `json:"fromUserID" binding:"required"`
3 years ago
}
type GetBlackListResp struct {
CommResp
3 years ago
BlackUserInfoList []*open_im_sdk.PublicUserInfo `json:"-"`
Data []map[string]interface{} `json:"data"`
3 years ago
}
//type PublicUserInfo struct {
// UserID string `json:"userID"`
// Nickname string `json:"nickname"`
// FaceUrl string `json:"faceUrl"`
// Gender int32 `json:"gender"`
//}
3 years ago
type SetFriendRemarkReq struct {
3 years ago
ParamsCommFriend
3 years ago
Remark string `json:"remark" binding:"required"`
}
3 years ago
type SetFriendRemarkResp struct {
3 years ago
CommResp
}
type RemoveBlackListReq struct {
3 years ago
ParamsCommFriend
3 years ago
}
type RemoveBlackListResp struct {
CommResp
}
type IsFriendReq struct {
3 years ago
ParamsCommFriend
3 years ago
}
3 years ago
type Response struct {
Friend bool `json:"isFriend"`
}
3 years ago
type IsFriendResp struct {
CommResp
3 years ago
Response Response `json:"data"`
3 years ago
}
type GetFriendsInfoReq struct {
3 years ago
ParamsCommFriend
3 years ago
}
type GetFriendsInfoResp struct {
CommResp
3 years ago
FriendInfoList []*open_im_sdk.FriendInfo `json:"-"`
Data []map[string]interface{} `json:"data"`
3 years ago
}
type GetFriendListReq struct {
3 years ago
OperationID string `json:"operationID" binding:"required"`
FromUserID string `json:"fromUserID" binding:"required"`
3 years ago
}
type GetFriendListResp struct {
CommResp
3 years ago
FriendInfoList []*open_im_sdk.FriendInfo `json:"-"`
3 years ago
Data []map[string]interface{} `json:"data"`
3 years ago
}
type GetFriendApplyListReq struct {
3 years ago
OperationID string `json:"operationID" binding:"required"`
FromUserID string `json:"fromUserID" binding:"required"`
3 years ago
}
type GetFriendApplyListResp struct {
CommResp
3 years ago
FriendRequestList []*open_im_sdk.FriendRequest `json:"-"`
Data []map[string]interface{} `json:"data"`
3 years ago
}
type GetSelfApplyListReq struct {
3 years ago
OperationID string `json:"operationID" binding:"required"`
FromUserID string `json:"fromUserID" binding:"required"`
3 years ago
}
type GetSelfApplyListResp struct {
CommResp
3 years ago
FriendRequestList []*open_im_sdk.FriendRequest `json:"-"`
Data []map[string]interface{} `json:"data"`
3 years ago
}