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

Method GetCredentials

api/api.go:260–275  ·  view source on GitHub ↗
(ctx context.Context, orgSlug, realmSlug string, params ...QueryParam)

Source from the content-addressed store, hash-verified

258}
259
260func (s *Session) GetCredentials(ctx context.Context, orgSlug, realmSlug string, params ...QueryParam) ([]Credential, error) {
261 var creds struct {
262 Items []Credential `json:"items,omitempty"`
263 }
264
265 u, err := getCredentialsURL(orgSlug, realmSlug)
266 if err != nil {
267 return nil, err
268 }
269 QueryParams(params).Apply(u)
270
271 if err := s.get(ctx, u.RequestURI(), &creds); err != nil {
272 return nil, err
273 }
274 return creds.Items, nil
275}
276
277func (s *Session) UserInfo(ctx context.Context) (*Root, error) {
278 if s.userInfo != nil {

Callers 1

RunTUIMethod · 0.80

Calls 4

getMethod · 0.95
getCredentialsURLFunction · 0.85
QueryParamsTypeAlias · 0.85
ApplyMethod · 0.45

Tested by

no test coverage detected