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

143 lines
3.3 KiB

3 years ago
syntax = "proto3";
import "Open_IM/pkg/proto/sdk_ws/ws.proto";
option go_package = "./cache;cache";
package cache;
message CommonResp{
int32 errCode = 1;
string errMsg = 2;
}
message GetUserInfoFromCacheReq{
3 years ago
repeated string userIDList = 1;
string operationID = 2;
3 years ago
}
message GetUserInfoFromCacheResp{
3 years ago
CommonResp commonResp = 1;
3 years ago
repeated server_api_params.UserInfo userInfoList = 2;
3 years ago
}
message UpdateUserInfoToCacheReq{
3 years ago
repeated server_api_params.UserInfo userInfoList = 1;
3 years ago
string operationID = 2;
}
message UpdateUserInfoToCacheResp{
3 years ago
CommonResp commonResp = 1;
}
message GetFriendIDListFromCacheReq {
3 years ago
string userID = 1;
string operationID = 2;
3 years ago
}
message GetFriendIDListFromCacheResp {
repeated string userIDList = 1;
3 years ago
CommonResp commonResp = 2;
}
message AddFriendToCacheReq {
string userID = 1;
string friendID = 2;
string operationID = 3;
}
message AddFriendToCacheResp {
CommonResp commonResp = 1;
3 years ago
}
message ReduceFriendFromCacheReq {
string userID = 1;
string friendID = 2;
string operationID = 3;
}
message ReduceFriendFromCacheResp {
3 years ago
CommonResp commonResp = 1;
}
message GetBlackIDListFromCacheReq {
3 years ago
string userID = 1;
string operationID = 2;
}
3 years ago
message GetBlackIDListFromCacheResp {
repeated string userIDList = 1;
CommonResp commonResp = 2;
}
message AddBlackUserToCacheReq {
string userID = 1;
string blackUserID = 2;
string operationID = 3;
3 years ago
}
message AddBlackUserToCacheResp {
CommonResp commonResp = 1;
}
3 years ago
message ReduceBlackUserFromCacheReq {
string userID = 1;
string blackUserID = 2;
string operationID = 3;
3 years ago
}
message ReduceBlackUserFromCacheResp {
3 years ago
CommonResp commonResp = 1;
}
3 years ago
3 years ago
message GetGroupMemberIDListFromCacheReq {
string operationID = 1;
string groupID = 2;
}
message GetGroupMemberIDListFromCacheResp {
CommonResp commonResp = 1;
repeated string userIDList = 2;
}
message AddGroupMemberToCacheReq {
repeated string userIDList = 1;
string groupID = 2;
string operationID = 3;
}
message AddGroupMemberToCacheResp {
CommonResp commonResp = 1;
}
message ReduceGroupMemberFromCacheReq {
repeated string userIDList = 1;
string groupID = 2;
string operationID = 3;
}
message ReduceGroupMemberFromCacheResp {
CommonResp commonResp = 1;
}
3 years ago
service cache{
// userInfo
rpc GetUserInfoFromCache(GetUserInfoFromCacheReq) returns(GetUserInfoFromCacheResp);
rpc UpdateUserInfoToCache(UpdateUserInfoToCacheReq) returns(UpdateUserInfoToCacheResp);
// friendInfo
rpc GetFriendIDListFromCache(GetFriendIDListFromCacheReq) returns(GetFriendIDListFromCacheResp);
rpc AddFriendToCache(AddFriendToCacheReq) returns(AddFriendToCacheResp);
rpc ReduceFriendFromCache(ReduceFriendFromCacheReq) returns(ReduceFriendFromCacheResp);
// blackList
rpc GetBlackIDListFromCache(GetBlackIDListFromCacheReq) returns(GetBlackIDListFromCacheResp);
rpc AddBlackUserToCache(AddBlackUserToCacheReq) returns(AddBlackUserToCacheResp);
rpc ReduceBlackUserFromCache(ReduceBlackUserFromCacheReq) returns(ReduceBlackUserFromCacheResp);
3 years ago
// group
rpc GetGroupMemberIDListFromCache(GetGroupMemberIDListFromCacheReq) returns(GetGroupMemberIDListFromCacheResp);
rpc AddGroupMemberToCache(AddGroupMemberToCacheReq) returns(AddGroupMemberToCacheResp);
rpc ReduceGroupMemberFromCache(ReduceGroupMemberFromCacheReq) returns(ReduceGroupMemberFromCacheResp);
3 years ago
}
3 years ago