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

Method Validate

internal/task/validate.go:344–352  ·  view source on GitHub ↗

Validate reports whether the actor identity contains a supported kind and non-empty reference.

(path string)

Source from the content-addressed store, hash-verified

342
343// Validate reports whether the actor identity contains a supported kind and non-empty reference.
344func (a ActorIdentity) Validate(path string) error {
345 if err := a.Kind.Validate(nestedPath(path, "kind")); err != nil {
346 return err
347 }
348 if strings.TrimSpace(a.Ref) == "" {
349 return fmt.Errorf("%w: %s is required", ErrValidation, nestedPath(path, "ref"))
350 }
351 return nil
352}
353
354// IsZero reports whether the actor identity is empty.
355func (a ActorIdentity) IsZero() bool {

Callers 2

normalizeTaskTriageActorFunction · 0.95
normalizeTaskInboxActorFunction · 0.95

Calls 2

nestedPathFunction · 0.70
ValidateMethod · 0.65

Tested by

no test coverage detected