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

Method GetLatestJSON

credhub/get.go:54–59  ·  view source on GitHub ↗

GetLatestJSON returns the current credential version for a given credential name. The returned credential will be encoded as a map and must be of type 'json'.

(name string)

Source from the content-addressed store, hash-verified

52
53// GetLatestJSON returns the current credential version for a given credential name. The returned credential will be encoded as a map and must be of type 'json'.
54func (ch *CredHub) GetLatestJSON(name string) (credentials.JSON, error) {
55 var cred credentials.JSON
56 err := ch.getCurrentCredential(name, &cred)
57
58 return cred, err
59}
60
61// GetLatestPassword returns the current credential version for a given credential name. The returned credential will be encoded as a map and must be of type 'password'.
62func (ch *CredHub) GetLatestPassword(name string) (credentials.Password, error) {

Callers 1

get_test.goFile · 0.80

Calls 1

getCurrentCredentialMethod · 0.95

Tested by

no test coverage detected