 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Overview ¶
Package scrapper is a generated GoMock package.
Index ¶
- Variables
- type CatalogColumnRow
- type ColumnValue
- type CustomMetricsRow
- type DatabaseRow
- type DoubleValue
- type DwhFqn
- type HasTableFqn
- type IgnoredValue
- type IntValue
- type MockScrapper
- func (m *MockScrapper) Close() error
- func (m *MockScrapper) DialectType() string
- func (m *MockScrapper) EXPECT() *MockScrapperMockRecorder
- func (m *MockScrapper) IsPermissionError(err error) bool
- func (m *MockScrapper) QueryCatalog(ctx context.Context) ([]*CatalogColumnRow, error)
- func (m *MockScrapper) QueryCustomMetrics(ctx context.Context, sql string, args ...any) ([]*CustomMetricsRow, error)
- func (m *MockScrapper) QueryDatabases(ctx context.Context) ([]*DatabaseRow, error)
- func (m *MockScrapper) QuerySegments(ctx context.Context, sql string, args ...any) ([]*SegmentRow, error)
- func (m *MockScrapper) QuerySqlDefinitions(ctx context.Context) ([]*SqlDefinitionRow, error)
- func (m *MockScrapper) QueryTableMetrics(ctx context.Context, lastMetricsFetchTime time.Time) ([]*TableMetricsRow, error)
- func (m *MockScrapper) QueryTables(ctx context.Context) ([]*TableRow, error)
- func (m *MockScrapper) SqlDialect() sqldialect.Dialect
- func (m *MockScrapper) ValidateConfiguration(ctx context.Context) ([]string, error)
 
- type MockScrapperCloseCall
- type MockScrapperDialectTypeCall
- type MockScrapperIsPermissionErrorCall
- func (c *MockScrapperIsPermissionErrorCall) Do(f func(error) bool) *MockScrapperIsPermissionErrorCall
- func (c *MockScrapperIsPermissionErrorCall) DoAndReturn(f func(error) bool) *MockScrapperIsPermissionErrorCall
- func (c *MockScrapperIsPermissionErrorCall) Return(arg0 bool) *MockScrapperIsPermissionErrorCall
 
- type MockScrapperMockRecorder
- func (mr *MockScrapperMockRecorder) Close() *MockScrapperCloseCall
- func (mr *MockScrapperMockRecorder) DialectType() *MockScrapperDialectTypeCall
- func (mr *MockScrapperMockRecorder) IsPermissionError(err any) *MockScrapperIsPermissionErrorCall
- func (mr *MockScrapperMockRecorder) QueryCatalog(ctx any) *MockScrapperQueryCatalogCall
- func (mr *MockScrapperMockRecorder) QueryCustomMetrics(ctx, sql any, args ...any) *MockScrapperQueryCustomMetricsCall
- func (mr *MockScrapperMockRecorder) QueryDatabases(ctx any) *MockScrapperQueryDatabasesCall
- func (mr *MockScrapperMockRecorder) QuerySegments(ctx, sql any, args ...any) *MockScrapperQuerySegmentsCall
- func (mr *MockScrapperMockRecorder) QuerySqlDefinitions(ctx any) *MockScrapperQuerySqlDefinitionsCall
- func (mr *MockScrapperMockRecorder) QueryTableMetrics(ctx, lastMetricsFetchTime any) *MockScrapperQueryTableMetricsCall
- func (mr *MockScrapperMockRecorder) QueryTables(ctx any) *MockScrapperQueryTablesCall
- func (mr *MockScrapperMockRecorder) SqlDialect() *MockScrapperSqlDialectCall
- func (mr *MockScrapperMockRecorder) ValidateConfiguration(ctx any) *MockScrapperValidateConfigurationCall
 
- type MockScrapperQueryCatalogCall
- func (c *MockScrapperQueryCatalogCall) Do(f func(context.Context) ([]*CatalogColumnRow, error)) *MockScrapperQueryCatalogCall
- func (c *MockScrapperQueryCatalogCall) DoAndReturn(f func(context.Context) ([]*CatalogColumnRow, error)) *MockScrapperQueryCatalogCall
- func (c *MockScrapperQueryCatalogCall) Return(arg0 []*CatalogColumnRow, arg1 error) *MockScrapperQueryCatalogCall
 
