Documentation
¶
Index ¶
- func DefaultMasker[T any](m Masker[T]) defaultMasker
- func Email(email string, opts ...func(*Config[EmailConfig])) (string, error)
- func IPv4Addr(ip string, opts ...func(*Config[IPv4AddrConfig])) (string, error)
- func Of(kind string) (m defaultMasker, found bool)
- func Register(kind string, m defaultMasker)
- type Config
- type EmailConfig
- type IPv4AddrConfig
- type Masker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultMasker ¶
DefaultMasker takes a masker and return the default masker associated with.
Types ¶
type Config ¶
Config is the generic mask config required by any registered mask.
The Type parameter represents the mask specific config.
func DefaultConfig ¶
DefaultConfig wraps the specific mask config and returns a generic one with defaults.
type EmailConfig ¶
type EmailConfig struct {
MaskDomain bool // default false
}
type IPv4AddrConfig ¶
Click to show internal directories.
Click to hide internal directories.