MCPcopy Create free account
hub / github.com/Scalingo/cli / ScalingoAuthClient

Function ScalingoAuthClient

config/config.go:200–207  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

198}
199
200func ScalingoAuthClient(ctx context.Context) (*scalingo.Client, error) {
201 auth := &CliAuthenticator{}
202 _, token, err := auth.LoadAuth(ctx)
203 if err != nil {
204 return nil, errors.Wrapf(ctx, err, "fail to load authentication")
205 }
206 return ScalingoAuthClientFromToken(ctx, token.Token)
207}
208
209func ScalingoClient(ctx context.Context) (*scalingo.Client, error) {
210 authenticator := &CliAuthenticator{}

Callers 9

SelfFunction · 0.92
DeleteFunction · 0.92
CreateFunction · 0.92
ImportKeysFunction · 0.92
ListFunction · 0.92
ListFunction · 0.92
RemoveFunction · 0.92
AddFunction · 0.92
ListFunction · 0.92

Calls 2

LoadAuthMethod · 0.95

Tested by

no test coverage detected