- type MockScrapperQueryCustomMetricsCall
- func (c *MockScrapperQueryCustomMetricsCall) Do(f func(context.Context, string, ...any) ([]*CustomMetricsRow, error)) *MockScrapperQueryCustomMetricsCall
- func (c *MockScrapperQueryCustomMetricsCall) DoAndReturn(f func(context.Context, string, ...any) ([]*CustomMetricsRow, error)) *MockScrapperQueryCustomMetricsCall
- func (c *MockScrapperQueryCustomMetricsCall) Return(arg0 []*CustomMetricsRow, arg1 error) *MockScrapperQueryCustomMetricsCall
 
- type MockScrapperQueryDatabasesCall
- func (c *MockScrapperQueryDatabasesCall) Do(f func(context.Context) ([]*DatabaseRow, error)) *MockScrapperQueryDatabasesCall
- func (c *MockScrapperQueryDatabasesCall) DoAndReturn(f func(context.Context) ([]*DatabaseRow, error)) *MockScrapperQueryDatabasesCall
- func (c *MockScrapperQueryDatabasesCall) Return(arg0 []*DatabaseRow, arg1 error) *MockScrapperQueryDatabasesCall
 
- type MockScrapperQuerySegmentsCall
- func (c *MockScrapperQuerySegmentsCall) Do(f func(context.Context, string, ...any) ([]*SegmentRow, error)) *MockScrapperQuerySegmentsCall
- func (c *MockScrapperQuerySegmentsCall) DoAndReturn(f func(context.Context, string, ...any) ([]*SegmentRow, error)) *MockScrapperQuerySegmentsCall
- func (c *MockScrapperQuerySegmentsCall) Return(arg0 []*SegmentRow, arg1 error) *MockScrapperQuerySegmentsCall
 
- type MockScrapperQuerySqlDefinitionsCall
- func (c *MockScrapperQuerySqlDefinitionsCall) Do(f func(context.Context) ([]*SqlDefinitionRow, error)) *MockScrapperQuerySqlDefinitionsCall
- func (c *MockScrapperQuerySqlDefinitionsCall) DoAndReturn(f func(context.Context) ([]*SqlDefinitionRow, error)) *MockScrapperQuerySqlDefinitionsCall
- func (c *MockScrapperQuerySqlDefinitionsCall) Return(arg0 []*SqlDefinitionRow, arg1 error) *MockScrapperQuerySqlDefinitionsCall
 
- type MockScrapperQueryTableMetricsCall
- func (c *MockScrapperQueryTableMetricsCall) Do(f func(context.Context, time.Time) ([]*TableMetricsRow, error)) *MockScrapperQueryTableMetricsCall
- func (c *MockScrapperQueryTableMetricsCall) DoAndReturn(f func(context.Context, time.Time) ([]*TableMetricsRow, error)) *MockScrapperQueryTableMetricsCall
- func (c *MockScrapperQueryTableMetricsCall) Return(arg0 []*TableMetricsRow, arg1 error) *MockScrapperQueryTableMetricsCall
 
- type MockScrapperQueryTablesCall
- func (c *MockScrapperQueryTablesCall) Do(f func(context.Context) ([]*TableRow, error)) *MockScrapperQueryTablesCall
- func (c *MockScrapperQueryTablesCall) DoAndReturn(f func(context.Context) ([]*TableRow, error)) *MockScrapperQueryTablesCall
- func (c *MockScrapperQueryTablesCall) Return(arg0 []*TableRow, arg1 error) *MockScrapperQueryTablesCall
 
- type MockScrapperSqlDialectCall
- type MockScrapperValidateConfigurationCall
- func (c *MockScrapperValidateConfigurationCall) Do(f func(context.Context) ([]string, error)) *MockScrapperValidateConfigurationCall
- func (c *MockScrapperValidateConfigurationCall) DoAndReturn(f func(context.Context) ([]string, error)) *MockScrapperValidateConfigurationCall
- func (c *MockScrapperValidateConfigurationCall) Return(warnings []string, err error) *MockScrapperValidateConfigurationCall
 
- type NoEnoughPermissionsError
- type SchemaColumnField
- type Scrapper
- type SegmentRow
- type SegmentValue
- type SqlDefinitionRow
- type TableMetricsRow
- type TableRow
- type Tag
- type TimeValue
- type Value
- type WithSetInstance
Constants ¶
This section is empty.
Variables ¶
var ErrUnsupported = errors.New("unsupported")
    Functions ¶
