(ctx context.Context, filter map[string][]string)
| 973 | } |
| 974 | |
| 975 | func (c *Client) DeleteAlertWithFilter(ctx context.Context, filter map[string][]string) (int, error) { |
| 976 | preds, err := alertPredicatesFromFilter(filter) |
| 977 | if err != nil { |
| 978 | return 0, err |
| 979 | } |
| 980 | |
| 981 | return c.Ent.Alert.Delete().Where(preds...).Exec(ctx) |
| 982 | } |
| 983 | |
| 984 | func (c *Client) GetAlertByID(ctx context.Context, alertID int) (*ent.Alert, error) { |
| 985 | alert, err := c.Ent.Alert.Query().Where(alert.IDEQ(alertID)).WithDecisions().WithEvents().WithMetas().WithOwner().First(ctx) |
no test coverage detected