1 Star 0 Fork 204

Jason/goAdapter

forked from shiyin1211/openGW 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
routerCommon.go 1.11 KB
一键复制 编辑 原始数据 按行查看 历史
shiyin1211 提交于 2020-06-28 18:15 . 创建工程
package main
import (
"github.com/gin-gonic/gin"
"net/http"
)
func routerCommon() http.Handler {
router := gin.Default()
//router := gin.New()
systemRouter := router.Group("/api/v1/system")
{
systemRouter.POST("/reboot",apiSystemReboot)
systemRouter.GET("/status",apiGetSystemStatus)
systemRouter.GET("/loginParam",apiSystemLoginParam)
}
networkRouter := router.Group("/api/v1/network")
{
networkRouter.POST("/param", apiSetNetwork)
networkRouter.GET("/param", apiGetNetwork)
networkRouter.GET("/linkstate", apiGetNetworkLinkState)
}
networkDHCPRouter := router.Group("/api/v1/network/dhcp")
{
networkDHCPRouter.POST("", apiSetNetwork)
networkDHCPRouter.GET("", apiGetNetwork)
}
serialRouter := router.Group("/api/v1/serial/param")
{
serialRouter.POST("",apiSetSerial)
serialRouter.GET("",apiGetSerial)
}
deviceRouter := router.Group("/api/v1/device")
{
//增加接口
deviceRouter.POST("/interface",apiAddInterface)
//修改接口
deviceRouter.PUT("/interface",apiModifyInterface)
//获取接口信息
deviceRouter.GET("/interface",apiGetInterfaceInfo)
}
return router
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/lghtjpu/goAdapter.git
git@gitee.com:lghtjpu/goAdapter.git
lghtjpu
goAdapter
goAdapter
master

搜索帮助