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

Method GetLatestSSH

credhub/get.go:94–99  ·  view source on GitHub ↗

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

(name string)

Source from the content-addressed store, hash-verified

92
93// GetLatestSSH returns the current credential version for a given credential name. The returned credential will be encoded as a map and must be of type 'ssh'.
94func (ch *CredHub) GetLatestSSH(name string) (credentials.SSH, error) {
95 var cred credentials.SSH
96 err := ch.getCurrentCredential(name, &cred)
97
98 return cred, err
99}
100
101func (ch *CredHub) getCurrentCredential(name string, cred interface{}) error {
102 query := url.Values{}

Callers 1

get_test.goFile · 0.80

Calls 1

getCurrentCredentialMethod · 0.95

Tested by

no test coverage detected