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" "gitlab.wodcloud.com/smart-operation/so-operation-api/src/router/middleware/header" ) // InitAlertListRouter 初始化预警列表配置路由 func InitAlertListRouter(e *gin.Engine) { group := e.Group(fmt.Sprintf("%s/alert", conf.Options.Prefix), header.SetContext) { group.GET("", controller.DetailAlert) group.GET("list", controller.ListAlert) group.PUT("", controller.UpdateAlert) group.PUT("batch/push", controller.BatchPushAlert) group.PUT("batch/close", controller.BatchCloseAlert) } }