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

241 lines
5.1 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;
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
}
message GetUserReq{
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
}
message GetUserResp{
3 years ago
CommonResp CommonResp = 1;
User user = 2;
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
}
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
}
message GetUsersResp{
3 years ago
CommonResp CommonResp = 1;
string OperationID = 2;
repeated User user = 3;
3 years ago
int32 UserNum = 4;
server_api_params.ResponsePagination Pagination = 5;
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
}
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
}
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;
}
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 = 4;
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;
int32 BlockUserNum = 4;
3 years ago
}
3 years ago
message GetBlockUserReq {
string User_id = 1;
string OperationID = 2;
}
message GetBlockUserResp {
BlockUser BlockUser = 2;
}
3 years ago
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
rpc GetUser(GetUserReq) returns (GetUserResp);
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 GetBlockUser(GetBlockUserReq) returns (GetBlockUserResp);
}