Feed.proto 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. syntax = "proto3";
  2. package relation.v1;
  3. option go_package = "v1";
  4. import "github.com/gogo/protobuf/gogoproto/gogo.proto";
  5. service Feed {
  6. /** 获取粉丝数
  7. * 根据uid获取用户的粉丝数
  8. */
  9. rpc GetUserFc (FeedGetUserFcReq) returns (FeedGetUserFcResp);
  10. /** 获取粉丝数
  11. * 根据uid批量获取用户的粉丝数
  12. */
  13. rpc GetUserFcBatch (FeedGetUserFcBatchReq) returns (FeedGetUserFcBatchResp);
  14. /** 获取关注列表
  15. * 根据uid获取用户的关注列表
  16. */
  17. rpc get_attention_list (FeedGetAttentionListReq) returns (FeedGetAttentionListResp);
  18. }
  19. message FeedGetUserFcReq {
  20. // 用户uid
  21. int64 follow = 1 [(gogoproto.jsontag) = "follow"];
  22. }
  23. message FeedGetUserFcResp {
  24. //
  25. int64 code = 1 [(gogoproto.jsontag) = "code"];
  26. //
  27. string msg = 2 [(gogoproto.jsontag) = "msg"];
  28. //
  29. string message = 3 [(gogoproto.jsontag) = "message"];
  30. //
  31. Data data = 4 [(gogoproto.jsontag) = "data"];
  32. message Data {
  33. //
  34. int64 fc = 1 [(gogoproto.jsontag) = "fc"];
  35. }
  36. }
  37. message FeedGetUserFcBatchReq {
  38. // 用户uid
  39. repeated int64 uids = 1 [(gogoproto.jsontag) = "uids"];
  40. }
  41. message FeedGetUserFcBatchResp {
  42. //
  43. int64 code = 1 [(gogoproto.jsontag) = "code"];
  44. //
  45. string msg = 2 [(gogoproto.jsontag) = "msg"];
  46. //
  47. string message = 3 [(gogoproto.jsontag) = "message"];
  48. //
  49. map<int64, RelationList> data = 4 [(gogoproto.jsontag) = "data"];
  50. message RelationList {
  51. //
  52. int64 uid = 1 [(gogoproto.jsontag) = "uid"];
  53. //
  54. int64 fc = 2 [(gogoproto.jsontag) = "fc"];
  55. }
  56. }
  57. message FeedGetAttentionListReq {
  58. // 用户uid
  59. int64 uid = 1 [(gogoproto.jsontag) = "uid"];
  60. }
  61. message FeedGetAttentionListResp {
  62. //
  63. int64 code = 1 [(gogoproto.jsontag) = "code"];
  64. //
  65. string msg = 2 [(gogoproto.jsontag) = "msg"];
  66. //
  67. string message = 3 [(gogoproto.jsontag) = "message"];
  68. //
  69. Data data = 4 [(gogoproto.jsontag) = "data"];
  70. message Data {
  71. //
  72. repeated string list = 1 [(gogoproto.jsontag) = "list"];
  73. }
  74. }