(req apicontract.ClaimTaskRunRequest)
| 753 | } |
| 754 | |
| 755 | func claimTaskRunFromRequest(req apicontract.ClaimTaskRunRequest) (taskpkg.ClaimRun, error) { |
| 756 | claim := taskpkg.ClaimRun{IdempotencyKey: strings.TrimSpace(req.IdempotencyKey)} |
| 757 | if err := claim.Validate("claim_run"); err != nil { |
| 758 | return taskpkg.ClaimRun{}, invalidParamsRPCError(err) |
| 759 | } |
| 760 | return claim, nil |
| 761 | } |
| 762 | |
| 763 | func startTaskRunFromRequest(req apicontract.StartTaskRunRequest) (taskpkg.StartRun, error) { |
| 764 | startReq := taskpkg.StartRun{IdempotencyKey: strings.TrimSpace(req.IdempotencyKey)} |
no test coverage detected