Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnonRuleParser ¶ added in v0.8.4
type AnonRuleParser struct {
// contains filtered or unexported fields
}
AnonRuleParser is a wrapper around a transformer rule parser that fetches and converts anon extension security labels into transformation rules before validation is performed
func NewAnonRuleParser ¶ added in v0.8.4
func NewAnonRuleParser(ctx context.Context, pgURL string, dumpToFile bool, logger loglib.Logger, parser ParseFn) (*AnonRuleParser, error)
NewAnonRuleParser is a wrapper around a parser that fetches and converts anon extension security labels into transformation rules before validation is performed
func (*AnonRuleParser) Close ¶ added in v0.8.4
func (a *AnonRuleParser) Close() error
func (*AnonRuleParser) ParseAndValidate ¶ added in v0.8.4
func (a *AnonRuleParser) ParseAndValidate(ctx context.Context, rules Rules) (map[string]ColumnTransformers, error)
ParseAndValidate will fetch the anon masking rules from the source database and convert them into transformation rules before passing them to the wrapped parser for validation.
type ColumnTransformers ¶ added in v0.5.0
type ColumnTransformers map[string]transformers.Transformer
type Config ¶
type Config struct {
InferFromSecurityLabels bool
DumpInferredRules bool
TransformerRules []TableRules
ValidationMode string
}
type PostgresTransformerParser ¶ added in v0.5.0
type PostgresTransformerParser struct {
// contains filtered or unexported fields
}
func NewPostgresTransformerParser ¶ added in v0.5.0
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(ctx context.Context, rules Rules) (map[string]ColumnTransformers, error)
type Rules ¶
type Rules struct {
Transformers []TableRules `yaml:"transformations"`
ValidationMode string `yaml:"validation_mode"`
}
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