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

Method GetLatestVersion

credhub/get.go:33–37  ·  view source on GitHub ↗

GetLatestVersion returns the current credential version for a given credential name. The returned credential will be encoded as a map and may be of any type.

(name string)

Source from the content-addressed store, hash-verified

31
32// GetLatestVersion returns the current credential version for a given credential name. The returned credential will be encoded as a map and may be of any type.
33func (ch *CredHub) GetLatestVersion(name string) (credentials.Credential, error) {
34 var cred credentials.Credential
35 err := ch.getCurrentCredential(name, &cred)
36 return cred, err
37}
38
39// GetNVersions returns the N most recent credential versions for a given credential name. The returned credentials will be encoded as a list of maps and may be of any type.
40func (ch *CredHub) GetNVersions(name string, numberOfVersions int) ([]credentials.Credential, error) {

Callers 5

get_test.goFile · 0.80
ExecuteMethod · 0.80
getAllCredentialsForPathFunction · 0.80
GetMethod · 0.80
printCredentialMethod · 0.80

Calls 1

getCurrentCredentialMethod · 0.95

Tested by

no test coverage detected