mask

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mask

type Mask struct {
	*masker.MaskerMarshaler
}

func New

func New(opts ...Option) *Mask

func NewDefault

func NewDefault(opts ...Option) *Mask

func (*Mask) MaskMap

func (m *Mask) MaskMap(val map[string]interface{}) (map[string]interface{}, error)

Mask all map values

func (*Mask) MaskStruct

func (m *Mask) MaskStruct(val interface{}) (interface{}, error)

Mask all struct fields

type Maskers

type Maskers struct {
	Type masker.MaskerType
	Mask masker.Masker
}

type Option

type Option interface {
	Apply(mask *Mask)
}

func WithRegisterMaskers

func WithRegisterMaskers(maskers ...Maskers) Option

func WithUnregisterMaskers

func WithUnregisterMaskers(maskers ...masker.MaskerType) Option

Jump to

Keyboard shortcuts

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