filter

package
v0.0.0-rc10 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const FilterColumnsTransformerType = abstract.TransformerType("filter_columns")
View Source
const SkipEventsTransformerType = abstract.TransformerType("skip_events")

Variables

This section is empty.

Functions

func MatchAnyTableNameVariant

func MatchAnyTableNameVariant(filter Filter, tableID abstract.TableID) bool

func TableFqtnVariants

func TableFqtnVariants(tID abstract.TableID) []string

Types

type Columns

type Columns struct {
	IncludeColumns []string `json:"includeColumns" yaml:"include_columns"`
	ExcludeColumns []string `json:"excludeColumns" yaml:"exclude_columns"`
}

type Filter

type Filter struct {
	IncludeRegexp []string `json:"includeRegexp" yaml:"include_regexp"`
	ExcludeRegexp []string `json:"excludeRegexp" yaml:"exclude_regexp"`
	// contains filtered or unexported fields
}

func NewFilter

func NewFilter(IncludeRegexp, ExcludeRegexp []string) (Filter, error)

func (*Filter) Empty

func (f *Filter) Empty() bool

func (*Filter) Match

func (f *Filter) Match(value string) bool

type FilterColumnsConfig

type FilterColumnsConfig struct {
	Columns Columns `json:"columns"`
	Tables  Tables  `json:"tables"`
}

type FilterColumnsTransformer

type FilterColumnsTransformer struct {
	Columns Filter
	Tables  Filter
	Logger  log.Logger
	// contains filtered or unexported fields
}

func NewCustomFilterColumnsTransformer

func NewCustomFilterColumnsTransformer(tables, columns Filter, lgr log.Logger) *FilterColumnsTransformer

func NewFilterColumnsTransformer

func NewFilterColumnsTransformer(config FilterColumnsConfig, lgr log.Logger) (*FilterColumnsTransformer, error)

func (*FilterColumnsTransformer) Apply

func (*FilterColumnsTransformer) Description

func (f *FilterColumnsTransformer) Description() string

func (*FilterColumnsTransformer) ResultSchema

func (f *FilterColumnsTransformer) ResultSchema(original *abstract.TableSchema) (*abstract.TableSchema, error)

func (*FilterColumnsTransformer) Suitable

func (f *FilterColumnsTransformer) Suitable(table abstract.TableID, schema *abstract.TableSchema) bool

func (*FilterColumnsTransformer) Type

type SkipEvents

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

func NewSkipEvents

func NewSkipEvents(transformer SkipEventsConfig, logger log.Logger) (*SkipEvents, error)

func (*SkipEvents) Apply

func (*SkipEvents) Description

func (se *SkipEvents) Description() string

func (*SkipEvents) ResultSchema

func (se *SkipEvents) ResultSchema(original *abstract.TableSchema) (*abstract.TableSchema, error)

func (*SkipEvents) Suitable

func (se *SkipEvents) Suitable(table abstract.TableID, schema *abstract.TableSchema) bool

func (*SkipEvents) Type

func (se *SkipEvents) Type() abstract.TransformerType

type SkipEventsConfig

type SkipEventsConfig struct {
	Tables Tables   `json:"tables"`
	Events []string `json:"events"`
}

type Tables

type Tables struct {
	IncludeTables []string `json:"includeTables" yaml:"include_tables"`
	ExcludeTables []string `json:"excludeTables" yaml:"exclude_tables"`
}

Jump to

Keyboard shortcuts

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