(operatorConfig OperatorConfig, apiName string, jobID string)
| 80 | } |
| 81 | |
| 82 | func GetBatchJob(operatorConfig OperatorConfig, apiName string, jobID string) (schema.BatchJobResponse, error) { |
| 83 | endpoint := path.Join("/batch", apiName) |
| 84 | httpRes, err := HTTPGet(operatorConfig, endpoint, map[string]string{"jobID": jobID}) |
| 85 | if err != nil { |
| 86 | return schema.BatchJobResponse{}, err |
| 87 | } |
| 88 | |
| 89 | var jobRes schema.BatchJobResponse |
| 90 | if err = json.Unmarshal(httpRes, &jobRes); err != nil { |
| 91 | return schema.BatchJobResponse{}, errors.Wrap(err, endpoint, string(httpRes)) |
| 92 | } |
| 93 | |
| 94 | return jobRes, nil |
| 95 | } |
| 96 | |
| 97 | func GetTaskJob(operatorConfig OperatorConfig, apiName string, jobID string) (schema.TaskJobResponse, error) { |
| 98 | endpoint := path.Join("/tasks", apiName) |
no test coverage detected