bq

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BQ

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

func NewBQ

func NewBQ(
	ctx context.Context,
	projectID string,
	dataset string,
	tablePrefix string,
	logger *slog.Logger,
) (*BQ, error)

func (*BQ) Close

func (bq *BQ) Close() error

func (*BQ) CreateTableIfNotExists

func (bq *BQ) CreateTableIfNotExists(ctx context.Context) error

func (*BQ) InsertRecord

func (bq *BQ) InsertRecord(ctx context.Context, record *Record) error

type Cursor

type Cursor struct {
	gorm.Model
	LastSeq int64
}

type Record

type Record struct {
	CreatedAt time.Time `bigquery:"created_at"`

	FirehoseSeq int64             `bigquery:"firehose_seq"`
	Repo        string            `bigquery:"repo"`
	Collection  string            `bigquery:"collection"`
	RKey        string            `bigquery:"r_key"`
	Action      string            `bigquery:"action"`
	Raw         bigquery.NullJSON `bigquery:"raw"`

	Error string `bigquery:"error"`
}

Jump to

Keyboard shortcuts

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