mask

package
v0.0.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const MaskFieldTransformerType = abstract.TransformerType("mask_field")

Variables

This section is empty.

Functions

func NewHmacHasherTransformer

func NewHmacHasherTransformer(config MaskFunctionHash, lgr log.Logger, tables filter.Filter, columns []string) (abstract.Transformer, error)

func NewMaskTransformer

func NewMaskTransformer(config Config, lgr log.Logger) (abstract.Transformer, error)

Types

type Config

type Config struct {
	MaskFunctionHash MaskFunctionHash `json:"maskFunctionHash"`
	Tables           filter.Tables    `json:"tables"`
	Columns          []string         `json:"columns"`
}

type HmacHasher

type HmacHasher struct {
	Tables      filter.Filter
	Columns     *util.Set[string]
	HashFactory func() hash.Hash
	Salt        string
	// contains filtered or unexported fields
}

func (*HmacHasher) Apply

func (*HmacHasher) Description

func (hh *HmacHasher) Description() string

func (*HmacHasher) ResultSchema

func (hh *HmacHasher) ResultSchema(original *abstract.TableSchema) (*abstract.TableSchema, error)

func (*HmacHasher) Suitable

func (hh *HmacHasher) Suitable(table abstract.TableID, schema *abstract.TableSchema) bool

func (*HmacHasher) Type

func (hh *HmacHasher) Type() abstract.TransformerType

type MaskFunctionHash

type MaskFunctionHash struct {
	UserDefinedSalt string `json:"userDefinedSalt"`
}

Jump to

Keyboard shortcuts

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