This section is empty.
Types ¶
type CatalogColumnRow ¶
type CatalogColumnRow struct {
	Instance       string  `db:"instance"         json:"instance"         ch:"instance"         bigquery:"instance"`
	Database       string  `db:"database"         json:"database"         ch:"_database"        bigquery:"database"`
	Schema         string  `db:"schema"           json:"schema"           ch:"schema"           bigquery:"schema"`
	Table          string  `db:"table"            json:"table"            ch:"table"            bigquery:"table"`
	IsView         bool    `db:"is_view"          json:"is_view"          ch:"is_view"          bigquery:"is_view"`
	Column         string  `db:"column"           json:"column"           ch:"column"           bigquery:"column"`
	Type           string  `db:"type"             json:"type"             ch:"type"             bigquery:"type"`
	Position       int32   `db:"position"         json:"position"         ch:"position"         bigquery:"position"`
	Comment        *string `db:"comment"          json:"comment"          ch:"comment"          bigquery:"comment"`
	TableComment   *string `db:"table_comment"    json:"table_comment"    ch:"table_comment"    bigquery:"table_comment"`
	ColumnTags     []*Tag  `                      json:"column_tags"`
	TableTags      []*Tag  `                      json:"table_tags"`
	IsStructColumn bool    `db:"is_struct_column" json:"is_struct_column" ch:"is_struct_column" bigquery:"is_struct_column"`
	IsArrayColumn  bool    `db:"is_array_column"  json:"is_array_column"  ch:"is_array_column"  bigquery:"is_array_column"`
	FieldSchemas   []*SchemaColumnField
}
    func (CatalogColumnRow) GetComment ¶
func (r CatalogColumnRow) GetComment() string
func (CatalogColumnRow) GetTableComment ¶
func (r CatalogColumnRow) GetTableComment() string
func (CatalogColumnRow) TableFqn ¶
func (r CatalogColumnRow) TableFqn() DwhFqn
type ColumnValue ¶
type CustomMetricsRow ¶
type CustomMetricsRow struct {
	Segments     []*SegmentValue
	ColumnValues []*ColumnValue
}
    type DatabaseRow ¶
type DatabaseRow struct {
	Instance      string  `db:"instance"       json:"instance"       ch:"instance"       bigquery:"instance"`
	Database      string  `db:"database"       json:"database"       ch:"_database"      bigquery:"database"`
	Description   *string `db:"description"    json:"description"    ch:"description"    bigquery:"description"`
	DatabaseType  *string `db:"database_type"  json:"database_type"  ch:"database_type"  bigquery:"database_type"`
	DatabaseOwner *string `db:"database_owner" json:"database_owner" ch:"database_owner" bigquery:"database_owner"`
}
    func (*DatabaseRow) SetInstance ¶
func (r *DatabaseRow) SetInstance(instance string)
type DoubleValue ¶
type DoubleValue float64
type HasTableFqn ¶
type HasTableFqn interface {
	TableFqn() DwhFqn
}
    type IgnoredValue ¶
type IgnoredValue struct{}
    type MockScrapper ¶ added in v0.4.7
type MockScrapper struct {
	// contains filtered or unexported fields
}
    MockScrapper is a mock of Scrapper interface.
