mirror of
https://github.com/hashicorp/vault.git
synced 2025-11-24 04:01:37 +01:00
api: Logical delete
This commit is contained in:
parent
95c9fabbe2
commit
23a8cdc92a
@ -39,3 +39,14 @@ func (c *Logical) Write(path string, data map[string]interface{}) (*Secret, erro
|
||||
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (c *Logical) Delete(path string) (*Secret, error) {
|
||||
r := c.c.NewRequest("DELETE", "/v1/"+path)
|
||||
resp, err := c.c.RawRequest(r)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
return ParseSecret(resp.Body)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user