(operatorConfig OperatorConfig, apiName string, jobID string)
| 95 | } |
| 96 | |
| 97 | func GetTaskJob(operatorConfig OperatorConfig, apiName string, jobID string) (schema.TaskJobResponse, error) { |
| 98 | endpoint := path.Join("/tasks", apiName) |
| 99 | httpRes, err := HTTPGet(operatorConfig, endpoint, map[string]string{"jobID": jobID}) |
| 100 | if err != nil { |
| 101 | return schema.TaskJobResponse{}, err |
| 102 | } |
| 103 | |
| 104 | var jobRes schema.TaskJobResponse |
| 105 | if err = json.Unmarshal(httpRes, &jobRes); err != nil { |
| 106 | return schema.TaskJobResponse{}, errors.Wrap(err, endpoint, string(httpRes)) |
| 107 | } |
| 108 | |
| 109 | return jobRes, nil |
| 110 | } |
no test coverage detected