tidy code

This commit is contained in:
wenxu12345
2021-12-27 16:48:05 +08:00
parent 3d4e0a0479
commit e439ef4ddd
26 changed files with 1421 additions and 1899 deletions
+2 -33
View File
@@ -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"`
}
+29
View File
@@ -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"`
}