1234567891011121314151617181920212223242526272829 |
- package devices
- import (
- "github.com/gin-gonic/gin"
- v1 "server/api/v1"
- "server/middleware"
- )
- type GateWayRouter struct{}
- func (g *GateWayRouter) InitGateWayRouter(Router *gin.RouterGroup, RouterPub *gin.RouterGroup) {
- gatewayRouter := Router.Group("gateway").Use(middleware.OperationRecord())
- gatewayRouterWithoutRecord := Router.Group("gateway")
- apiPublicRouterWithoutRecord := RouterPub.Group("gateway")
- baseApi := v1.ApiGroupApp.DevicesApiGroup.GateWayApi
- {
- gatewayRouter.POST("addGateway", baseApi.AddGateway)
- gatewayRouter.POST("updateGateway", baseApi.UpdateGateway)
- gatewayRouter.DELETE("delGateway", baseApi.DelGateway)
- }
- {
- gatewayRouterWithoutRecord.POST("getGateWayList", baseApi.GateWayList)
-
- }
- {
- apiPublicRouterWithoutRecord.GET("getPublicGateway", baseApi.PublicGateway)
- }
- }
|