MCPcopy Create free account
hub / github.com/compozy/agh / Validate

Method Validate

internal/task/validate.go:1006–1019  ·  view source on GitHub ↗

Validate reports whether the task timeline query filters are internally consistent.

(path string)

Source from the content-addressed store, hash-verified

1004
1005// Validate reports whether the task timeline query filters are internally consistent.
1006func (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.
1022func (q StreamQuery) Validate(path string) error {

Callers 2

taskTimelineDomainQueryFunction · 0.95

Calls 1

nestedPathFunction · 0.70

Tested by

no test coverage detected