func NewMockScrapper ¶ added in v0.4.7
func NewMockScrapper(ctrl *gomock.Controller) *MockScrapper
NewMockScrapper creates a new mock instance.
func (*MockScrapper) Close ¶ added in v0.4.7
func (m *MockScrapper) Close() error
Close mocks base method.
func (*MockScrapper) DialectType ¶ added in v0.4.7
func (m *MockScrapper) DialectType() string
DialectType mocks base method.
func (*MockScrapper) EXPECT ¶ added in v0.4.7
func (m *MockScrapper) EXPECT() *MockScrapperMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockScrapper) IsPermissionError ¶ added in v0.4.7
func (m *MockScrapper) IsPermissionError(err error) bool
IsPermissionError mocks base method.
func (*MockScrapper) QueryCatalog ¶ added in v0.4.7
func (m *MockScrapper) QueryCatalog(ctx context.Context) ([]*CatalogColumnRow, error)
QueryCatalog mocks base method.
func (*MockScrapper) QueryCustomMetrics ¶ added in v0.4.7
func (m *MockScrapper) QueryCustomMetrics(ctx context.Context, sql string, args ...any) ([]*CustomMetricsRow, error)
QueryCustomMetrics mocks base method.
func (*MockScrapper) QueryDatabases ¶ added in v0.4.7
func (m *MockScrapper) QueryDatabases(ctx context.Context) ([]*DatabaseRow, error)
QueryDatabases mocks base method.
func (*MockScrapper) QuerySegments ¶ added in v0.4.7
func (m *MockScrapper) QuerySegments(ctx context.Context, sql string, args ...any) ([]*SegmentRow, error)
QuerySegments mocks base method.
func (*MockScrapper) QuerySqlDefinitions ¶ added in v0.4.7
func (m *MockScrapper) QuerySqlDefinitions(ctx context.Context) ([]*SqlDefinitionRow, error)
QuerySqlDefinitions mocks base method.
func (*MockScrapper) QueryTableMetrics ¶ added in v0.4.7
func (m *MockScrapper) QueryTableMetrics(ctx context.Context, lastMetricsFetchTime time.Time) ([]*TableMetricsRow, error)
QueryTableMetrics mocks base method.
func (*MockScrapper) QueryTables ¶ added in v0.4.7
func (m *MockScrapper) QueryTables(ctx context.Context) ([]*TableRow, error)
QueryTables mocks base method.
func (*MockScrapper) SqlDialect ¶ added in v0.4.7
func (m *MockScrapper) SqlDialect() sqldialect.Dialect
SqlDialect mocks base method.
func (*MockScrapper) ValidateConfiguration ¶ added in v0.4.7
func (m *MockScrapper) ValidateConfiguration(ctx context.Context) ([]string, error)
ValidateConfiguration mocks base method.
type MockScrapperCloseCall ¶ added in v0.4.7
MockScrapperCloseCall wrap *gomock.Call
func (*MockScrapperCloseCall) Do ¶ added in v0.4.7
func (c *MockScrapperCloseCall) Do(f func() error) *MockScrapperCloseCall
Do rewrite *gomock.Call.Do
func (*MockScrapperCloseCall) DoAndReturn ¶ added in v0.4.7
func (c *MockScrapperCloseCall) DoAndReturn(f func() error) *MockScrapperCloseCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockScrapperCloseCall) Return ¶ added in v0.4.7
func (c *MockScrapperCloseCall) Return(arg0 error) *MockScrapperCloseCall
Return rewrite *gomock.Call.Return
type MockScrapperDialectTypeCall ¶ added in v0.4.7
MockScrapperDialectTypeCall wrap *gomock.Call
func (*MockScrapperDialectTypeCall) Do ¶ added in v0.4.7
func (c *MockScrapperDialectTypeCall) Do(f func() string) *MockScrapperDialectTypeCall
Do rewrite *gomock.Call.Do
func (*MockScrapperDialectTypeCall) DoAndReturn ¶ added in v0.4.7
func (c *MockScrapperDialectTypeCall) DoAndReturn(f func() string) *MockScrapperDialectTypeCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockScrapperDialectTypeCall) Return ¶ added in v0.4.7
func (c *MockScrapperDialectTypeCall) Return(arg0 string) *MockScrapperDialectTypeCall
Return rewrite *gomock.Call.Return
type MockScrapperIsPermissionErrorCall ¶ added in v0.4.7
MockScrapperIsPermissionErrorCall wrap *gomock.Call
func (*MockScrapperIsPermissionErrorCall) Do ¶ added in v0.4.7
func (c *MockScrapperIsPermissionErrorCall) Do(f func(error) bool) *MockScrapperIsPermissionErrorCall
Do rewrite *gomock.Call.Do
func (*MockScrapperIsPermissionErrorCall) DoAndReturn ¶ added in v0.4.7
func (c *MockScrapperIsPermissionErrorCall) DoAndReturn(f func(error) bool) *MockScrapperIsPermissionErrorCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockScrapperIsPermissionErrorCall) Return ¶ added in v0.4.7
func (c *MockScrapperIsPermissionErrorCall) Return(arg0 bool) *MockScrapperIsPermissionErrorCall
Return rewrite *gomock.Call.Return
type MockScrapperMockRecorder ¶ added in v0.4.7
type MockScrapperMockRecorder struct {
	// contains filtered or unexported fields
}
    MockScrapperMockRecorder is the mock recorder for MockScrapper.
