mirror of
				https://github.com/optim-enterprises-bv/vault.git
				synced 2025-11-03 20:17:59 +00:00 
			
		
		
		
	api: Logical delete
This commit is contained in:
		@@ -39,3 +39,14 @@ func (c *Logical) Write(path string, data map[string]interface{}) (*Secret, erro
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	return nil, nil
 | 
						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)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user