(spec EnqueueRun)
| 2668 | } |
| 2669 | |
| 2670 | func normalizeEnqueueRunSpec(spec EnqueueRun) (EnqueueRun, error) { |
| 2671 | normalized := spec |
| 2672 | normalized.TaskID = strings.TrimSpace(normalized.TaskID) |
| 2673 | normalized.IdempotencyKey = strings.TrimSpace(normalized.IdempotencyKey) |
| 2674 | normalized.NetworkChannel = strings.TrimSpace(normalized.NetworkChannel) |
| 2675 | normalized.DesignationGroupID = strings.TrimSpace(normalized.DesignationGroupID) |
| 2676 | normalized.Metadata = normalizeRawJSON(normalized.Metadata) |
| 2677 | if err := normalized.Validate("enqueue_run"); err != nil { |
| 2678 | return EnqueueRun{}, err |
| 2679 | } |
| 2680 | return normalized, nil |
| 2681 | } |
| 2682 | |
| 2683 | func normalizeClaimRun(claim ClaimRun) (ClaimRun, error) { |
| 2684 | normalized := claim |
no test coverage detected