Documentation ¶
Index ¶
Constants ¶
View Source
const ( MaskPartialDisplay = "partial-display" MaskPartialMask = "partial-masking" MaskTruncation = "truncation" MaskReplacement = "replacement" MaskShuffling = "shuffling" )
View Source
const ( ReplaceRandom = "random" ReplaceCustom = "custom" )
View Source
const ( MatchInner = "inner" MatchKeyword = "keyword" MatchRegex = "regex" MatchJsonPath = "json_path" )
View Source
const ( MatchInnerValueName = "name" MatchInnerValuePhone = "phone" MatchInnerValueIDCard = "id-card" MatchInnerValueBankCard = "bank-card" MatchInnerValueDate = "date" MatchInnerValueAmount = "amount" )
Variables ¶
This section is empty.
Functions ¶
func RegisterMaskFactory ¶
func RegisterMaskFactory(name string, factory IMaskFactory)
Types ¶
type IInnerMask ¶
type IMaskFactory ¶
type IMaskFactory interface {
Create(cfg *Rule, maskFunc MaskFunc) (IMaskDriver, error)
}
func GetMaskFactory ¶
func GetMaskFactory(name string) (IMaskFactory, bool)
type MaskFunc ¶
func GenMaskFunc ¶
type MaskManager ¶
type MaskManager struct {
// contains filtered or unexported fields
}
func NewMaskManager ¶
func NewMaskManager() *MaskManager
func (*MaskManager) Del ¶
func (m *MaskManager) Del(name string)
func (*MaskManager) Get ¶
func (m *MaskManager) Get(name string) (IMaskFactory, bool)
func (*MaskManager) Register ¶
func (m *MaskManager) Register(name string, driver IMaskFactory)
Click to show internal directories.
Click to hide internal directories.