12345678910111213141516171819202122232425262728 |
- package app
- import (
- "github.com/gin-gonic/gin"
- v1 "lc-fangdaosha/api/v1"
- "lc-fangdaosha/middleware"
- )
- type CameraRouter struct {
- }
- // InitCameraRouter 初始化摄像机路由信息
- func (s *CameraRouter) InitCameraRouter(Router *gin.RouterGroup) {
- cameraRouter := Router.Group("camera").Use(middleware.OperationRecord())
- cameraRouterWithoutRecord := Router.Group("camera")
- var cameraApi = v1.ApiGroupApp.AppApiGroup.CameraApi
- {
- cameraRouter.POST("createCamera", cameraApi.CreateCamera) // 新建摄像机
- cameraRouter.DELETE("deleteCamera", cameraApi.DeleteCamera) // 删除摄像机
- cameraRouter.DELETE("deleteCameraByIds", cameraApi.DeleteCameraByIds) // 批量删除摄像机
- cameraRouter.PUT("updateCamera", cameraApi.UpdateCamera) // 更新摄像机
- cameraRouter.GET("rewind", cameraApi.RewindText) //获取回话数据
- }
- {
- cameraRouterWithoutRecord.GET("findCamera", cameraApi.FindCamera) // 根据ID获取摄像机
- }
- }
|