Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DoGDARequest ¶
func DoGDARequest(ctx context.Context, client *http.Client, method, caURL string, body []byte) (map[string]any, util.ToolboxError)
DoGDARequest builds and executes an HTTP request against the Gemini Data Analytics API, sets standard headers, checks for a 2xx status code, and decodes the JSON response body (treating an empty body such as 204 No Content as {"done": true}).
func GetTokenSource ¶
func GetTokenSource(ctx context.Context, source CompatibleSource, accessToken tools.AccessToken) (oauth2.TokenSource, util.ToolboxError)
GetTokenSource resolves the OAuth2 token source from either the client-supplied Bearer access token (when client authorization is enabled on the source) or the source's configured Google Cloud credentials.
Types ¶
type CompatibleSource ¶
type CompatibleSource interface {
GoogleCloudTokenSourceWithScope(ctx context.Context, scope string) (oauth2.TokenSource, error)
GetProjectID() string
UseClientAuthorization() bool
}
CompatibleSource defines the source interface required by conversational analytics tools.
Click to show internal directories.
Click to hide internal directories.