package router import ( "fmt" "github.com/gin-gonic/gin" "gitlab.wodcloud.com/smart-operation/so-operation-api/src/common/conf" "gitlab.wodcloud.com/smart-operation/so-operation-api/src/controller" ) // InitAutomatedMaintenRouter 初始化自动化运维路由 func InitAutomatedMaintenRouter(e *gin.Engine) { so := e.Group(fmt.Sprintf("%s/automatedMainten", conf.Options.Prefix)) //任务管理 task := so.Group("/taskManage") { task.POST("/add", controller.AddTaskManage) // 新增 task.PUT("/edit", controller.EditTaskManage) // 编辑 task.DELETE("/del", controller.DelTaskManage) // 删除 task.GET("/details", controller.DetailsTaskManage) // 详情 task.GET("/list", controller.ListTaskManage) // 列表 } //主机管理 host := so.Group("/hostManage") { host.POST("/add") // 新增 host.PUT("/edit") // 编辑 host.DELETE("/del") // 删除 host.GET("/details") // 详情 host.GET("/list") // 列表 } }