Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AESAnonymizer ¶
type AESAnonymizer[K any] struct { // contains filtered or unexported fields }
func NewAESAnonymizer ¶
func NewAESAnonymizer[K any](secretProvider SecretProvider[K]) AESAnonymizer[K]
func (AESAnonymizer[K]) AnonymizeString ¶
func (AESAnonymizer[K]) DeanonymizeString ¶
type MaskingAnonymizer ¶
type MaskingAnonymizer[T any] struct{}
MaskingAnonymizer masks struct fields, losing the original value in progress. This might be useful for things like avoiding logging of sensitive information.
func NewMaskingAnonymizer ¶
func NewMaskingAnonymizer[T any](mask T) MaskingAnonymizer[T]
func (MaskingAnonymizer[T]) AnonymizeString ¶
func (MaskingAnonymizer[T]) DeanonymizeString ¶
type SecretProvider ¶
type StringAnonymizer ¶
type StringAnonymizer[K any] interface { AnonymizeString(ctx context.Context, key K, value string) (string, error) DeanonymizeString(ctx context.Context, key K, value string) (string, error) }
StringAnonymizer anonymizes and deanonymizes strings. K is the type of key used to anonymize the string.
type StructAnonymizer ¶
StructAnonymizer anonymizes and deanonymizes structs. K is the type of key used to anonymize the struct. T is the type of struct to be anonymized.
func NewStructAnonymizer ¶
func NewStructAnonymizer[K any, T any]( stringAnonymizer StringAnonymizer[K], ) StructAnonymizer[K, T]
func (StructAnonymizer[K, T]) Anonymize ¶
func (a StructAnonymizer[K, T]) Anonymize(ctx context.Context, key K, data T) (T, error)
func (StructAnonymizer[K, T]) Deanonymize ¶
func (a StructAnonymizer[K, T]) Deanonymize(ctx context.Context, key K, data T) (T, error)
Click to show internal directories.
Click to hide internal directories.