Validate reports whether the task timeline query filters are internally consistent.
(path string)
| 1004 | |
| 1005 | // Validate reports whether the task timeline query filters are internally consistent. |
| 1006 | func (q TimelineQuery) Validate(path string) error { |
| 1007 | if q.AfterSequence < 0 { |
| 1008 | return fmt.Errorf( |
| 1009 | "%w: %s must be zero or positive: %d", |
| 1010 | ErrValidation, |
| 1011 | nestedPath(path, "after_sequence"), |
| 1012 | q.AfterSequence, |
| 1013 | ) |
| 1014 | } |
| 1015 | if q.Limit < 0 { |
| 1016 | return fmt.Errorf("%w: %s must be zero or positive: %d", ErrValidation, nestedPath(path, "limit"), q.Limit) |
| 1017 | } |
| 1018 | return nil |
| 1019 | } |
| 1020 | |
| 1021 | // Validate reports whether the task stream query filters are internally consistent. |
| 1022 | func (q StreamQuery) Validate(path string) error { |
no test coverage detected