12345678910111213141516171819202122 |
- package app
- import (
- "github.com/gin-gonic/gin"
- v1 "lc-fangdaosha/api/v1"
- )
- type GatewayRouter struct {
- }
- // InitGatewayRouter 初始化网关路由信息
- func (s *GatewayRouter) InitGatewayRouter(Router *gin.RouterGroup) {
- var gwApi = v1.ApiGroupApp.AppApiGroup.GatewayApi
- gwGroup := Router.Group("gateways")
- {
- gwGroup.GET("all", gwApi.List) //获取网关列表
- gwGroup.PUT("adminSet", gwApi.AdminSet) //管理员设置osn和给网关分配用户
- gwGroup.PUT("userSet", gwApi.UserSet) //用户设置网关名和描述信息
- gwGroup.DELETE("delete", gwApi.DeleteGateways) //删除网关及其关联设备
- gwGroup.PUT("unbind", gwApi.UnbindGateways) //解绑网关下的设备
- }
- }
|