func (*MockScrapperMockRecorder) Close ¶ added in v0.4.7
func (mr *MockScrapperMockRecorder) Close() *MockScrapperCloseCall
Close indicates an expected call of Close.
func (*MockScrapperMockRecorder) DialectType ¶ added in v0.4.7
func (mr *MockScrapperMockRecorder) DialectType() *MockScrapperDialectTypeCall
DialectType indicates an expected call of DialectType.
func (*MockScrapperMockRecorder) IsPermissionError ¶ added in v0.4.7
func (mr *MockScrapperMockRecorder) IsPermissionError(err any) *MockScrapperIsPermissionErrorCall
IsPermissionError indicates an expected call of IsPermissionError.
func (*MockScrapperMockRecorder) QueryCatalog ¶ added in v0.4.7
func (mr *MockScrapperMockRecorder) QueryCatalog(ctx any) *MockScrapperQueryCatalogCall
QueryCatalog indicates an expected call of QueryCatalog.
func (*MockScrapperMockRecorder) QueryCustomMetrics ¶ added in v0.4.7
func (mr *MockScrapperMockRecorder) QueryCustomMetrics(ctx, sql any, args ...any) *MockScrapperQueryCustomMetricsCall
QueryCustomMetrics indicates an expected call of QueryCustomMetrics.
func (*MockScrapperMockRecorder) QueryDatabases ¶ added in v0.4.7
func (mr *MockScrapperMockRecorder) QueryDatabases(ctx any) *MockScrapperQueryDatabasesCall
QueryDatabases indicates an expected call of QueryDatabases.
func (*MockScrapperMockRecorder) QuerySegments ¶ added in v0.4.7
func (mr *MockScrapperMockRecorder) QuerySegments(ctx, sql any, args ...any) *MockScrapperQuerySegmentsCall
QuerySegments indicates an expected call of QuerySegments.
func (*MockScrapperMockRecorder) QuerySqlDefinitions ¶ added in v0.4.7
func (mr *MockScrapperMockRecorder) QuerySqlDefinitions(ctx any) *MockScrapperQuerySqlDefinitionsCall
QuerySqlDefinitions indicates an expected call of QuerySqlDefinitions.
func (*MockScrapperMockRecorder) QueryTableMetrics ¶ added in v0.4.7
func (mr *MockScrapperMockRecorder) QueryTableMetrics(ctx, lastMetricsFetchTime any) *MockScrapperQueryTableMetricsCall
QueryTableMetrics indicates an expected call of QueryTableMetrics.
func (*MockScrapperMockRecorder) QueryTables ¶ added in v0.4.7
func (mr *MockScrapperMockRecorder) QueryTables(ctx any) *MockScrapperQueryTablesCall
QueryTables indicates an expected call of QueryTables.
func (*MockScrapperMockRecorder) SqlDialect ¶ added in v0.4.7
func (mr *MockScrapperMockRecorder) SqlDialect() *MockScrapperSqlDialectCall
SqlDialect indicates an expected call of SqlDialect.
func (*MockScrapperMockRecorder) ValidateConfiguration ¶ added in v0.4.7
func (mr *MockScrapperMockRecorder) ValidateConfiguration(ctx any) *MockScrapperValidateConfigurationCall
ValidateConfiguration indicates an expected call of ValidateConfiguration.
type MockScrapperQueryCatalogCall ¶ added in v0.4.7
MockScrapperQueryCatalogCall wrap *gomock.Call
func (*MockScrapperQueryCatalogCall) Do ¶ added in v0.4.7
func (c *MockScrapperQueryCatalogCall) Do(f func(context.Context) ([]*CatalogColumnRow, error)) *MockScrapperQueryCatalogCall
Do rewrite *gomock.Call.Do
func (*MockScrapperQueryCatalogCall) DoAndReturn ¶ added in v0.4.7
func (c *MockScrapperQueryCatalogCall) DoAndReturn(f func(context.Context) ([]*CatalogColumnRow, error)) *MockScrapperQueryCatalogCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockScrapperQueryCatalogCall) Return ¶ added in v0.4.7
func (c *MockScrapperQueryCatalogCall) Return(arg0 []*CatalogColumnRow, arg1 error) *MockScrapperQueryCatalogCall
Return rewrite *gomock.Call.Return
type MockScrapperQueryCustomMetricsCall ¶ added in v0.4.7
MockScrapperQueryCustomMetricsCall wrap *gomock.Call
func (*MockScrapperQueryCustomMetricsCall) Do ¶ added in v0.4.7
func (c *MockScrapperQueryCustomMetricsCall) Do(f func(context.Context, string, ...any) ([]*CustomMetricsRow, error)) *MockScrapperQueryCustomMetricsCall
Do rewrite *gomock.Call.Do
func (*MockScrapperQueryCustomMetricsCall) DoAndReturn ¶ added in v0.4.7
func (c *MockScrapperQueryCustomMetricsCall) DoAndReturn(f func(context.Context, string, ...any) ([]*CustomMetricsRow, error)) *MockScrapperQueryCustomMetricsCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockScrapperQueryCustomMetricsCall) Return ¶ added in v0.4.7
func (c *MockScrapperQueryCustomMetricsCall) Return(arg0 []*CustomMetricsRow, arg1 error) *MockScrapperQueryCustomMetricsCall
Return rewrite *gomock.Call.Return
type MockScrapperQueryDatabasesCall ¶ added in v0.4.7
MockScrapperQueryDatabasesCall wrap *gomock.Call
func (*MockScrapperQueryDatabasesCall) Do ¶ added in v0.4.7
func (c *MockScrapperQueryDatabasesCall) Do(f func(context.Context) ([]*DatabaseRow, error)) *MockScrapperQueryDatabasesCall
Do rewrite *gomock.Call.Do
func (*MockScrapperQueryDatabasesCall) DoAndReturn ¶ added in v0.4.7
func (c *MockScrapperQueryDatabasesCall) DoAndReturn(f func(context.Context) ([]*DatabaseRow, error)) *MockScrapperQueryDatabasesCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockScrapperQueryDatabasesCall) Return ¶ added in v0.4.7
func (c *MockScrapperQueryDatabasesCall) Return(arg0 []*DatabaseRow, arg1 error) *MockScrapperQueryDatabasesCall
Return rewrite *gomock.Call.Return
type MockScrapperQuerySegmentsCall ¶ added in v0.4.7
MockScrapperQuerySegmentsCall wrap *gomock.Call
func (*MockScrapperQuerySegmentsCall) Do ¶ added in v0.4.7
func (c *MockScrapperQuerySegmentsCall) Do(f func(context.Context, string, ...any) ([]*SegmentRow, error)) *MockScrapperQuerySegmentsCall
Do rewrite *gomock.Call.Do
func (*MockScrapperQuerySegmentsCall) DoAndReturn ¶ added in v0.4.7
func (c *MockScrapperQuerySegmentsCall) DoAndReturn(f func(context.Context, string, ...any) ([]*SegmentRow, error)) *MockScrapperQuerySegmentsCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockScrapperQuerySegmentsCall) Return ¶ added in v0.4.7
func (c *MockScrapperQuerySegmentsCall) Return(arg0 []*SegmentRow, arg1 error) *MockScrapperQuerySegmentsCall
Return rewrite *gomock.Call.Return
type MockScrapperQuerySqlDefinitionsCall ¶ added in v0.4.7
MockScrapperQuerySqlDefinitionsCall wrap *gomock.Call
func (*MockScrapperQuerySqlDefinitionsCall) Do ¶ added in v0.4.7
func (c *MockScrapperQuerySqlDefinitionsCall) Do(f func(context.Context) ([]*SqlDefinitionRow, error)) *MockScrapperQuerySqlDefinitionsCall
Do rewrite *gomock.Call.Do
func (*MockScrapperQuerySqlDefinitionsCall) DoAndReturn ¶ added in v0.4.7
func (c *MockScrapperQuerySqlDefinitionsCall) DoAndReturn(f func(context.Context) ([]*SqlDefinitionRow, error)) *MockScrapperQuerySqlDefinitionsCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockScrapperQuerySqlDefinitionsCall) Return ¶ added in v0.4.7
func (c *MockScrapperQuerySqlDefinitionsCall) Return(arg0 []*SqlDefinitionRow, arg1 error) *MockScrapperQuerySqlDefinitionsCall
Return rewrite *gomock.Call.Return
type MockScrapperQueryTableMetricsCall ¶ added in v0.4.7
MockScrapperQueryTableMetricsCall wrap *gomock.Call
func (*MockScrapperQueryTableMetricsCall) Do ¶ added in v0.4.7
func (c *MockScrapperQueryTableMetricsCall) Do(f func(context.Context, time.Time) ([]*TableMetricsRow, error)) *MockScrapperQueryTableMetricsCall
Do rewrite *gomock.Call.Do
func (*MockScrapperQueryTableMetricsCall) DoAndReturn ¶ added in v0.4.7
func (c *MockScrapperQueryTableMetricsCall) DoAndReturn(f func(context.Context, time.Time) ([]*TableMetricsRow, error)) *MockScrapperQueryTableMetricsCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockScrapperQueryTableMetricsCall) Return ¶ added in v0.4.7
func (c *MockScrapperQueryTableMetricsCall) Return(arg0 []*TableMetricsRow, arg1 error) *MockScrapperQueryTableMetricsCall
Return rewrite *gomock.Call.Return
type MockScrapperQueryTablesCall ¶ added in v0.4.7
MockScrapperQueryTablesCall wrap *gomock.Call
func (*MockScrapperQueryTablesCall) Do ¶ added in v0.4.7
func (c *MockScrapperQueryTablesCall) Do(f func(context.Context) ([]*TableRow, error)) *MockScrapperQueryTablesCall
Do rewrite *gomock.Call.Do
func (*MockScrapperQueryTablesCall) DoAndReturn ¶ added in v0.4.7
func (c *MockScrapperQueryTablesCall) DoAndReturn(f func(context.Context) ([]*TableRow, error)) *MockScrapperQueryTablesCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockScrapperQueryTablesCall) Return ¶ added in v0.4.7
func (c *MockScrapperQueryTablesCall) Return(arg0 []*TableRow, arg1 error) *MockScrapperQueryTablesCall
Return rewrite *gomock.Call.Return
type MockScrapperSqlDialectCall ¶ added in v0.4.7
MockScrapperSqlDialectCall wrap *gomock.Call
func (*MockScrapperSqlDialectCall) Do ¶ added in v0.4.7
func (c *MockScrapperSqlDialectCall) Do(f func() sqldialect.Dialect) *MockScrapperSqlDialectCall
Do rewrite *gomock.Call.Do
func (*MockScrapperSqlDialectCall) DoAndReturn ¶ added in v0.4.7
func (c *MockScrapperSqlDialectCall) DoAndReturn(f func() sqldialect.Dialect) *MockScrapperSqlDialectCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockScrapperSqlDialectCall) Return ¶ added in v0.4.7
func (c *MockScrapperSqlDialectCall) Return(arg0 sqldialect.Dialect) *MockScrapperSqlDialectCall
Return rewrite *gomock.Call.Return
type MockScrapperValidateConfigurationCall ¶ added in v0.4.7
MockScrapperValidateConfigurationCall wrap *gomock.Call
func (*MockScrapperValidateConfigurationCall) Do ¶ added in v0.4.7
func (c *MockScrapperValidateConfigurationCall) Do(f func(context.Context) ([]string, error)) *MockScrapperValidateConfigurationCall
Do rewrite *gomock.Call.Do
func (*MockScrapperValidateConfigurationCall) DoAndReturn ¶ added in v0.4.7
func (c *MockScrapperValidateConfigurationCall) DoAndReturn(f func(context.Context) ([]string, error)) *MockScrapperValidateConfigurationCall
DoAndReturn rewrite *gomock.Call.DoAndReturn
func (*MockScrapperValidateConfigurationCall) Return ¶ added in v0.4.7
func (c *MockScrapperValidateConfigurationCall) Return(warnings []string, err error) *MockScrapperValidateConfigurationCall
Return rewrite *gomock.Call.Return
type NoEnoughPermissionsError ¶
type NoEnoughPermissionsError struct {
	Err error
}
    func NewNoEnoughPermissionsError ¶
