Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewGoogleHTTPClient ¶ added in v0.1.77
func NewGoogleHTTPClient(ctx context.Context, config ClientConfig, token *Token) (*http.Client, error)
NewGoogleHTTPClient returns an authenticated *http.Client based on the credential type. Service account JSON uses JWT with optional subject impersonation. OAuth2 JSON uses the provided token.
Types ¶
type ClientConfig ¶
type Token ¶
type Token struct {
AccessToken string `json:"access_token" required:"true" minLength:"1" title:"AccessToken" description:"Token that authorizes and authenticates"`
TokenType string `` /* 142-byte string literal not displayed */
RefreshToken string `` /* 170-byte string literal not displayed */
Expiry time.Time `` /* 294-byte string literal not displayed */
}
Click to show internal directories.
Click to hide internal directories.