(operatorConfig OperatorConfig, apiName string, force bool)
| 24 | ) |
| 25 | |
| 26 | func Refresh(operatorConfig OperatorConfig, apiName string, force bool) (schema.RefreshResponse, error) { |
| 27 | params := map[string]string{ |
| 28 | "force": s.Bool(force), |
| 29 | } |
| 30 | |
| 31 | httpRes, err := HTTPPostNoBody(operatorConfig, "/refresh/"+apiName, params) |
| 32 | if err != nil { |
| 33 | return schema.RefreshResponse{}, err |
| 34 | } |
| 35 | |
| 36 | var refreshRes schema.RefreshResponse |
| 37 | err = json.Unmarshal(httpRes, &refreshRes) |
| 38 | if err != nil { |
| 39 | return schema.RefreshResponse{}, errors.Wrap(err, "/refresh", string(httpRes)) |
| 40 | } |
| 41 | |
| 42 | return refreshRes, nil |
| 43 | } |
no test coverage detected