chat.proto 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. syntax = "proto3";
  2. package api.chat;
  3. //import "google/api/annotations.proto";
  4. //import "google/protobuf/struct.proto";
  5. //import "google/protobuf/empty.proto";
  6. import "api/common/common.proto";
  7. option go_package = "git.ikuban.com/server/pw-protobuf/api/chat;chat";
  8. option java_multiple_files = true;
  9. option java_package = "api.chat";
  10. service Chat {
  11. // 检查用户是否与接待员聊天
  12. rpc CheckUserPartnerIsRelationship (common.UserAndPartnerIdParam) returns (CheckUserPartnerIsRelationshipReply);
  13. // 创建聊天房间
  14. rpc CreateChatRoom (CreateChatRoomParam) returns (RoomReply);
  15. // 查询在线人的列表
  16. rpc FindOnlinePersonList (common.ListPageAndPersonRequest) returns (common.OnlinePersonListReply);
  17. rpc Receive (ReceiveRequest) returns (ReceiveReply){};
  18. }
  19. message CreateChatRoomParam {
  20. string personId1 = 1;
  21. string personIdentifyID1 = 2; // 身份ID
  22. string personType1 = 3; // 类型
  23. string personId2 = 4;
  24. string personIdentifyID2 = 5; // 身份ID
  25. string personType2 = 6; // 类型
  26. }
  27. message ReceiveRequest{
  28. string method = 1;
  29. bytes data = 2;
  30. string id = 3;
  31. string websocketTag = 4;
  32. string personType = 5;
  33. string personId = 6;
  34. }
  35. message ReceiveReply{
  36. }
  37. message CheckUserPartnerIsRelationshipReply{
  38. bool isBuildRelationship = 1;
  39. int64 roomId = 2;
  40. }
  41. message RoomReply{
  42. int64 roomId = 1;
  43. }