(req dto.AlertConfigQuery)
| 482 | } |
| 483 | |
| 484 | func (a AlertService) GetAlertConfig(req dto.AlertConfigQuery) ([]model.AlertConfig, error) { |
| 485 | var ( |
| 486 | opts []repo.DBOption |
| 487 | configs []model.AlertConfig |
| 488 | ) |
| 489 | if len(req.ExcludeTypes) > 0 { |
| 490 | opts = append(opts, alertRepo.WithByTypeNotIn(req.ExcludeTypes)) |
| 491 | } |
| 492 | opts = append(opts, repo.WithByStatus(constant.AlertEnable)) |
| 493 | configs, err := alertRepo.AlertConfigList(opts...) |
| 494 | return configs, err |
| 495 | } |
| 496 | |
| 497 | func (a AlertService) PageAlertConfig(req dto.AlertConfigPageReq) (int64, []model.AlertConfig, error) { |
| 498 | opts := []repo.DBOption{ |
nothing calls this directly
no test coverage detected