mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-01 07:35:58 +08:00
errcode
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
package cms_struct
|
||||
|
||||
import (
|
||||
"Open_IM/pkg/api_struct"
|
||||
server_api_params "Open_IM/pkg/proto/sdk_ws"
|
||||
)
|
||||
|
||||
type AdminLoginRequest struct {
|
||||
AdminName string `json:"adminID" binding:"required"`
|
||||
Secret string `json:"secret" binding:"required"`
|
||||
OperationID string `json:"operationID" binding:"required"`
|
||||
}
|
||||
|
||||
type AdminLoginResponse struct {
|
||||
Token string `json:"token"`
|
||||
UserName string `json:"userName"`
|
||||
FaceURL string `json:"faceURL"`
|
||||
}
|
||||
|
||||
type GetUserTokenRequest struct {
|
||||
UserID string `json:"userID" binding:"required"`
|
||||
OperationID string `json:"operationID" binding:"required"`
|
||||
PlatFormID int32 `json:"platformID" binding:"required"`
|
||||
}
|
||||
|
||||
type GetUserTokenResponse struct {
|
||||
Token string `json:"token"`
|
||||
ExpTime int64 `json:"expTime"`
|
||||
}
|
||||
|
||||
type AddUserRegisterAddFriendIDListRequest struct {
|
||||
OperationID string `json:"operationID" binding:"required"`
|
||||
UserIDList []string `json:"userIDList" binding:"required"`
|
||||
}
|
||||
|
||||
type AddUserRegisterAddFriendIDListResponse struct {
|
||||
}
|
||||
|
||||
type ReduceUserRegisterAddFriendIDListRequest struct {
|
||||
OperationID string `json:"operationID" binding:"required"`
|
||||
UserIDList []string `json:"userIDList" binding:"required"`
|
||||
Operation int32 `json:"operation"`
|
||||
}
|
||||
|
||||
type ReduceUserRegisterAddFriendIDListResponse struct {
|
||||
}
|
||||
|
||||
type GetUserRegisterAddFriendIDListRequest struct {
|
||||
OperationID string `json:"operationID" binding:"required"`
|
||||
api_struct.RequestPagination
|
||||
}
|
||||
|
||||
type GetUserRegisterAddFriendIDListResponse struct {
|
||||
Users []*server_api_params.UserInfo `json:"users"`
|
||||
api_struct.ResponsePagination
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package cms_struct
|
||||
|
||||
type RequestPagination struct {
|
||||
PageNumber int `json:"pageNumber" binding:"required"`
|
||||
ShowNumber int `json:"showNumber" binding:"required"`
|
||||
}
|
||||
|
||||
type ResponsePagination struct {
|
||||
CurrentPage int `json:"currentPage"`
|
||||
ShowNumber int `json:"showNumber"`
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
package cms_struct
|
||||
|
||||
type GetFriendsReq struct {
|
||||
OperationID string `json:"operationID"`
|
||||
UserID string `json:"userID"`
|
||||
FriendUserName string `json:"friendUserName"`
|
||||
FriendUserID string `json:"friendUserID"`
|
||||
RequestPagination
|
||||
}
|
||||
|
||||
type FriendInfo struct {
|
||||
OwnerUserID string `json:"ownerUserID"`
|
||||
Remark string `json:"remark"`
|
||||
CreateTime uint32 `json:"createTime"`
|
||||
UserID string `json:"userID"`
|
||||
Nickname string `json:"nickName"`
|
||||
AddSource int32 `json:"addSource"`
|
||||
OperatorUserID string `json:"operatorUserID"`
|
||||
}
|
||||
|
||||
type GetFriendsResp struct {
|
||||
ResponsePagination
|
||||
FriendInfoList []*FriendInfo `json:"friendInfoList"`
|
||||
FriendNums int32 `json:"friendNums"`
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
package cms_struct
|
||||
|
||||
type GroupResponse struct {
|
||||
GroupOwnerName string `json:"GroupOwnerName"`
|
||||
GroupOwnerID string `json:"GroupOwnerID"`
|
||||
GroupID string `json:"groupID"`
|
||||
GroupName string `json:"groupName"`
|
||||
Notification string `json:"notification"`
|
||||
Introduction string `json:"introduction"`
|
||||
FaceURL string `json:"faceURL"`
|
||||
OwnerUserID string `json:"ownerUserID"`
|
||||
CreateTime uint32 `json:"createTime"`
|
||||
MemberCount uint32 `json:"memberCount"`
|
||||
Ex string `json:"ex"`
|
||||
Status int32 `json:"status"`
|
||||
CreatorUserID string `json:"creatorUserID"`
|
||||
GroupType int32 `json:"groupType"`
|
||||
NeedVerification int32 `json:"needVerification"`
|
||||
LookMemberInfo int32 `json:"lookMemberInfo"`
|
||||
ApplyMemberFriend int32 `json:"applyMemberFriend"`
|
||||
NotificationUpdateTime uint32 `json:"notificationUpdateTime"`
|
||||
NotificationUserID string `json:"notificationUserID"`
|
||||
}
|
||||
|
||||
type GetGroupsRequest struct {
|
||||
RequestPagination
|
||||
OperationID string `json:"operationID" binding:"required"`
|
||||
GroupID string `json:"groupID"`
|
||||
GroupName string `json:"groupName"`
|
||||
}
|
||||
|
||||
type GetGroupsResponse struct {
|
||||
Groups []GroupResponse `json:"groups"`
|
||||
GroupNums int `json:"groupNums"`
|
||||
ResponsePagination
|
||||
}
|
||||
|
||||
type GetGroupMembersRequest struct {
|
||||
GroupID string `form:"groupID" binding:"required"`
|
||||
UserName string `form:"userName"`
|
||||
OperationID string `json:"operationID" binding:"required"`
|
||||
RequestPagination
|
||||
}
|
||||
|
||||
type GroupMemberResponse struct {
|
||||
GroupID string `json:"groupID"`
|
||||
UserID string `json:"userID"`
|
||||
RoleLevel int32 `json:"roleLevel"`
|
||||
JoinTime int32 `json:"joinTime"`
|
||||
Nickname string `json:"nickname"`
|
||||
FaceURL string `json:"faceURL"`
|
||||
AppMangerLevel int32 `json:"appMangerLevel"` //if >0
|
||||
JoinSource int32 `json:"joinSource"`
|
||||
OperatorUserID string `json:"operatorUserID"`
|
||||
Ex string `json:"ex"`
|
||||
MuteEndTime uint32 `json:"muteEndTime"`
|
||||
InviterUserID string `json:"inviterUserID"`
|
||||
}
|
||||
|
||||
type GetGroupMembersResponse struct {
|
||||
GroupMembers []GroupMemberResponse `json:"groupMembers"`
|
||||
ResponsePagination
|
||||
MemberNums int `json:"memberNums"`
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package cms_struct
|
||||
|
||||
import (
|
||||
pbCommon "Open_IM/pkg/proto/sdk_ws"
|
||||
)
|
||||
|
||||
type GetChatLogsReq struct {
|
||||
SessionType int `json:"sessionType"`
|
||||
ContentType int `json:"contentType"`
|
||||
Content string `json:"content"`
|
||||
SendID string `json:"sendID"`
|
||||
RecvID string `json:"recvID"`
|
||||
GroupID string `json:"groupID"`
|
||||
SendTime string `json:"sendTime"`
|
||||
RequestPagination
|
||||
OperationID string `json:"operationID"`
|
||||
}
|
||||
|
||||
type ChatLog struct {
|
||||
SendID string `json:"sendID,omitempty"`
|
||||
RecvID string `json:"recvID,omitempty"`
|
||||
GroupID string `json:"groupID,omitempty"`
|
||||
ClientMsgID string `json:"clientMsgID,omitempty"`
|
||||
ServerMsgID string `json:"serverMsgID,omitempty"`
|
||||
SenderPlatformID int32 `json:"senderPlatformID,omitempty"`
|
||||
SenderNickname string `json:"senderNickname,omitempty"`
|
||||
SenderFaceURL string `json:"senderFaceURL,omitempty"`
|
||||
SessionType int32 `json:"sessionType,omitempty"`
|
||||
MsgFrom int32 `json:"msgFrom,omitempty"`
|
||||
ContentType int32 `json:"contentType,omitempty"`
|
||||
Content string `json:"content,omitempty"`
|
||||
Seq uint32 `json:"seq,omitempty"`
|
||||
SendTime int64 `json:"sendTime,omitempty"`
|
||||
CreateTime int64 `json:"createTime,omitempty"`
|
||||
Status int32 `json:"status,omitempty"`
|
||||
Options map[string]bool `json:"options,omitempty"`
|
||||
OfflinePushInfo *pbCommon.OfflinePushInfo `json:"offlinePushInfo,omitempty"`
|
||||
AtUserIDList []string `json:"atUserIDList,omitempty"`
|
||||
MsgDataList []byte `json:"msgDataList,omitempty"`
|
||||
AttachedInfo string `json:"attachedInfo,omitempty"`
|
||||
Ex string `json:"ex,omitempty"`
|
||||
}
|
||||
|
||||
type GetChatLogsResp struct {
|
||||
ChatLogs []*ChatLog `json:"chatLogs"`
|
||||
ChatLogsNum int `json:"logNums"`
|
||||
ResponsePagination
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
package cms_struct
|
||||
|
||||
type GetStatisticsRequest struct {
|
||||
From string `json:"from" binding:"required"`
|
||||
To string `json:"to" binding:"required"`
|
||||
OperationID string `json:"operationID" binding:"required"`
|
||||
}
|
||||
|
||||
type GetMessageStatisticsRequest struct {
|
||||
GetStatisticsRequest
|
||||
}
|
||||
|
||||
type GetMessageStatisticsResponse struct {
|
||||
PrivateMessageNum int `json:"privateMessageNum"`
|
||||
GroupMessageNum int `json:"groupMessageNum"`
|
||||
PrivateMessageNumList []struct {
|
||||
Date string `json:"date"`
|
||||
MessageNum int `json:"messageNum"`
|
||||
} `json:"privateMessageNumList"`
|
||||
GroupMessageNumList []struct {
|
||||
Date string `json:"date"`
|
||||
MessageNum int `json:"messageNum"`
|
||||
} `json:"groupMessageNumList"`
|
||||
}
|
||||
|
||||
type GetUserStatisticsRequest struct {
|
||||
GetStatisticsRequest
|
||||
}
|
||||
|
||||
type GetUserStatisticsResponse struct {
|
||||
IncreaseUserNum int `json:"increaseUserNum"`
|
||||
ActiveUserNum int `json:"activeUserNum"`
|
||||
TotalUserNum int `json:"totalUserNum"`
|
||||
IncreaseUserNumList []struct {
|
||||
Date string `json:"date"`
|
||||
IncreaseUserNum int `json:"increaseUserNum"`
|
||||
} `json:"increaseUserNumList"`
|
||||
ActiveUserNumList []struct {
|
||||
Date string `json:"date"`
|
||||
ActiveUserNum int `json:"activeUserNum"`
|
||||
} `json:"activeUserNumList"`
|
||||
TotalUserNumList []struct {
|
||||
Date string `json:"date"`
|
||||
TotalUserNum int `json:"totalUserNum"`
|
||||
} `json:"totalUserNumList"`
|
||||
}
|
||||
|
||||
type GetGroupStatisticsRequest struct {
|
||||
GetStatisticsRequest
|
||||
}
|
||||
|
||||
// 群聊统计
|
||||
type GetGroupStatisticsResponse struct {
|
||||
IncreaseGroupNum int `json:"increaseGroupNum"`
|
||||
TotalGroupNum int `json:"totalGroupNum"`
|
||||
IncreaseGroupNumList []struct {
|
||||
Date string `json:"date"`
|
||||
IncreaseGroupNum int `json:"increaseGroupNum"`
|
||||
} `json:"increaseGroupNumList"`
|
||||
TotalGroupNumList []struct {
|
||||
Date string `json:"date"`
|
||||
TotalGroupNum int `json:"totalGroupNum"`
|
||||
} `json:"totalGroupNumList"`
|
||||
}
|
||||
|
||||
type GetActiveUserRequest struct {
|
||||
GetStatisticsRequest
|
||||
// RequestPagination
|
||||
}
|
||||
|
||||
type GetActiveUserResponse struct {
|
||||
ActiveUserList []struct {
|
||||
NickName string `json:"nickName"`
|
||||
UserId string `json:"userID"`
|
||||
MessageNum int `json:"messageNum"`
|
||||
} `json:"activeUserList"`
|
||||
}
|
||||
|
||||
type GetActiveGroupRequest struct {
|
||||
GetStatisticsRequest
|
||||
// RequestPagination
|
||||
}
|
||||
|
||||
type GetActiveGroupResponse struct {
|
||||
ActiveGroupList []struct {
|
||||
GroupName string `json:"groupName"`
|
||||
GroupId string `json:"groupID"`
|
||||
MessageNum int `json:"messageNum"`
|
||||
} `json:"activeGroupList"`
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
package cms_struct
|
||||
|
||||
type UserResponse struct {
|
||||
FaceURL string `json:"faceURL"`
|
||||
Nickname string `json:"nickName"`
|
||||
UserID string `json:"userID"`
|
||||
CreateTime string `json:"createTime,omitempty"`
|
||||
CreateIp string `json:"createIp,omitempty"`
|
||||
LastLoginTime string `json:"lastLoginTime,omitempty"`
|
||||
LastLoginIp string `json:"lastLoginIP,omitempty"`
|
||||
LoginTimes int32 `json:"loginTimes"`
|
||||
LoginLimit int32 `json:"loginLimit"`
|
||||
IsBlock bool `json:"isBlock"`
|
||||
PhoneNumber string `json:"phoneNumber"`
|
||||
Email string `json:"email"`
|
||||
Birth string `json:"birth"`
|
||||
Gender int `json:"gender"`
|
||||
}
|
||||
|
||||
type AddUserRequest struct {
|
||||
OperationID string `json:"operationID" binding:"required"`
|
||||
PhoneNumber string `json:"phoneNumber" binding:"required"`
|
||||
UserId string `json:"userID" binding:"required"`
|
||||
Name string `json:"name" binding:"required"`
|
||||
Email string `json:"email"`
|
||||
Birth string `json:"birth"`
|
||||
Gender string `json:"gender"`
|
||||
FaceURL string `json:"faceURL"`
|
||||
}
|
||||
|
||||
type AddUserResponse struct {
|
||||
}
|
||||
|
||||
type BlockUser struct {
|
||||
UserResponse
|
||||
BeginDisableTime string `json:"beginDisableTime"`
|
||||
EndDisableTime string `json:"endDisableTime"`
|
||||
}
|
||||
|
||||
type BlockUserRequest struct {
|
||||
OperationID string `json:"operationID" binding:"required"`
|
||||
UserID string `json:"userID" binding:"required"`
|
||||
EndDisableTime string `json:"endDisableTime" binding:"required"`
|
||||
}
|
||||
|
||||
type BlockUserResponse struct {
|
||||
}
|
||||
|
||||
type UnblockUserRequest struct {
|
||||
OperationID string `json:"operationID" binding:"required"`
|
||||
UserID string `json:"userID" binding:"required"`
|
||||
}
|
||||
|
||||
type UnBlockUserResponse struct {
|
||||
}
|
||||
|
||||
type GetBlockUsersRequest struct {
|
||||
OperationID string `json:"operationID" binding:"required"`
|
||||
RequestPagination
|
||||
}
|
||||
|
||||
type GetBlockUsersResponse struct {
|
||||
BlockUsers []BlockUser `json:"blockUsers"`
|
||||
ResponsePagination
|
||||
UserNums int32 `json:"userNums"`
|
||||
}
|
||||
|
||||
type GetUserIDByEmailAndPhoneNumberRequest struct {
|
||||
OperationID string `json:"operationID" binding:"required"`
|
||||
PhoneNumber string `json:"phoneNumber"`
|
||||
Email string `json:"email"`
|
||||
}
|
||||
|
||||
type GetUserIDByEmailAndPhoneNumberResponse struct {
|
||||
UserIDList []string `json:"userIDList"`
|
||||
}
|
||||
Reference in New Issue
Block a user