tunnel.go 1.1 KB

1234567891011121314151617181920212223242526272829
  1. package admin
  2. import (
  3. "github.com/gin-gonic/gin"
  4. v1 "server/api/v1"
  5. "server/middleware"
  6. )
  7. type TunnelRouter struct{}
  8. func (tr *TunnelRouter) InitTunnelRouter(Router *gin.RouterGroup) {
  9. tunnelRouter := Router.Group("tunnel").Use(middleware.OperationRecord())
  10. tunnelRouterWithoutRecord := Router.Group("tunnel")
  11. tunnelRouterApi := v1.ApiGroupApp.AdminApiGroup.TunnelApi
  12. {
  13. tunnelRouter.POST("queryTunnelList", tunnelRouterApi.QueryTunnelList)
  14. tunnelRouter.POST("createTunnel", tunnelRouterApi.CreateTunnel)
  15. tunnelRouter.PUT("updateTunnel", tunnelRouterApi.UpdateTunnel)
  16. tunnelRouter.PUT("updateTunnelLamp", tunnelRouterApi.UpdateTunnelLamp)
  17. tunnelRouter.PUT("updateTactics", tunnelRouterApi.UpdateTactics)
  18. tunnelRouter.PUT("updateTunnelsRegion", tunnelRouterApi.UpdateTunnelsRegion)
  19. tunnelRouter.PUT("updateTunnelTime", tunnelRouterApi.UpdateTunnelTime)
  20. tunnelRouter.DELETE("deleteTunnel", tunnelRouterApi.DeleteTunnel)
  21. }
  22. {
  23. tunnelRouterWithoutRecord.GET("queryAllTunnels", tunnelRouterApi.QueryAllTunnels)
  24. tunnelRouterWithoutRecord.GET("queryNoRegionTunnels", tunnelRouterApi.QueryNoRegionTunnels)
  25. }
  26. }