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

Method GetById

credhub/get.go:16–22  ·  view source on GitHub ↗

GetById returns a credential version by ID. The returned credential will be encoded as a map and may be of any type.

(id string)

Source from the content-addressed store, hash-verified

14
15// GetById returns a credential version by ID. The returned credential will be encoded as a map and may be of any type.
16func (ch *CredHub) GetById(id string) (credentials.Credential, error) {
17 var cred credentials.Credential
18
19 err := ch.makeCredentialGetByIdRequest(id, &cred)
20
21 return cred, err
22}
23
24// GetAllVersions returns all credential versions for a given credential name. The returned credentials will be encoded as a list of maps and may be of any type.
25func (ch *CredHub) GetAllVersions(name string) ([]credentials.Credential, error) {

Callers 2

get_test.goFile · 0.80
printCredentialMethod · 0.80

Calls 1

Tested by

no test coverage detected