bigquery

package
v0.1.96 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2026 License: Apache-2.0 Imports: 8 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JobStats

type JobStats struct {
	// BytesProcessed is the total bytes processed by the query.
	BytesProcessed int64 `json:"bytesProcessed,omitempty"`

	// BytesBilled is the total bytes billed for the query.
	BytesBilled int64 `json:"bytesBilled,omitempty"`

	// CreationTime is when the job was created.
	CreationTime time.Time `json:"creationTime,omitempty"`

	// StartTime is when the job execution started.
	StartTime time.Time `json:"startTime,omitempty"`

	// EndTime is when the job execution ended.
	EndTime time.Time `json:"endTime,omitempty"`

	// TotalSlotMs is the total slot milliseconds consumed.
	TotalSlotMs int64 `json:"totalSlotMs,omitempty"`
}

JobStats contains BigQuery job execution statistics.

type Request

type Request struct {
	// Query is the raw SQL query to execute against the BigQuery table.
	Query string `json:"query,omitempty" template:"true"`
}

Request represents parameters for BigQuery log queries.

+kubebuilder:object:generate=true

func (*Request) DeepCopy

func (in *Request) DeepCopy() *Request

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Request.

func (*Request) DeepCopyInto

func (in *Request) DeepCopyInto(out *Request)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Response

type Response struct {
	// Rows contains the actual log data.
	Rows []Row `json:"rows,omitempty"`

	// Schema contains the column names in the same order as the row values.
	Schema gcp.BigQuerySchema `json:"schema,omitempty"`

	// NextPageToken for pagination.
	NextPageToken string `json:"nextPageToken,omitempty"`

	// TotalRows is the total number of rows in the result (if available).
	TotalRows int64 `json:"totalRows,omitempty"`

	// JobStats contains query execution statistics.
	JobStats *JobStats `json:"jobStats,omitempty"`
}

Response represents the response from BigQuery for log data.

func (*Response) ToLogResult

func (r *Response) ToLogResult(mappingConfig logs.FieldMappingConfig) (logs.LogResult, error)

ToLogResult converts the BigQuery response to the standard LogResult format.

type Row

type Row []any

Row holds one result row's values in schema order; see gcp.QueryResult for the Go type of each column.

type Searcher

type Searcher struct {
	// contains filtered or unexported fields
}

Searcher implements log searching using BigQuery.

func New

func New(conn connection.GCPConnection, mappingConfig *logs.FieldMappingConfig) *Searcher

New creates a new BigQuery log searcher.

func (*Searcher) Close

func (s *Searcher) Close() error

Close releases the cached client; the REST client holds no connections of its own.

func (*Searcher) Search

func (s *Searcher) Search(ctx context.Context, request Request) (*logs.LogResult, error)

Search executes a log search query using BigQuery.

Jump to

Keyboard shortcuts

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