Files
open-im-server/pkg/proto/user/user.proto
T

176 lines
3.8 KiB
Protocol Buffer
Raw Normal View History

2021-05-26 19:44:49 +08:00
syntax = "proto3";
2021-12-27 16:48:05 +08:00
import "Open_IM/pkg/proto/sdk_ws/ws.proto";
option go_package = "./user;user";
2021-05-26 19:44:49 +08:00
package user;
message CommonResp{
2021-12-27 16:48:05 +08:00
int32 errCode = 1;
string errMsg = 2;
2021-09-22 20:10:38 +08:00
}
2021-12-27 16:48:05 +08:00
2021-09-22 20:10:38 +08:00
message DeleteUsersReq{
2021-12-27 16:48:05 +08:00
repeated string DeleteUserIDList = 2;
string OpUserID = 3;
2021-09-22 20:10:38 +08:00
string OperationID = 4;
}
2021-12-27 16:48:05 +08:00
message DeleteUsersResp{
CommonResp CommonResp = 1;
repeated string FailedUserIDList = 2;
2021-09-22 20:10:38 +08:00
}
2021-12-27 16:48:05 +08:00
message GetAllUserIDReq{
string opUserID = 1;
string operationID = 2;
}
message GetAllUserIDResp{
CommonResp CommonResp = 1;
repeated string UserIDList = 2;
2021-12-17 12:15:33 +08:00
}
2021-12-27 16:48:05 +08:00
2021-12-17 12:15:33 +08:00
message AccountCheckReq{
2021-12-27 16:48:05 +08:00
repeated string CheckUserIDList = 1;
string OpUserID = 2;
string OperationID = 3;
2021-12-17 12:15:33 +08:00
}
message AccountCheckResp{
CommonResp commonResp = 1;
message SingleUserStatus {
string userID = 1;
string accountStatus = 2;
}
2021-12-27 16:48:05 +08:00
repeated SingleUserStatus ResultList = 2;
2021-09-22 20:10:38 +08:00
}
2021-12-27 16:48:05 +08:00
2021-05-26 19:44:49 +08:00
message GetUserInfoReq{
repeated string userIDList = 1;
2021-12-27 16:48:05 +08:00
string OpUserID = 2;
2021-05-26 19:44:49 +08:00
string OperationID = 3;
}
message GetUserInfoResp{
2021-12-27 16:48:05 +08:00
CommonResp commonResp = 1;
2022-01-17 14:06:37 +08:00
repeated server_api_params.UserInfo UserInfoList = 3;
2021-05-26 19:44:49 +08:00
}
message UpdateUserInfoReq{
2022-01-17 14:06:37 +08:00
server_api_params.UserInfo UserInfo = 1;
2021-12-27 16:48:05 +08:00
string OpUserID = 2;
string operationID = 3;
}
message UpdateUserInfoResp{
CommonResp commonResp = 1;
2021-05-26 19:44:49 +08:00
}
2021-11-29 11:19:24 +08:00
2021-12-27 16:48:05 +08:00
2021-12-07 14:28:07 +08:00
message SetReceiveMessageOptReq{
2021-12-27 16:48:05 +08:00
string FromUserID = 1;
int32 opt = 2;
repeated string conversationIDList = 3;
string operationID = 4;
string OpUserID = 5;
}
message OptResult{
2021-12-29 15:52:19 +08:00
string conversationID = 1;
2021-12-27 16:48:05 +08:00
int32 result = 2; //-1: failed; 0:default; 1: not receive ; 2: not jpush
2021-12-07 14:28:07 +08:00
}
message SetReceiveMessageOptResp{
2021-12-27 16:48:05 +08:00
CommonResp commonResp = 1;
2021-12-29 15:52:19 +08:00
repeated OptResult conversationOptResultList = 2;
2021-12-07 14:28:07 +08:00
}
message GetReceiveMessageOptReq{
2021-12-27 16:48:05 +08:00
string FromUserID = 1;
2021-12-29 15:52:19 +08:00
repeated string conversationIDList = 2;
2021-12-27 16:48:05 +08:00
string operationID = 3;
string OpUserID = 4;
2021-12-07 14:28:07 +08:00
}
message GetReceiveMessageOptResp{
2021-12-27 16:48:05 +08:00
CommonResp commonResp = 1;
repeated OptResult conversationOptResultList = 3;
2021-12-07 14:28:07 +08:00
}
2021-12-27 16:48:05 +08:00
2021-12-07 14:28:07 +08:00
message GetAllConversationMsgOptReq{
2021-12-29 15:07:36 +08:00
string FromUserID = 1;
2021-12-27 16:48:05 +08:00
string operationID = 2;
string OpUserID = 3;
2021-12-07 14:28:07 +08:00
}
message GetAllConversationMsgOptResp{
2021-12-27 16:48:05 +08:00
CommonResp commonResp = 1;
repeated OptResult conversationOptResultList = 3;
2021-12-07 14:28:07 +08:00
}
2022-01-21 18:39:57 +08:00
message ResignUserReq{
string UserId = 1;
string OperationID = 2;
}
message ResignUserResp{
CommonResp commonResp = 1;
}
message GetUserReq{
string UserId = 1;
string OperationID = 2;
}
message User{
}
message GetUserResp{
User user = 1
}
message AlterUserReq{
string UserId = 1;
string OperationID = 2;
}
message AlterUserResp{
CommonResp commonResp = 1;
}
message GetUserReq{
string OperationID = 1;
}
message GetUsersResp{
string OperationID = 1;
repeated Users User = 2;
}
message AddUserReq{
string OperationID = 1;
}
message AddUserResp{
CommonResp commonResp = 1;
}
2021-05-26 19:44:49 +08:00
service user {
2021-12-27 16:48:05 +08:00
rpc GetUserInfo(GetUserInfoReq) returns(GetUserInfoResp);
rpc UpdateUserInfo(UpdateUserInfoReq) returns(UpdateUserInfoResp);
2021-09-22 20:10:38 +08:00
rpc DeleteUsers(DeleteUsersReq)returns(DeleteUsersResp);
2021-12-27 16:48:05 +08:00
rpc GetAllUserID(GetAllUserIDReq)returns(GetAllUserIDResp);
2021-12-07 14:28:07 +08:00
rpc SetReceiveMessageOpt(SetReceiveMessageOptReq)returns(SetReceiveMessageOptResp);
rpc GetReceiveMessageOpt(GetReceiveMessageOptReq)returns(GetReceiveMessageOptResp);
rpc GetAllConversationMsgOpt(GetAllConversationMsgOptReq)returns(GetAllConversationMsgOptResp);
2021-12-17 12:52:12 +08:00
rpc AccountCheck(AccountCheckReq)returns(AccountCheckResp);
2022-01-21 18:39:57 +08:00
rpc ResignUser(ResignUserReq) returns (ResignUserResp);
rpc GetUser(GetUserReq) returns (GetUserResp);
rpc AlterUser(AlterUserReq) returns (AlterUserResp);
rpc GetUsers(GetUsersReq) returns (GetUsersResp);
rpc AddUser(AddUserReq) returns (AddUserResp);
rpc BlockUser(BlockUserReq) returns (BlockUserResp);
rpc UnBlockUser(UnBlockUserReq) returns (UnBlockUserResp);
rpc GetBlockUsers(GetBlockUsersReq) returns (GetBlockUsersResp);
2021-05-26 19:44:49 +08:00
}