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

Method Validate

internal/task/validate.go:985–995  ·  view source on GitHub ↗

Validate reports whether the task-run query filters are internally consistent.

(path string)

Source from the content-addressed store, hash-verified

983
984// Validate reports whether the task-run query filters are internally consistent.
985func (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.
998func (q EventQuery) Validate(path string) error {

Callers 2

taskRunListDomainQueryFunction · 0.95
taskRunQueryFromParamsFunction · 0.95

Calls 3

nestedPathFunction · 0.70
ValidateMethod · 0.65
NormalizeMethod · 0.45

Tested by

no test coverage detected