camera.go 1010 B

12345678910111213141516171819202122232425262728
  1. package app
  2. import (
  3. "github.com/gin-gonic/gin"
  4. v1 "lc-fangdaosha/api/v1"
  5. "lc-fangdaosha/middleware"
  6. )
  7. type CameraRouter struct {
  8. }
  9. // InitCameraRouter 初始化摄像机路由信息
  10. func (s *CameraRouter) InitCameraRouter(Router *gin.RouterGroup) {
  11. cameraRouter := Router.Group("camera").Use(middleware.OperationRecord())
  12. cameraRouterWithoutRecord := Router.Group("camera")
  13. var cameraApi = v1.ApiGroupApp.AppApiGroup.CameraApi
  14. {
  15. cameraRouter.POST("createCamera", cameraApi.CreateCamera) // 新建摄像机
  16. cameraRouter.DELETE("deleteCamera", cameraApi.DeleteCamera) // 删除摄像机
  17. cameraRouter.DELETE("deleteCameraByIds", cameraApi.DeleteCameraByIds) // 批量删除摄像机
  18. cameraRouter.PUT("updateCamera", cameraApi.UpdateCamera) // 更新摄像机
  19. cameraRouter.GET("rewind", cameraApi.RewindText) //获取回话数据
  20. }
  21. {
  22. cameraRouterWithoutRecord.GET("findCamera", cameraApi.FindCamera) // 根据ID获取摄像机
  23. }
  24. }