user.proto 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. syntax = "proto3";
  2. package api.user;
  3. import "google/api/annotations.proto";
  4. //import "google/protobuf/struct.proto";
  5. import "google/protobuf/empty.proto";
  6. import "api/chat/chat.proto";
  7. import "api/common/common.proto";
  8. import "api/statistics/statistics.proto";
  9. option go_package = "git.ikuban.com/server/pw-protobuf/api/user;user";
  10. option java_multiple_files = true;
  11. option java_package = "api.user";
  12. service User {
  13. // 更新用户信息
  14. rpc UpdateUserInformation (common.UpdateInformationRequest) returns (google.protobuf.Empty){
  15. option (google.api.http) = {
  16. post: "/api/user/update/information",
  17. body:"*"
  18. };
  19. };
  20. // 获取用户详情
  21. rpc GetUserInfo (google.protobuf.Empty) returns (UserInfo){
  22. option (google.api.http) = {
  23. post: "/api/user/info",
  24. body:"*"
  25. };
  26. };
  27. // 获取用户访问数详情
  28. rpc GetUserLookNum (google.protobuf.Empty) returns (statistics.LookMessageReply){
  29. option (google.api.http) = {
  30. post: "/api/user/look/num",
  31. body:"*"
  32. };
  33. };
  34. // 用户发送验证码
  35. rpc SendPhoneCode (common.SendPhoneCodeRequest) returns (google.protobuf.Empty){
  36. option (google.api.http) = {
  37. post: "/api/user/code/send",
  38. body:"*"
  39. };
  40. };
  41. // 用户验证验证码
  42. rpc CheckPhoneCode (common.CheckPhoneCodeRequest) returns (google.protobuf.Empty){
  43. option (google.api.http) = {
  44. post: "/api/user/code/check",
  45. body:"*"
  46. };
  47. };
  48. // 检查用户是否与接待员关联
  49. rpc CheckUserPartnerIsRelationship (common.PartnerIDParam) returns (chat.CheckUserPartnerIsRelationshipReply){
  50. option (google.api.http) = {
  51. post: "/api/user/check/relationship",
  52. body:"*"
  53. };
  54. };
  55. // 创建用户与接待员的关联
  56. rpc CreateUserPartnerIsRelationship (common.PartnerIDParam) returns (chat.CreateUserPartnerIsRelationshipReply){
  57. option (google.api.http) = {
  58. post: "/api/user/create/relationship",
  59. body:"*"
  60. };
  61. };
  62. // 获取接待员的确认通过页面信息
  63. rpc GetPartnerCircleInfo (KeyRequest) returns (common.AddFriendMessageInfo){
  64. option (google.api.http) = {
  65. post: "/api/user/circle/info",
  66. body:"*"
  67. };
  68. };
  69. // 用户获取主页信息
  70. rpc UserGetHomeInfo (common.PersonParam) returns (common.HomeInfo){
  71. option (google.api.http) = {
  72. post: "/api/user/home",
  73. body:"*"
  74. };
  75. };
  76. // 通过用户IDs查看用户信息列表
  77. rpc FindUserDBList (common.PersonIDList) returns (common.PersonDBReply);
  78. // 查看看过我的列表
  79. rpc FindLookList (common.ListPageRequest) returns (statistics.LookAndLikeListReply){
  80. option (google.api.http) = {
  81. post: "/api/user/list/look",
  82. body:"*"
  83. };
  84. };
  85. // 查看我喜欢的列表
  86. rpc FindLikeList (common.ListPageRequest) returns (statistics.LookAndLikeListReply){
  87. option (google.api.http) = {
  88. post: "/api/user/list/like",
  89. body:"*"
  90. };
  91. };
  92. // 查看喜欢我的列表
  93. rpc FindLikedList (common.ListPageRequest) returns (statistics.LookAndLikeListReply){
  94. option (google.api.http) = {
  95. post: "/api/user/list/liked",
  96. body:"*"
  97. };
  98. };
  99. // 获取用户的访客数以及关注数
  100. rpc GetLookAndLikeStatisticsMessage (common.PersonParam) returns (statistics.LookAndLikeMessageReply){
  101. option (google.api.http) = {
  102. post: "/api/user/num/like_look",
  103. body:"*"
  104. };
  105. };
  106. // 微信SDK初始化
  107. rpc WxConf (common.WxConfReq) returns (common.WxConfResponse){
  108. option (google.api.http) = {
  109. post: "/api/wx/jssdk/config",
  110. body:"*"
  111. };
  112. };
  113. // 获取标签列表
  114. rpc FindTagListByGroupNameAndSex (common.FindTagListByGroupNameAndSex) returns (common.TagListReply){
  115. option (google.api.http) = {
  116. post: "/api/user/list/tag",
  117. body:"*"
  118. };
  119. };
  120. }
  121. message UserInfo{
  122. string id = 1; // id
  123. string nickname = 2;// 昵称
  124. string avatarUrl =3;// 头像链接
  125. int64 age = 4;// 年龄
  126. int64 sex = 5;// 性别
  127. int64 credit = 6;// 积分
  128. }
  129. message KeyRequest{
  130. string key = 1;
  131. }