livecheck.proto 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. syntax = "proto3";
  2. package live.resource.v1;
  3. option go_package = "v1";
  4. import "github.com/gogo/protobuf/gogoproto/gogo.proto";
  5. //LiveCheck 移动端请求接口
  6. message LiveCheckReq {
  7. // 平台
  8. string platform = 1 [(gogoproto.moretags) = 'form:"platform" validate:"required"'];
  9. // 操作系统
  10. string system = 2 [(gogoproto.moretags) = 'form:"system" validate:"required"'];
  11. // 设备
  12. string mobile = 3 [(gogoproto.moretags) = 'form:"mobile" validate:"required"'];
  13. }
  14. message LiveCheckResp {
  15. int64 is_live = 1 [(gogoproto.jsontag) = "is_live"];
  16. }
  17. //提供给后台查询开播设备黑名单
  18. message GetLiveCheckListReq {
  19. }
  20. message GetLiveCheckListResp {
  21. // android
  22. repeated Platform android = 1 [(gogoproto.jsontag) = "android"];
  23. // ios
  24. repeated Platform ios = 2 [(gogoproto.jsontag) = "ios"];
  25. message Platform {
  26. // os
  27. string system = 1 [(gogoproto.jsontag) = "system"];
  28. // device
  29. repeated string mobile = 2 [(gogoproto.jsontag) = "mobile"];
  30. }
  31. }
  32. //提供给后台新增live_check添加黑名单
  33. message AddLiveCheckReq {
  34. string live_check = 1 [(gogoproto.moretags) = 'form:"live_check" validate:"required"'];
  35. }
  36. message AddLiveCheckResp {
  37. }
  38. service LiveCheck {
  39. //客户端获取能否直播接口
  40. rpc LiveCheck (LiveCheckReq) returns (LiveCheckResp);
  41. //后台查询所有配置设备黑名单
  42. rpc GetLiveCheckList (GetLiveCheckListReq) returns (GetLiveCheckListResp);
  43. //后台添加能否直播设备黑名单
  44. rpc AddLiveCheck (AddLiveCheckReq) returns (AddLiveCheckResp);
  45. }