api.proto 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. syntax = "proto3";
  2. package push.service.v1;
  3. option go_package = "v1";
  4. import "github.com/gogo/protobuf/gogoproto/gogo.proto";
  5. service Push {
  6. rpc AddReport (AddReportRequest) returns (AddReportReply) {}
  7. rpc DelReport (DelReportRequest) returns (DelReportReply) {}
  8. rpc DelInvalidReports (DelInvalidReportsRequest) returns (DelInvalidReportsReply) {}
  9. rpc AddReportCache (AddReportCacheRequest) returns (AddReportCacheReply) {}
  10. rpc AddUserReportCache (AddUserReportCacheRequest) returns (AddUserReportCacheReply) {}
  11. rpc AddTokenCache (AddTokenCacheRequest) returns (AddTokenCacheReply) {}
  12. rpc AddTokensCache (AddTokensCacheRequest) returns (AddTokensCacheReply) {}
  13. rpc AddCallback (AddCallbackRequest) returns (AddCallbackReply) {}
  14. rpc AddMidProgress (AddMidProgressRequest) returns (AddMidProgressReply) {}
  15. rpc Setting (SettingRequest) returns (SettingReply) {}
  16. rpc SetSetting (SetSettingRequest) returns (SetSettingReply) {}
  17. }
  18. message ModelReport {
  19. int64 id = 1 [(gogoproto.customname) = "ID"];
  20. int32 app_id = 2 [(gogoproto.customname) = "APPID"];
  21. int32 platform_id = 3 [(gogoproto.customname) = "PlatformID"];
  22. int64 mid = 4;
  23. string buvid = 5;
  24. string device_token = 6;
  25. int32 build = 7;
  26. int32 time_zone = 8;
  27. int32 notify_switch = 9;
  28. string device_brand = 10;
  29. string device_model = 11;
  30. string os_version = 12 [(gogoproto.customname) = "OSVersion"];
  31. string extra = 13;
  32. }
  33. message AddReportRequest {
  34. ModelReport report = 1;
  35. }
  36. message AddReportReply {}
  37. message DelReportRequest {
  38. int32 app_id = 1 [(gogoproto.customname) = "APPID"];
  39. int64 mid = 2;
  40. string device_token = 3;
  41. }
  42. message DelReportReply {}
  43. message DelInvalidReportsRequest {
  44. int32 type = 1;
  45. }
  46. message DelInvalidReportsReply {}
  47. message AddReportCacheRequest {
  48. ModelReport report = 1;
  49. }
  50. message AddReportCacheReply {}
  51. message AddUserReportCacheRequest {
  52. int64 mid = 1;
  53. repeated ModelReport reports = 2;
  54. }
  55. message AddUserReportCacheReply {}
  56. message AddTokenCacheRequest {
  57. ModelReport report = 1;
  58. }
  59. message AddTokenCacheReply {}
  60. message AddTokensCacheRequest {
  61. repeated ModelReport reports = 2;
  62. }
  63. message AddTokensCacheReply {}
  64. message AddCallbackRequest {
  65. string task = 1;
  66. int64 app = 2 [(gogoproto.customname) = "APP"];
  67. int32 platform = 3;
  68. int64 mid = 4;
  69. int32 pid = 5;
  70. string token = 6;
  71. string buvid = 7;
  72. int32 click = 8;
  73. CallbackExtra extra = 9;
  74. }
  75. message AddCallbackReply {}
  76. message CallbackExtra {
  77. int32 status = 1 [(gogoproto.moretags) = 'json:"st'];
  78. int32 channel = 2 [(gogoproto.moretags) = 'json:"chan"'];
  79. }
  80. message AddMidProgressRequest {
  81. string task = 1;
  82. int64 mid_total = 2;
  83. int64 mid_valid = 3;
  84. }
  85. message AddMidProgressReply {}
  86. message SettingRequest {
  87. int64 mid = 1;
  88. }
  89. message SettingReply {
  90. map<int32, int32> settings = 1;
  91. }
  92. message SetSettingRequest {
  93. int64 mid = 1;
  94. int32 type = 2;
  95. int32 value = 3;
  96. }
  97. message SetSettingReply {}