Validate reports whether the task-run query filters are internally consistent.
(path string)
| 983 | |
| 984 | // Validate reports whether the task-run query filters are internally consistent. |
| 985 | func (q RunQuery) Validate(path string) error { |
| 986 | if q.Status.Normalize() != "" { |
| 987 | if err := q.Status.Validate(nestedPath(path, "status")); err != nil { |
| 988 | return err |
| 989 | } |
| 990 | } |
| 991 | if q.Limit < 0 { |
| 992 | return fmt.Errorf("%w: %s must be zero or positive: %d", ErrValidation, nestedPath(path, "limit"), q.Limit) |
| 993 | } |
| 994 | return nil |
| 995 | } |
| 996 | |
| 997 | // Validate reports whether the task-event query filters are internally consistent. |
| 998 | func (q EventQuery) Validate(path string) error { |
no test coverage detected