func NewNoEnoughPermissionsError(err error) *NoEnoughPermissionsError
func (*NoEnoughPermissionsError) Error ¶
func (r *NoEnoughPermissionsError) Error() string
type SchemaColumnField ¶
type SchemaColumnField struct {
	Name string `protobuf:"bytes,1,opt,name=name,proto3"                                   json:"name,omitempty"`
	// Human readable name of the column as present in dbt or data warehouse.
	HumanName string `protobuf:"bytes,2,opt,name=human_name,json=humanName,proto3"              json:"human_name,omitempty"`
	// Native data type of the column as present in data warehouse.
	NativeType string `protobuf:"bytes,4,opt,name=native_type,json=nativeType,proto3"            json:"native_type,omitempty"`
	// Description of the column
	Description *string `protobuf:"bytes,5,opt,name=description,proto3"                            json:"description,omitempty"`
	// Ordinal position of the column in the table, starting from 1
	OrdinalPosition int32 `protobuf:"varint,6,opt,name=ordinal_position,json=ordinalPosition,proto3" json:"ordinal_position,omitempty"`
	// Indicates that the column type could be used as a struct/json in a data warehouse
	IsStruct bool `protobuf:"varint,7,opt,name=is_struct,json=isStruct,proto3"               json:"is_struct,omitempty"`
	// Indicates that the column is a repeated field in a data warehouse (e.g. array)
	IsRepeated bool `protobuf:"varint,8,opt,name=is_repeated,json=isRepeated,proto3"           json:"is_repeated,omitempty"`
	// Fields inside of the struct/record like column
	Fields []*SchemaColumnField `protobuf:"bytes,9,rep,name=fields,proto3"                                 json:"fields,omitempty"`
}
    type Scrapper ¶
