chore: 拆分 router (part I)

This commit is contained in:
2024-08-22 09:50:52 +08:00
parent 23218acc18
commit 7047d896f8
2 changed files with 34 additions and 0 deletions

18
router/router.go Normal file
View File

@ -0,0 +1,18 @@
package router
import (
"github.com/gin-gonic/gin"
"onvif-agent/router/handler"
)
func SetupRoutes(r *gin.Engine) {
// ONVIF 相关路由
userGroup := r.Group("/onvif")
{
connectionGroup := userGroup.Group("/connections")
{
connectionGroup.GET("/", handler.GetConnections)
connectionGroup.POST("/", handler.CreateConnection)
}
}
}