| 13 | } |
| 14 | |
| 15 | func deleteGPGKey(httpClient *http.Client, host, id string) error { |
| 16 | path, err := safeurl.JoinPath("user", "gpg_keys", id) |
| 17 | if err != nil { |
| 18 | return err |
| 19 | } |
| 20 | // TODO(api-client-rollout) |
| 21 | // This line of code is part of a mechanical roll out of the api client. |
| 22 | // As a follow up, consider whether the api client can be injected to this call site, rather than constructed |
| 23 | return api.NewClientFromHTTP(httpClient).REST(host, "DELETE", path.String(), nil, nil) |
| 24 | } |
| 25 | |
| 26 | func getGPGKeys(httpClient *http.Client, host string) ([]gpgKey, error) { |
| 27 | u, err := safeurl.JoinPath("user", "gpg_keys") |