(ctx context.Context, user string, name string)
| 97 | } |
| 98 | |
| 99 | func (c *Client) DeleteUserSecret(ctx context.Context, user string, name string) error { |
| 100 | res, err := c.Request(ctx, http.MethodDelete, fmt.Sprintf("/api/v2/users/%s/secrets/%s", user, name), nil) |
| 101 | if err != nil { |
| 102 | return err |
| 103 | } |
| 104 | defer res.Body.Close() |
| 105 | if res.StatusCode != http.StatusNoContent { |
| 106 | return ReadBodyAsError(res) |
| 107 | } |
| 108 | return nil |
| 109 | } |