Validate ensures the query is internally consistent.
()
| 189 | |
| 190 | // Validate ensures the query is internally consistent. |
| 191 | func (q EventQuery) Validate() error { |
| 192 | if err := requirePositiveLimit(q.Limit, "event limit"); err != nil { |
| 193 | return err |
| 194 | } |
| 195 | if q.AfterSequence < 0 { |
| 196 | return fmt.Errorf("store: invalid event after sequence %d", q.AfterSequence) |
| 197 | } |
| 198 | return nil |
| 199 | } |
| 200 | |
| 201 | // TurnHistory groups ordered events by their turn identifier. |
| 202 | type TurnHistory struct { |
no test coverage detected