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/proto/user/user.proto

233 lines
5.1 KiB

syntax = "proto3";
3 years ago
import "Open_IM/pkg/proto/sdk_ws/ws.proto";
2 years ago
import "Open_IM/pkg/proto/conversation/conversation.proto";
option go_package = "./user;user";
package user;
message CommonResp{
3 years ago
int32 errCode = 1;
string errMsg = 2;
}
3 years ago
3 years ago
message GetAllUserIDReq{
string opUserID = 1;
string operationID = 2;
}
message GetAllUserIDResp{
CommonResp CommonResp = 1;
repeated string UserIDList = 2;
3 years ago
}
3 years ago
3 years ago
message AccountCheckReq{
3 years ago
repeated string CheckUserIDList = 1;
string OpUserID = 2;
string OperationID = 3;
3 years ago
}
message AccountCheckResp{
CommonResp commonResp = 1;
message SingleUserStatus {
string userID = 1;
string accountStatus = 2;
}
3 years ago
repeated SingleUserStatus ResultList = 2;
}
3 years ago
message GetUserInfoReq{
repeated string userIDList = 1;
3 years ago
string OpUserID = 2;
string OperationID = 3;
}
message GetUserInfoResp{
3 years ago
CommonResp commonResp = 1;
3 years ago
repeated server_api_params.UserInfo UserInfoList = 3;
}
message UpdateUserInfoReq{
3 years ago
server_api_params.UserInfo UserInfo = 1;
3 years ago
string OpUserID = 2;
string operationID = 3;
}
message UpdateUserInfoResp{
CommonResp commonResp = 1;
}
message SetGlobalRecvMessageOptReq{
string userID = 1;
string operationID = 2;
int32 globalRecvMsgOpt = 3;
}
message SetGlobalRecvMessageOptResp{
CommonResp commonResp = 1;
}
3 years ago
3 years ago
message SetConversationReq{
2 years ago
conversation.Conversation Conversation = 1;
int32 notificationType = 2;
string OperationID = 3;
3 years ago
}
3 years ago
3 years ago
message SetConversationResp{
CommonResp commonResp = 1;
3 years ago
}
3 years ago
3 years ago
message SetRecvMsgOptReq {
string OwnerUserID = 1;
string ConversationID = 2;
int32 RecvMsgOpt = 3;
int32 notificationType = 4;
string OperationID = 5;
3 years ago
}
message SetRecvMsgOptResp {
CommonResp commonResp = 1;
}
3 years ago
message GetConversationReq{
string ConversationID = 1;
string OwnerUserID = 2;
string OperationID = 3;
}
3 years ago
message GetConversationResp{
3 years ago
CommonResp commonResp = 1;
2 years ago
conversation.Conversation Conversation = 2;
}
3 years ago
message GetConversationsReq{
string OwnerUserID = 1;
repeated string ConversationIDs = 2;
string OperationID = 3;
}
3 years ago
message GetConversationsResp{
3 years ago
CommonResp commonResp = 1;
2 years ago
repeated conversation.Conversation Conversations = 2;
}
3 years ago
message GetAllConversationsReq{
string OwnerUserID = 1;
string OperationID = 2;
}
3 years ago
message GetAllConversationsResp{
3 years ago
CommonResp commonResp = 1;
2 years ago
repeated conversation.Conversation Conversations = 2;
3 years ago
}
message BatchSetConversationsReq{
2 years ago
repeated conversation.Conversation Conversations = 1;
3 years ago
string OwnerUserID = 2;
int32 notificationType = 3;
string OperationID = 4;
3 years ago
}
message BatchSetConversationsResp{
3 years ago
CommonResp commonResp = 1;
repeated string Success = 2;
repeated string Failed = 3;
}
3 years ago
2 years ago
message GetUsersReq {
string operationID = 1;
server_api_params.RequestPagination pagination = 2;
string userName = 3;
string userID = 4;
2 years ago
string content = 5;
3 years ago
}
2 years ago
message CmsUser {
server_api_params.UserInfo user = 1;
bool isBlock = 2;
3 years ago
}
message GetUsersResp{
2 years ago
CommonResp commonResp = 1;
repeated CmsUser userList = 2;
3 years ago
server_api_params.ResponsePagination Pagination = 3;
2 years ago
int32 totalNums = 4;
3 years ago
}
message AddUserReq{
2 years ago
server_api_params.UserInfo userInfo = 1;
string operationID = 2;
3 years ago
}
message AddUserResp{
3 years ago
CommonResp CommonResp = 1;
3 years ago
}
3 years ago
message BlockUserReq{
2 years ago
string userID = 1;
string endDisableTime = 2;
string operationID = 3;
string opUserID = 4;
3 years ago
}
message BlockUserResp{
3 years ago
CommonResp CommonResp = 1;
3 years ago
}
message UnBlockUserReq{
2 years ago
string userID = 1;
string operationID = 2;
string opUserID = 3;
3 years ago
}
message UnBlockUserResp{
3 years ago
CommonResp CommonResp = 1;
3 years ago
}
message GetBlockUsersReq{
2 years ago
server_api_params.RequestPagination pagination = 1;
string operationID = 2;
string userID = 3;
int32 totalBlockUserNum = 4;
3 years ago
}
3 years ago
message BlockUser {
2 years ago
server_api_params.UserInfo UserInfo = 1;
3 years ago
string BeginDisableTime = 2;
string EndDisableTime = 3;
3 years ago
}
3 years ago
message GetBlockUsersResp{
3 years ago
CommonResp CommonResp = 1;
3 years ago
repeated BlockUser BlockUsers = 2;
3 years ago
server_api_params.ResponsePagination Pagination = 3;
3 years ago
int32 UserNums = 4;
3 years ago
}
3 years ago
service user {
3 years ago
rpc GetUserInfo(GetUserInfoReq) returns(GetUserInfoResp);
rpc UpdateUserInfo(UpdateUserInfoReq) returns(UpdateUserInfoResp);
rpc SetGlobalRecvMessageOpt(SetGlobalRecvMessageOptReq) returns(SetGlobalRecvMessageOptResp);
3 years ago
rpc GetAllUserID(GetAllUserIDReq)returns(GetAllUserIDResp);
3 years ago
3 years ago
rpc AccountCheck(AccountCheckReq)returns(AccountCheckResp);
3 years ago
rpc GetConversation(GetConversationReq)returns(GetConversationResp);
rpc GetAllConversations(GetAllConversationsReq)returns(GetAllConversationsResp);
rpc GetConversations(GetConversationsReq)returns(GetConversationsResp);
rpc BatchSetConversations(BatchSetConversationsReq)returns(BatchSetConversationsResp);
rpc SetConversation(SetConversationReq)returns(SetConversationResp);
3 years ago
rpc SetRecvMsgOpt(SetRecvMsgOptReq)returns(SetRecvMsgOptResp);
3 years ago
2 years ago
3 years ago
rpc GetUsers(GetUsersReq) returns (GetUsersResp);
2 years ago
3 years ago
rpc AddUser(AddUserReq) returns (AddUserResp);
2 years ago
3 years ago
rpc BlockUser(BlockUserReq) returns (BlockUserResp);
rpc UnBlockUser(UnBlockUserReq) returns (UnBlockUserResp);
rpc GetBlockUsers(GetBlockUsersReq) returns (GetBlockUsersResp);
}
2 years ago