2016-10-19 16:22:02 +00:00
|
|
|
package client
|
|
|
|
|
|
|
|
import "golang.org/x/net/context"
|
|
|
|
|
|
|
|
// SecretRemove removes a Secret.
|
|
|
|
func (cli *Client) SecretRemove(ctx context.Context, id string) error {
|
2017-06-07 16:09:07 +00:00
|
|
|
if err := cli.NewVersionError("1.25", "secret remove"); err != nil {
|
|
|
|
return err
|
|
|
|
}
|
2016-10-19 16:22:02 +00:00
|
|
|
resp, err := cli.delete(ctx, "/secrets/"+id, nil, nil)
|
|
|
|
ensureReaderClosed(resp)
|
|
|
|
return err
|
|
|
|
}
|