35 lines
868 B
Go
35 lines
868 B
Go
package router
|
|
|
|
import (
|
|
"ego/internal/handler"
|
|
"ego/internal/middleware"
|
|
"ego/internal/wire"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
func init() {
|
|
apiRouterFns = append(apiRouterFns, func(group *gin.RouterGroup) {
|
|
SysDeployFileHandlerRouter(group, wire.InjectSysDeployFileHandler())
|
|
})
|
|
}
|
|
|
|
// SysDeployFileHandlerRouter 部署文件相关路由
|
|
// @Summary 部署文件管理路由
|
|
// @Description 包含部署文件的增删改查等接口
|
|
// @Tags 部署文件管理
|
|
// @Accept json
|
|
// @Produce json
|
|
func SysDeployFileHandlerRouter(group *gin.RouterGroup, h *handler.SysDeployFileHandler) {
|
|
// 部署文件管理路由组
|
|
g := group.Group("/deploy-files")
|
|
// 鉴权
|
|
g.Use(middleware.AuthRequired())
|
|
|
|
g.POST("/", h.Create)
|
|
g.GET("/:id", h.GetByID)
|
|
g.PUT("/", h.UpdateByID)
|
|
g.DELETE("/:id", h.DeleteByID)
|
|
g.GET("", h.GetByCondition)
|
|
}
|