Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultScope = "https://www.googleapis.com/auth/cloud-platform"
View Source
const DefaultTokenURI = "https://oauth2.googleapis.com/token"
Variables ¶
This section is empty.
Functions ¶
func ParseRSAPrivateKey ¶
func ParseRSAPrivateKey(pemData string) (*rsa.PrivateKey, error)
func SignAssertion ¶
func SignAssertion(cred Credential, now time.Time) (string, error)
Types ¶
type Credential ¶
type Credential struct {
Type string
ProjectID string
PrivateKeyID string
PrivateKeyPEM string
ClientEmail string
TokenURI string
Scopes []string
}
Credential is the provider-local GCP credential shape carved out of the service account JSON.
func FromOptions ¶
func FromOptions(options schema.Options) (Credential, error)
func (Credential) Validate ¶
func (c Credential) Validate() error
type TokenSource ¶
type TokenSource struct {
// contains filtered or unexported fields
}
func NewTokenSource ¶
func NewTokenSource(cred Credential, httpClient *http.Client) *TokenSource
func (*TokenSource) WithScopes ¶
func (s *TokenSource) WithScopes(scopes []string)
Click to show internal directories.
Click to hide internal directories.