service.proto 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. syntax = "proto3";
  2. option java_package = "pleiades.business.service.season.season.v1";
  3. package pgc.service.season.season.v1;
  4. option java_multiple_files = true;
  5. option go_package = "v1";
  6. import "app/service/openplatform/pgc-season/api/grpc/season/v1/model.proto";
  7. // SeasonInfoReq season请求参数
  8. message SeasonInfoReq {
  9. // season_ids
  10. repeated int32 season_ids = 1;
  11. }
  12. // CardsInfoReply 卡片列表返回值
  13. message CardsInfoReply {
  14. // cards
  15. map<int32, CardInfoProto> cards = 1;
  16. }
  17. // SeasonIdReq season请求参数
  18. message SeasonIdReq {
  19. // season_id
  20. int32 season_id = 1;
  21. }
  22. // ProfileInfoReply 详情返回值
  23. message ProfileInfoReply {
  24. // prfile
  25. ProfileInfoProto profile = 1;
  26. }
  27. // SeasonAidReq aids请求参数
  28. message SeasonAidReq {
  29. //aids
  30. repeated int32 aids = 1;
  31. }
  32. // SectionReq 请求参数
  33. message SectionReq {
  34. // season_ids
  35. repeated int32 season_ids = 1;
  36. }
  37. // SectionReply 分节信息返回值
  38. message SectionReply {
  39. // sections
  40. map<int32, SectionProto> sections = 1;
  41. }
  42. // SeriesReq 请求参数
  43. message SeriesSeasonReq {
  44. // series_ids
  45. repeated int32 series_ids = 1;
  46. }
  47. // SeriesReply series
  48. message SeriesSeasonReply {
  49. // seriesSeason
  50. map<int32, SeriesSeasonsProto> seasons = 1;
  51. }
  52. // TimelineReq 时间表请求参数
  53. message TimelineReq {
  54. // 开始时间戳
  55. int64 start = 1;
  56. // 结束时间戳
  57. int64 end = 2;
  58. // 类型
  59. repeated int32 types = 3;
  60. // 排序方式,默认0,按照更新时间正序,1表示按照更新时间倒序
  61. int32 sort = 4;
  62. }
  63. // TimelineReply 时间表返回
  64. message TimelineReply {
  65. repeated TimelineProto timeline = 1;
  66. }
  67. // Season service
  68. service Season {
  69. // 根据season_ids返回卡片信息
  70. rpc Cards (SeasonInfoReq) returns (CardsInfoReply);
  71. // 根据aids返回卡片信息
  72. rpc CardsByAids (SeasonAidReq) returns (CardsInfoReply);
  73. // 根据season_id返回详情
  74. rpc Profile (SeasonIdReq) returns (ProfileInfoReply);
  75. // 根据开始结束时间和type获取时间表信息
  76. rpc Timeline (TimelineReq) returns (TimelineReply);
  77. // 根据season_ids返回分节信息
  78. rpc Sections (SectionReq) returns (SectionReply);
  79. // 根据series返回season信息
  80. rpc SeriesSeason (SeriesSeasonReq) returns (SeriesSeasonReply);
  81. // 根据season_id清除season相关mc 缓存
  82. rpc ClearCache (SeasonIdReq) returns (EmptyProto);
  83. }