Validate reports whether the actor identity contains a supported kind and non-empty reference.
(path string)
| 342 | |
| 343 | // Validate reports whether the actor identity contains a supported kind and non-empty reference. |
| 344 | func (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. |
| 355 | func (a ActorIdentity) IsZero() bool { |
no test coverage detected