type Scrapper interface {
	DialectType() string
	SqlDialect() sqldialect.Dialect
	IsPermissionError(err error) bool
	ValidateConfiguration(ctx context.Context) (warnings []string, err error)
	QueryCatalog(ctx context.Context) ([]*CatalogColumnRow, error)
	QueryTableMetrics(ctx context.Context, lastMetricsFetchTime time.Time) ([]*TableMetricsRow, error)
	QuerySqlDefinitions(ctx context.Context) ([]*SqlDefinitionRow, error)
	QueryTables(ctx context.Context) ([]*TableRow, error)
	QueryDatabases(ctx context.Context) ([]*DatabaseRow, error)
	QuerySegments(ctx context.Context, sql string, args ...any) ([]*SegmentRow, error)
	QueryCustomMetrics(ctx context.Context, sql string, args ...any) ([]*CustomMetricsRow, error)
	// This will close underlying execer, such scrapper can't be used anymore
	Close() error
}
    type SegmentRow ¶
type SegmentValue ¶ added in v0.1.7
type SqlDefinitionRow ¶
type SqlDefinitionRow struct {
	Instance           string `db:"instance"             json:"instance"             ch:"instance"             bigquery:"instance"`
	Database           string `db:"database"             json:"database"             ch:"_database"            bigquery:"database"`
	Schema             string `db:"schema"               json:"schema"               ch:"schema"               bigquery:"schema"`
	Table              string `db:"table"                json:"table"                ch:"table"                bigquery:"table"`
	IsView             bool   `db:"is_view"              json:"is_view"              ch:"is_view"              bigquery:"is_view"`
	IsMaterializedView bool   `db:"is_materialized_view" json:"is_materialized_view" ch:"is_materialized_view" bigquery:"is_materialized_view"`
	Sql                string `db:"sql"                  json:"sql"                  ch:"sql"                  bigquery:"sql"`
}
    func (SqlDefinitionRow) TableFqn ¶
