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

269 lines
5.7 KiB

syntax = "proto3";
3 years ago
import "Open_IM/pkg/proto/sdk_ws/ws.proto";
option go_package = "./user;user";
package user;
message CommonResp{
3 years ago
int32 errCode = 1;
string errMsg = 2;
}
3 years ago
message DeleteUsersReq{
3 years ago
repeated string DeleteUserIDList = 2;
string OpUserID = 3;
string OperationID = 4;
}
3 years ago
3 years ago
message DeleteUsersResp{
CommonResp CommonResp = 1;
repeated string FailedUserIDList = 2;
}
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;
}
3 years ago
3 years ago
message SetReceiveMessageOptReq{
3 years ago
string FromUserID = 1;
int32 opt = 2;
repeated string conversationIDList = 3;
string operationID = 4;
string OpUserID = 5;
}
message OptResult{
string conversationID = 1;
3 years ago
int32 result = 2; //-1: failed; 0:default; 1: not receive ; 2: not jpush
}
message SetReceiveMessageOptResp{
3 years ago
CommonResp commonResp = 1;
repeated OptResult conversationOptResultList = 2;
}
message GetReceiveMessageOptReq{
3 years ago
string FromUserID = 1;
repeated string conversationIDList = 2;
3 years ago
string operationID = 3;
string OpUserID = 4;
}
message GetReceiveMessageOptResp{
3 years ago
CommonResp commonResp = 1;
repeated OptResult conversationOptResultList = 3;
}
3 years ago
message GetAllConversationMsgOptReq{
string FromUserID = 1;
3 years ago
string operationID = 2;
3 years ago
string OpUserID = 3;
}
message GetAllConversationMsgOptResp{
3 years ago
CommonResp commonResp = 1;
repeated OptResult conversationOptResultList = 3;
}
3 years ago
message ResignUserReq{
3 years ago
string UserId = 1;
string OperationID = 2;
3 years ago
}
message ResignUserResp{
3 years ago
CommonResp commonResp = 1;
3 years ago
}
3 years ago
message GetUserByIdReq{
3 years ago
string UserId = 1;
string OperationID = 2;
3 years ago
}
message User{
3 years ago
string ProfilePhoto = 1;
string Nickname = 2;
3 years ago
string UserId = 3;
3 years ago
string CreateTime = 4;
bool IsBlock = 5;
3 years ago
}
3 years ago
message GetUserByIdResp{
3 years ago
CommonResp CommonResp = 1;
User user = 2;
3 years ago
}
3 years ago
message GetUsersByNameReq {
string UserName = 1;
server_api_params.RequestPagination Pagination =2;
string OperationID = 3;
}
message GetUsersByNameResp {
repeated User users = 1;
server_api_params.ResponsePagination Pagination = 2;
int32 UserNums = 3;
}
3 years ago
message AlterUserReq{
3 years ago
string UserId = 1;
string OperationID = 2;
3 years ago
int64 PhoneNumber = 3;
string Nickname = 4;
string Email = 5;
3 years ago
string OpUserId = 6;
3 years ago
}
message AlterUserResp{
3 years ago
CommonResp CommonResp = 1;
3 years ago
}
3 years ago
message GetUsersReq {
string OperationID = 1;
server_api_params.RequestPagination Pagination = 2;
3 years ago
string UserName = 3;
3 years ago
}
message GetUsersResp{
3 years ago
CommonResp CommonResp = 1;
3 years ago
repeated User user = 2;
server_api_params.ResponsePagination Pagination = 3;
3 years ago
int32 UserNums = 4;
3 years ago
}
message AddUserReq{
3 years ago
string OperationID = 1;
3 years ago
string PhoneNumber = 2;
string UserId = 3;
3 years ago
string name = 4;
3 years ago
string OpUserId = 5;
3 years ago
}
message AddUserResp{
3 years ago
CommonResp CommonResp = 1;
3 years ago
}
3 years ago
message BlockUserReq{
3 years ago
string UserId = 1;
3 years ago
string EndDisableTime = 2;
string OperationID = 3;
3 years ago
string OpUserId = 4;
3 years ago
}
message BlockUserResp{
3 years ago
CommonResp CommonResp = 1;
3 years ago
}
message UnBlockUserReq{
3 years ago
string UserId = 1;
3 years ago
string OperationID = 2;
3 years ago
string OpUserId = 3;
3 years ago
}
message UnBlockUserResp{
3 years ago
CommonResp CommonResp = 1;
3 years ago
}
message GetBlockUsersReq{
server_api_params.RequestPagination Pagination =1;
string OperationID = 2;
3 years ago
int32 BlockUserNum = 3;
3 years ago
}
3 years ago
message BlockUser {
User User = 1;
string BeginDisableTime = 2;
string EndDisableTime = 3;
}
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
message GetBlockUserByIdReq {
3 years ago
string User_id = 1;
string OperationID = 2;
}
3 years ago
message GetBlockUserByIdResp {
3 years ago
BlockUser BlockUser = 2;
}
3 years ago
3 years ago
message DeleteUserReq {
string User_id = 1;
string OperationID = 2;
3 years ago
string OpUserId = 3;
3 years ago
}
message DeleteUserResp {
}
service user {
3 years ago
rpc GetUserInfo(GetUserInfoReq) returns(GetUserInfoResp);
rpc UpdateUserInfo(UpdateUserInfoReq) returns(UpdateUserInfoResp);
rpc DeleteUsers(DeleteUsersReq)returns(DeleteUsersResp);
3 years ago
rpc GetAllUserID(GetAllUserIDReq)returns(GetAllUserIDResp);
rpc SetReceiveMessageOpt(SetReceiveMessageOptReq)returns(SetReceiveMessageOptResp);
rpc GetReceiveMessageOpt(GetReceiveMessageOptReq)returns(GetReceiveMessageOptResp);
rpc GetAllConversationMsgOpt(GetAllConversationMsgOptReq)returns(GetAllConversationMsgOptResp);
3 years ago
rpc AccountCheck(AccountCheckReq)returns(AccountCheckResp);
3 years ago
3 years ago
rpc GetUserById(GetUserByIdReq) returns (GetUserByIdResp);
rpc GetUsersByName(GetUsersByNameReq) returns (GetUsersByNameResp);
3 years ago
rpc ResignUser(ResignUserReq) returns (ResignUserResp);
3 years ago
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);
3 years ago
rpc GetBlockUserById(GetBlockUserByIdReq) returns (GetBlockUserByIdResp);
rpc DeleteUser(DeleteUserReq) returns (DeleteUserResp);
}