camera.go 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. // Copyright 2019 github.com. All rights reserved.
  2. // Use of this source code is governed by github.com.
  3. package v1
  4. import (
  5. "smart-site-management-gateway/param/base"
  6. "smart-site-management-gateway/pb/v1"
  7. )
  8. type DeviceBindCameraBody struct {
  9. DeviceId int64 `json:"device_id" form:"device_id"`
  10. ChannelId int64 `json:"channel_id" form:"channel_id"`
  11. }
  12. type DeviceBindCameraRequest struct {
  13. base.Header
  14. DeviceBindCameraBody
  15. }
  16. type DeviceBindCameraResponse struct {
  17. base.Result
  18. }
  19. type DeviceUnbindCameraBody struct {
  20. DeviceId int64 `json:"device_id" form:"device_id"`
  21. ChannelId int64 `json:"channel_id" form:"channel_id"`
  22. }
  23. type DeviceUnbindCameraRequest struct {
  24. base.Header
  25. DeviceUnbindCameraBody
  26. }
  27. type DeviceUnbindCameraResponse struct {
  28. base.Result
  29. }
  30. type DeviceCameraQuery struct {
  31. DeviceId int64 `form:"device_id"`
  32. }
  33. type DeviceCameraRequest struct {
  34. base.Header
  35. DeviceCameraQuery
  36. }
  37. type DeviceCameraResponse struct {
  38. base.Result
  39. Data v1.CameraListItem `json:"data"`
  40. }
  41. type CameraListQuery struct {
  42. VssId int64 `form:"vss_id"`
  43. Page int32 `form:"page"`
  44. IsUnused bool `form:"is_unused"`
  45. }
  46. type CameraListRequest struct {
  47. base.Header
  48. CameraListQuery
  49. }
  50. type CameraUnusedItem struct {
  51. // 通道所属视频设备的sn
  52. VssSn string `protobuf:"bytes,1,opt,name=vss_sn,json=vssSn,proto3" json:"vss_sn"`
  53. // 摄像头所属视频设备的name
  54. VssName string `protobuf:"bytes,2,opt,name=vss_name,json=vssName,proto3" json:"vss_name"`
  55. // 摄像头id
  56. ChannelId int64 `protobuf:"varint,5,opt,name=channel_id,json=channelId,proto3" json:"channel_id"`
  57. // 摄像头所属视频设备的id
  58. VssId int64 `protobuf:"varint,6,opt,name=vss_id,json=vssId,proto3" json:"vss_id"`
  59. // 摄像头通道号
  60. ChannelNo string `protobuf:"bytes,7,opt,name=channel_no,json=channelNo,proto3" json:"channel_no"`
  61. ChannelName string `protobuf:"bytes,8,opt,name=channel_name,json=channelName,proto3" json:"channel_name"`
  62. }
  63. type CameraUnusedData struct {
  64. List []CameraUnusedItem `json:"list"`
  65. }
  66. type CameraUnusedListResponse struct {
  67. base.Result
  68. Data CameraUnusedData `json:"data"`
  69. }
  70. type CameraListResponse struct {
  71. base.Result
  72. Data v1.CameraListReply `json:"data"`
  73. }
  74. type ChannelListQuery struct {
  75. Sn string `form:"sn"`
  76. Page int32 `form:"page"`
  77. ChannelNo string `form:"channel_no"`
  78. PageSize int32 `form:"page_size"`
  79. }
  80. type ChannelListRequest struct {
  81. base.Header
  82. ChannelListQuery
  83. }
  84. type ChannelListResponse struct {
  85. base.Result
  86. Data v1.ChannelListReply `json:"data"`
  87. }
  88. type ChannelListUnbindData struct {
  89. List []*v1.ChannelItem `json:"list"`
  90. }
  91. type ChannelListUnbindResponse struct {
  92. base.Result
  93. Data ChannelListUnbindData `json:"data"`
  94. }
  95. type VedioListQuery struct {
  96. // 审核状态 0 待审核 1 通过 2 未通过
  97. FilterStatus string `form:"filter_status"`
  98. ProjectId int64 `form:"project_id"`
  99. Filter string `form:"filter"`
  100. Page int32 `form:"page"`
  101. }
  102. type VedioListRequest struct {
  103. base.Header
  104. VedioListQuery
  105. }
  106. type VedioListResponse struct {
  107. base.Result
  108. Data v1.VedioListReply `json:"data"`
  109. }
  110. type RealPlayQuery struct {
  111. ChannelNo string `form:"channel_no"`
  112. }
  113. type RealPlayRequest struct {
  114. base.Header
  115. RealPlayQuery
  116. }
  117. type RealPlayResponse struct {
  118. base.Result
  119. Data v1.RealPlayReply `json:"data"`
  120. }
  121. type PtzQuery struct {
  122. ChannelNo string `form:"channel_no"`
  123. PtzType string `form:"ptz_type"`
  124. PtzParam int32 `form:"ptz_param"`
  125. }
  126. type PtzRequest struct {
  127. base.Header
  128. PtzQuery
  129. }
  130. type PtzResponse struct {
  131. base.Result
  132. }
  133. type VedioPingQuery struct {
  134. SessionId string `form:"session_id"`
  135. }
  136. type VedioPingRequest struct {
  137. base.Header
  138. VedioPingQuery
  139. }
  140. type VedioPingResponse struct {
  141. base.Result
  142. Data v1.VedioPingReply `json:"data"`
  143. }
  144. type ChannelUpdateBody struct {
  145. Id int64 `form:"id"`
  146. Name string `form:"name"`
  147. }
  148. type ChannelUpdateRequest struct {
  149. base.Header
  150. ChannelUpdateBody
  151. }
  152. type ChannelUpdateResponse struct {
  153. base.Result
  154. }