bigquery

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2023 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BqExcludedDatasets        = "bq-excluded-datasets"
	BqIncludeHiddenDatasets   = "bq-include-hidden-datasets"
	BqDataUsageWindow         = "bq-data-usage-window"
	GcpRolesToGroupByIdentity = "gcp-roles-to-group-by-identity"
)

Variables

This section is empty.

Functions

func ConnectToBigQuery

func ConnectToBigQuery(configMap *config.ConfigMap, ctx context.Context) (*bigquery.Client, error)

func GetAlteredDataSourceMetaData added in v0.9.2

func GetAlteredDataSourceMetaData(ctx context.Context, config *config.ConfigMap) (*ds.MetaData, error)

GetAlteredDataSourceMetaData provides an altered version of the data source meta data to also add the 'project' type. This is needed to correctly look up the applicable permissions for the mapped data object type (datasource = project).

func GetDataSourceMetaData added in v0.0.12

func GetDataSourceMetaData(_ context.Context, _ *config.ConfigMap) (*ds.MetaData, error)

func GetDataUsageStartDate added in v0.2.5

func GetDataUsageStartDate(ctx context.Context, configMap *config.ConfigMap) (time.Time, *time.Time, *time.Time)

func GetResourceIds added in v0.0.12

func GetResourceIds(ctx context.Context, configMap *config.ConfigMap) ([]string, error)

Types

type AccessSyncer

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

func NewDataAccessSyncer

func NewDataAccessSyncer() *AccessSyncer

func (*AccessSyncer) SyncAccessAsCodeToTarget

func (a *AccessSyncer) SyncAccessAsCodeToTarget(ctx context.Context, accessProviders *importer.AccessProviderImport, prefix string, configMap *config.ConfigMap) error

func (*AccessSyncer) SyncAccessProviderToTarget

func (a *AccessSyncer) SyncAccessProviderToTarget(ctx context.Context, accessProviders *importer.AccessProviderImport, accessProviderFeedbackHandler wrappers.AccessProviderFeedbackHandler, configMap *config.ConfigMap) error

func (*AccessSyncer) SyncAccessProvidersFromTarget

func (a *AccessSyncer) SyncAccessProvidersFromTarget(ctx context.Context, accessProviderHandler wrappers.AccessProviderHandler, configMap *config.ConfigMap) error

type BQEntity

type BQEntity struct {
	ID       string
	Type     string
	Name     string
	FullName string
	ParentId string
}

type BQInformationSchemaEntity

type BQInformationSchemaEntity struct {
	CachedQuery bool                `bigquery:"cache_hit"`
	User        string              `bigquery:"user_email"`
	Query       string              `bigquery:"query"`
	Tables      []BQReferencedTable `bigquery:"referenced_tables"`
	StartTime   int64               `bigquery:"start_time"`
	EndTime     int64               `bigquery:"end_time"`
}

type BQReferencedTable added in v0.0.2

type BQReferencedTable struct {
	Project string `bigquery:"project_id"`
	Dataset string `bigquery:"dataset_id"`
	Table   string `bigquery:"table_id"`
}

type BigQueryRepository

type BigQueryRepository struct {
}

func (*BigQueryRepository) GetDataSets

func (r *BigQueryRepository) GetDataSets(ctx context.Context, configMap *config.ConfigMap) ([]BQEntity, error)

func (*BigQueryRepository) GetDataUsage

func (r *BigQueryRepository) GetDataUsage(ctx context.Context, configMap *config.ConfigMap) ([]BQInformationSchemaEntity, error)

func (*BigQueryRepository) GetTables

func (r *BigQueryRepository) GetTables(ctx context.Context, configMap *config.ConfigMap, parent BQEntity) ([]BQEntity, error)

type DataSourceSyncer

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

func NewDataSourceSyncer

func NewDataSourceSyncer() *DataSourceSyncer

func (*DataSourceSyncer) GetDataSourceMetaData

func (s *DataSourceSyncer) GetDataSourceMetaData(ctx context.Context, configParams *config.ConfigMap) (*ds.MetaData, error)

func (*DataSourceSyncer) SyncDataSource

func (s *DataSourceSyncer) SyncDataSource(ctx context.Context, dataSourceHandler wrappers.DataSourceObjectHandler, configMap *config.ConfigMap) error

type DataUsageSyncer

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

func NewDataUsageSyncer

func NewDataUsageSyncer() *DataUsageSyncer

func (*DataUsageSyncer) SyncDataUsage

func (s *DataUsageSyncer) SyncDataUsage(ctx context.Context, fileCreator wrappers.DataUsageStatementHandler, configParams *config.ConfigMap) error

type GroupEntity

type GroupEntity struct {
	ExternalId string
	Email      string
	Members    []string
}

type IdentityStoreSyncer

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

func NewIdentityStoreSyncer

func NewIdentityStoreSyncer() *IdentityStoreSyncer

func (*IdentityStoreSyncer) GetIdentityStoreMetaData

func (s *IdentityStoreSyncer) GetIdentityStoreMetaData(_ context.Context, _ *config.ConfigMap) (*is.MetaData, error)

func (*IdentityStoreSyncer) SyncIdentityStore

func (s *IdentityStoreSyncer) SyncIdentityStore(ctx context.Context, identityHandler wrappers.IdentityStoreIdentityHandler, configMap *config.ConfigMap) error

type UserEntity

type UserEntity struct {
	ExternalId string
	Name       string
	Email      string
}

Jump to

Keyboard shortcuts

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