MCPcopy Index your code
hub / github.com/GoogleCloudPlatform/cloud-sql-proxy / TokenSource

Function TokenSource

internal/gcloud/gcloud.go:80–87  ·  view source on GitHub ↗

TokenSource returns an oauth2.TokenSource backed by the gcloud CLI.

()

Source from the content-addressed store, hash-verified

78
79// TokenSource returns an oauth2.TokenSource backed by the gcloud CLI.
80func TokenSource() (oauth2.TokenSource, error) {
81 h := configHelper{}
82 tok, err := h.Token()
83 if err != nil {
84 return nil, err
85 }
86 return oauth2.ReuseTokenSource(tok, h), nil
87}

Callers 2

credentialsOptFunction · 0.92
TestGcloudFunction · 0.92

Calls 1

TokenMethod · 0.95

Tested by 1

TestGcloudFunction · 0.74