mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-08 19:16:35 +08:00
tidy code
This commit is contained in:
@@ -2,16 +2,12 @@ package base_info
|
||||
|
||||
import open_im_sdk "Open_IM/pkg/proto/sdk_ws"
|
||||
|
||||
open_im_sdk "Open_IM/pkg/proto/sdk_ws"
|
||||
|
||||
type paramsCommFriend struct {
|
||||
OperationID string `json:"operationID" binding:"required"`
|
||||
ToUserID string `json:"toUserID" binding:"required"`
|
||||
FromUserID string `json:"fromUserID" binding:"required"`
|
||||
}
|
||||
|
||||
|
||||
|
||||
type AddBlacklistReq struct {
|
||||
paramsCommFriend
|
||||
}
|
||||
@@ -19,8 +15,6 @@ type AddBlacklistResp struct {
|
||||
CommResp
|
||||
}
|
||||
|
||||
|
||||
|
||||
type ImportFriendReq struct {
|
||||
FriendUserIDList []string `json:"friendUserIDList" binding:"required"`
|
||||
OperationID string `json:"operationID" binding:"required"`
|
||||
@@ -28,10 +22,9 @@ type ImportFriendReq struct {
|
||||
}
|
||||
type ImportFriendResp struct {
|
||||
CommResp
|
||||
Data []string `json:"data"`
|
||||
Data []string `json:"data"`
|
||||
}
|
||||
|
||||
|
||||
type AddFriendReq struct {
|
||||
paramsCommFriend
|
||||
ReqMsg string `json:"reqMsg"`
|
||||
@@ -40,18 +33,15 @@ type AddFriendResp struct {
|
||||
CommResp
|
||||
}
|
||||
|
||||
|
||||
type AddFriendResponseReq struct {
|
||||
paramsCommFriend
|
||||
Flag int32 `json:"flag" binding:"required"`
|
||||
Flag int32 `json:"flag" binding:"required"`
|
||||
HandleMsg string `json:"handleMsg"`
|
||||
}
|
||||
type AddFriendResponseResp struct {
|
||||
CommResp
|
||||
}
|
||||
|
||||
|
||||
|
||||
type DeleteFriendReq struct {
|
||||
paramsCommFriend
|
||||
}
|
||||
@@ -59,8 +49,6 @@ type DeleteFriendResp struct {
|
||||
CommResp
|
||||
}
|
||||
|
||||
|
||||
|
||||
type GetBlackListReq struct {
|
||||
paramsCommFriend
|
||||
}
|
||||
@@ -69,7 +57,6 @@ type GetBlackListResp struct {
|
||||
BlackUserInfoList []*blackUserInfo `json:"data"`
|
||||
}
|
||||
|
||||
|
||||
//type PublicUserInfo struct {
|
||||
// UserID string `json:"userID"`
|
||||
// Nickname string `json:"nickname"`
|
||||
@@ -81,7 +68,6 @@ type blackUserInfo struct {
|
||||
open_im_sdk.PublicUserInfo
|
||||
}
|
||||
|
||||
|
||||
type SetFriendCommentReq struct {
|
||||
paramsCommFriend
|
||||
Remark string `json:"remark" binding:"required"`
|
||||
@@ -90,7 +76,6 @@ type SetFriendCommentResp struct {
|
||||
CommResp
|
||||
}
|
||||
|
||||
|
||||
type RemoveBlackListReq struct {
|
||||
paramsCommFriend
|
||||
}
|
||||
@@ -106,7 +91,6 @@ type IsFriendResp struct {
|
||||
Response bool `json:"response"`
|
||||
}
|
||||
|
||||
|
||||
type GetFriendsInfoReq struct {
|
||||
paramsCommFriend
|
||||
}
|
||||
@@ -123,10 +107,6 @@ type GetFriendListResp struct {
|
||||
FriendInfoList []*open_im_sdk.FriendInfo `json:"data"`
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
type GetFriendApplyListReq struct {
|
||||
paramsCommFriend
|
||||
}
|
||||
@@ -142,14 +122,3 @@ type GetSelfApplyListResp struct {
|
||||
CommResp
|
||||
FriendRequestList open_im_sdk.FriendRequest `json:"data"`
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
package base_info
|
||||
|
||||
import (
|
||||
open_im_sdk "Open_IM/pkg/proto/sdk_ws"
|
||||
)
|
||||
|
||||
type GetUsersOnlineStatusReq struct {
|
||||
OperationID string `json:"operationID" binding:"required"`
|
||||
UserIDList []string `json:"userIDList" binding:"required,lte=200"`
|
||||
Secret string `json:"secret" binding:"required,max=32"`
|
||||
}
|
||||
type OnlineStatus struct {
|
||||
UserID string `json:"userID"`
|
||||
Status string `json:"status"`
|
||||
}
|
||||
type GetUsersOnlineStatusResp struct {
|
||||
CommResp
|
||||
OnlineStatusList []*OnlineStatus `json:"data"`
|
||||
}
|
||||
|
||||
type GetUserInfoReq struct {
|
||||
OperationID string `json:"operationID" binding:"required"`
|
||||
UserIDList []string `json:"userIDList" binding:"required"`
|
||||
}
|
||||
|
||||
type GetUserInfoResp struct {
|
||||
CommResp
|
||||
UserInfoList []*open_im_sdk.UserInfo `json:"data"`
|
||||
}
|
||||
Reference in New Issue
Block a user