func (r SqlDefinitionRow) TableFqn() DwhFqn
type TableMetricsRow ¶
type TableMetricsRow struct {
	Instance  string     `db:"instance"   json:"instance"   ch:"instance"   bigquery:"instance"`
	Database  string     `db:"database"   json:"database"   ch:"_database"  bigquery:"database"`
	Schema    string     `db:"schema"     json:"schema"     ch:"schema"     bigquery:"schema"`
	Table     string     `db:"table"      json:"table"      ch:"table"      bigquery:"table"`
	RowCount  *int64     `db:"row_count"  json:"row_count"  ch:"row_count"  bigquery:"row_count"`
	UpdatedAt *time.Time `db:"updated_at" json:"updated_at" ch:"updated_at" bigquery:"updated_at"`
	SizeBytes *int64     `db:"size_bytes" json:"size_bytes" ch:"size_bytes" bigquery:"size_bytes"`
}
    func (TableMetricsRow) TableFqn ¶
func (r TableMetricsRow) TableFqn() DwhFqn
type TableRow ¶
type TableRow struct {
	Instance    string  `db:"instance"    json:"instance"    ch:"instance"    bigquery:"instance"`
	Database    string  `db:"database"    json:"database"    ch:"_database"   bigquery:"database"`
	Schema      string  `db:"schema"      json:"schema"      ch:"schema"      bigquery:"schema"`
	Table       string  `db:"table"       json:"table"       ch:"table"       bigquery:"table"`
	TableType   string  `db:"table_type"  json:"table_type"  ch:"table_type"  bigquery:"table_type"`
	Description *string `db:"description" json:"description" ch:"description" bigquery:"description"`
	Tags        []*Tag  `db:"tags"        json:"tags"`
	IsView      bool    `db:"is_view"     json:"is_view"     ch:"is_view"`
	IsTable     bool    `db:"is_table"    json:"is_table"    ch:"is_table"`
}
    type Tag ¶
type WithSetInstance ¶
type WithSetInstance interface {
	SetInstance(instance string)
}