123456789101112131415161718192021222324252627 |
- package admin
- import (
- "github.com/gin-gonic/gin"
- v1 "server/api/v1"
- "server/middleware"
- )
- type TunnelRouter struct{}
- func (tr *TunnelRouter) InitTunnelRouter(Router *gin.RouterGroup) {
- tunnelRouter := Router.Group("tunnel").Use(middleware.OperationRecord())
- tunnelRouterWithoutRecord := Router.Group("tunnel")
- tunnelRouterApi := v1.ApiGroupApp.AdminApiGroup.TunnelApi
- {
- tunnelRouter.POST("queryTunnelList", tunnelRouterApi.QueryTunnelList)
- tunnelRouter.POST("createTunnel", tunnelRouterApi.CreateTunnel)
- tunnelRouter.PUT("updateTunnel", tunnelRouterApi.UpdateTunnel)
- tunnelRouter.PUT("updateTunnelsRegion", tunnelRouterApi.UpdateTunnelsRegion)
- tunnelRouter.PUT("updateTunnelTime", tunnelRouterApi.UpdateTunnelTime)
- tunnelRouter.DELETE("deleteTunnel", tunnelRouterApi.DeleteTunnel)
- }
- {
- tunnelRouterWithoutRecord.GET("queryAllTunnels", tunnelRouterApi.QueryAllTunnels)
- tunnelRouterWithoutRecord.GET("queryNoRegionTunnels", tunnelRouterApi.QueryNoRegionTunnels)
- }
- }
|