(operatorConfig OperatorConfig, apiName string)
| 38 | } |
| 39 | |
| 40 | func GetAPI(operatorConfig OperatorConfig, apiName string) ([]schema.APIResponse, error) { |
| 41 | httpRes, err := HTTPGet(operatorConfig, "/get/"+apiName) |
| 42 | if err != nil { |
| 43 | return nil, err |
| 44 | } |
| 45 | |
| 46 | var apiRes []schema.APIResponse |
| 47 | if err = json.Unmarshal(httpRes, &apiRes); err != nil { |
| 48 | return nil, errors.Wrap(err, "/get/"+apiName, string(httpRes)) |
| 49 | } |
| 50 | |
| 51 | return apiRes, nil |
| 52 | } |
| 53 | |
| 54 | func DescribeAPI(operatorConfig OperatorConfig, apiName string) ([]schema.APIResponse, error) { |
| 55 | httpRes, err := HTTPGet(operatorConfig, "/describe/"+apiName) |
no test coverage detected