api.proto 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. syntax = "proto3";
  2. import "github.com/gogo/protobuf/gogoproto/gogo.proto";
  3. package bbq.interface.bullet.v1;
  4. option go_package = "api";
  5. option (gogoproto.goproto_getters_all) = false;
  6. message DataReport {
  7. string app = 1 [(gogoproto.jsontag) = "mobi_app", (gogoproto.moretags)='form:"mobi_app"'];
  8. string client = 2 [(gogoproto.jsontag) = "platform", (gogoproto.moretags)='form:"platform"'];
  9. string version = 3 [(gogoproto.jsontag) = "version", (gogoproto.moretags)='form:"version"'];
  10. string channel = 4 [(gogoproto.jsontag) = "channel", (gogoproto.moretags)='form:"channel"'];
  11. string location = 5 [(gogoproto.jsontag) = "location", (gogoproto.moretags)='form:"location"'];
  12. string query_id = 6 [(gogoproto.jsontag) = "query_id", (gogoproto.moretags)='form:"query_id"'];
  13. string buvid = 7 [(gogoproto.jsontag) = "buvid", (gogoproto.moretags)='form:"buvid"'];
  14. int64 svid = 8 [(gogoproto.jsontag) = "svid", (gogoproto.moretags)='form:"oid"'];
  15. int32 total_duration = 9 [(gogoproto.jsontag) = "total_duration", (gogoproto.moretags)='form:"total_duration"'];
  16. int32 play_duration = 10 [(gogoproto.jsontag) = "duration", (gogoproto.moretags)='form:"duration"'];
  17. int32 data_type = 11 [(gogoproto.jsontag) = "data_type", (gogoproto.moretags)='form:"data_type"'];
  18. int32 page = 12 [(gogoproto.jsontag) = "page_id", (gogoproto.moretags)='form:"page_id"'];
  19. int32 module = 13 [(gogoproto.jsontag) = "module_id", (gogoproto.moretags)='form:"module_id"'];
  20. }
  21. message ListBulletReq {
  22. int64 oid = 1 [(gogoproto.moretags)='form:"oid"'];
  23. int32 start_ms = 2 [(gogoproto.moretags)='form:"start_ms"'];
  24. int32 end_ms = 3 [(gogoproto.moretags)='form:"end_ms"'];
  25. string cursor_next = 4 [(gogoproto.moretags)='form:"cursor_next"'];
  26. int64 mid = 5;
  27. }
  28. message Bullet {
  29. int64 id = 1;
  30. int64 oid = 2[(gogoproto.moretags)='form:"oid"'];
  31. int64 mid = 3[(gogoproto.jsontag) = "mid", (gogoproto.moretags)='form:"mid"'];
  32. int32 offset_ms = 4[(gogoproto.jsontag) = "offset_ms", (gogoproto.moretags)='form:"offset_ms"'];
  33. int32 offset = 5;
  34. string content = 6[(gogoproto.jsontag) = "content", (gogoproto.moretags)='form:"content"'];
  35. string cursor_value = 7[(gogoproto.jsontag) = "cursor_value,omitempty"];
  36. }
  37. message ListBulletReply {
  38. bool has_more = 1 [(gogoproto.jsontag) = "has_more"];
  39. repeated Bullet list = 2 [(gogoproto.jsontag) = "list,omitempty"];
  40. }