store

package
v0.0.0-...-a1c510b Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BigQueryDatabase

type BigQueryDatabase struct {
	DatasetID string
	TableID   string
}

type BigQueryStore

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

func NewBigQueryStore

func NewBigQueryStore(ctx context.Context, cfg BigQueryStoreConfig) (*BigQueryStore, error)

func (*BigQueryStore) Backup

func (s *BigQueryStore) Backup(ctx context.Context) error

func (*BigQueryStore) Load

func (s *BigQueryStore) Load(ctx context.Context, data []schema.RawData) error

func (*BigQueryStore) LoadTransformed

func (s *BigQueryStore) LoadTransformed(ctx context.Context, data []schema.TransformedData) error

func (*BigQueryStore) Migrate

func (s *BigQueryStore) Migrate(ctx context.Context) error

func (*BigQueryStore) Setup

func (s *BigQueryStore) Setup(ctx context.Context) error

func (*BigQueryStore) Transform

func (s *BigQueryStore) Transform(ctx context.Context, query string) ([]schema.TransformedData, error)

type BigQueryStoreConfig

type BigQueryStoreConfig struct {
	Client          *bigquery.Client
	CredentialsPath string
	ProjectID       string
	Raw             BigQueryDatabase
	Transformed     BigQueryDatabase
}

type NullStore

type NullStore struct{}

func (*NullStore) Backup

func (s *NullStore) Backup(ctx context.Context) error

func (*NullStore) Load

func (s *NullStore) Load(ctx context.Context, data schema.RawData) error

func (*NullStore) LoadTransformed

func (s *NullStore) LoadTransformed(ctx context.Context, data schema.TransformedData) error

func (*NullStore) Migrate

func (s *NullStore) Migrate(ctx context.Context) error

func (*NullStore) Transform

func (s *NullStore) Transform(ctx context.Context) ([]schema.TransformedData, error)

type Store

type Store interface {
	Load(ctx context.Context, data schema.RawData) error
	LoadTransformed(ctx context.Context, data schema.TransformedData) error
	Transform(ctx context.Context) ([]schema.TransformedData, error)
	Migrate(ctx context.Context) error
	Backup(ctx context.Context) error
}

Jump to

Keyboard shortcuts

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