MCPcopy Create free account
hub / github.com/cloudfoundry/credhub-cli / Delete

Method Delete

credhub/delete.go:9–19  ·  view source on GitHub ↗

Delete will delete all versions of a credential by name

(name string)

Source from the content-addressed store, hash-verified

7
8// Delete will delete all versions of a credential by name
9func (ch *CredHub) Delete(name string) error {
10 query := url.Values{}
11 query.Set("name", name)
12 resp, err := ch.Request(http.MethodDelete, "/api/v1/data", query, nil, true)
13
14 if err == nil {
15 defer resp.Body.Close()
16 }
17
18 return err
19}

Callers 4

delete_test.goFile · 0.80
ExampleFunction · 0.80
handleDeleteByNameMethod · 0.80
deleteByPathMethod · 0.80

Calls 1

RequestMethod · 0.95

Tested by 1

ExampleFunction · 0.64