Validate reports whether the enqueue-run request is internally consistent.
(path string)
| 872 | |
| 873 | // Validate reports whether the enqueue-run request is internally consistent. |
| 874 | func (r EnqueueRun) Validate(path string) error { |
| 875 | if strings.TrimSpace(r.TaskID) == "" { |
| 876 | return fmt.Errorf("%w: %s is required", ErrValidation, nestedPath(path, "task_id")) |
| 877 | } |
| 878 | if err := ValidateMetadataSize(r.Metadata, nestedPath(path, "metadata")); err != nil { |
| 879 | return err |
| 880 | } |
| 881 | return nil |
| 882 | } |
| 883 | |
| 884 | // Validate reports whether the task execution request is internally consistent. |
| 885 | func (r ExecutionRequest) Validate(path string) error { |
no test coverage detected