bigquery

package
v0.0.0-...-6ca1002 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 2, 2026 License: Apache-2.0 Imports: 48 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package bigquery is the BigQuery provider: the proxy serves the BigQuery REST API over HTTPS, asks the control plane what to do with each call, decides query SQL through Decide, and masks result pages inline.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flags

type Flags struct {
	Project     string `env:"PM_BIGQUERY_PROJECT"`
	Location    string `env:"PM_BIGQUERY_LOCATION"`
	Dataset     string `env:"PM_TARGET_DB"`
	ContextPath string `env:"PM_BIGQUERY_CONTEXT_PATH" default:":memory:"`
	Endpoint    string `env:"PM_BIGQUERY_ENDPOINT" default:"https://bigquery.googleapis.com"`
	// StorageEndpoint is the Storage Read API's gRPC host:port.
	StorageEndpoint string `env:"PM_BIGQUERY_STORAGE_ENDPOINT" default:"bigquerystorage.googleapis.com:443"`
	// CAFile is a PEM bundle trusted for both endpoints instead of the system roots, for an emulator.
	CAFile string `env:"PM_BIGQUERY_CA_FILE"`
}

Flags is the BigQuery engine's kong grammar; credentials come from Google Application Default Credentials, never from PM_*.

type Provider

type Provider struct {
	Flags Flags
	// AdvertiseAddr is the host:port clients reach this proxy's HTTPS endpoint at.
	AdvertiseAddr string
}

Provider registers the BigQuery engine under PM_ENGINE=bigquery. OpenTarget scopes the target to Flags (PM_TARGET_DB is the default dataset) and pins the Google principal the credentials act as.

func (Provider) Engine

func (Provider) Engine() *engines.Engine

func (Provider) OpenTarget

func (p Provider) OpenTarget() (spi.Target, error)

type TokenSource

type TokenSource func(context.Context) (string, error)

TokenSource returns an OAuth access token for the upstream BigQuery credential.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL