Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ColumnTransformers ¶ added in v0.5.0
type ColumnTransformers map[string]transformers.Transformer
type Config ¶
type Config struct {
TransformerRules []TableRules
}
type ParseFn ¶ added in v0.5.0
type ParseFn func(rules []TableRules) (map[string]ColumnTransformers, error)
type PostgresTransformerParser ¶ added in v0.5.0
type PostgresTransformerParser struct {
// contains filtered or unexported fields
}
func NewPostgresTransformerParser ¶ added in v0.5.0
func NewPostgresTransformerParser(ctx context.Context, pgURL string, builder transformerBuilder) (*PostgresTransformerParser, error)
func (*PostgresTransformerParser) Close ¶ added in v0.5.0
func (v *PostgresTransformerParser) Close() error
func (*PostgresTransformerParser) ParseAndValidate ¶ added in v0.5.0
func (v *PostgresTransformerParser) ParseAndValidate(rules []TableRules) (map[string]ColumnTransformers, error)
type Rules ¶
type Rules struct {
Transformers []TableRules `yaml:"transformations"`
}
type TableRules ¶
type TableRules struct {
Schema string `yaml:"schema"`
Table string `yaml:"table"`
ColumnRules map[string]TransformerRules `yaml:"column_transformers"`
ValidationMode string `yaml:"validation_mode"`
}
type Transformer ¶
type Transformer struct {
// contains filtered or unexported fields
}
Transformer is a decorator around a wal processor that transforms wal event column values following the configured transformation rules.
func New ¶
func New(ctx context.Context, cfg *Config, processor processor.Processor, builder transformerBuilder, opts ...Option) (*Transformer, error)
New will return a transformer processor wrapper that will transform incoming wal event column values as configured by the transformation rules.
func (*Transformer) Close ¶
func (t *Transformer) Close() error
func (*Transformer) Name ¶
func (t *Transformer) Name() string
func (*Transformer) ProcessWALEvent ¶
Click to show internal directories.
Click to hide internal directories.