MCPcopy Create free account
hub / github.com/anchordotdev/cli / FetchCredentials

Method FetchCredentials

api/api.go:238–247  ·  view source on GitHub ↗
(ctx context.Context, orgSlug, realmSlug string)

Source from the content-addressed store, hash-verified

236}
237
238func (s *Session) FetchCredentials(ctx context.Context, orgSlug, realmSlug string) ([]Credential, error) {
239 var creds struct {
240 Items []Credential `json:"items,omitempty"`
241 }
242
243 if err := s.get(ctx, fetchCredentialsPath(orgSlug, realmSlug), &creds); err != nil {
244 return nil, err
245 }
246 return creds.Items, nil
247}
248
249func getCredentialsURL(orgSlug, realmSlug string) (*url.URL, error) {
250 return url.Parse(fetchCredentialsPath(orgSlug, realmSlug))

Callers 1

FetchExpectedCAsFunction · 0.80

Calls 2

getMethod · 0.95
fetchCredentialsPathFunction · 0.85

Tested by

no test coverage detected