Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JsonMask ¶
type JsonMask struct {
// contains filtered or unexported fields
}
JsonMask is a struct that defines the masking process
func NewJSONMask ¶
NewJSONMask initializes a JsonMask Mask fields: 1. Global (a,b,c) - will mask all encountered json fields (nested fields will be masked entirely) 2. XPath (/a/b/c) - will mask only specified json fields by xpath
func (*JsonMask) RegisterMaskFloat64Func ¶
func (j *JsonMask) RegisterMaskFloat64Func(fn MaskFloat64Func)
RegisterMaskFloat64Func method for adding MaskFloat64Func to JsonMask
func (*JsonMask) RegisterMaskIntFunc ¶
func (j *JsonMask) RegisterMaskIntFunc(fn MaskIntFunc)
RegisterMaskIntFunc method for adding MaskIntFunc to JsonMask
func (*JsonMask) RegisterMaskStringFunc ¶
func (j *JsonMask) RegisterMaskStringFunc(fn MaskStringFunc)
RegisterMaskStringFunc method for adding MaskStringFunc to JsonMask
type MaskFloat64Func ¶
list of func type that must be satisfied to add a custom mask
func MaskRandomFloat64 ¶
func MaskRandomFloat64(arg ...string) MaskFloat64Func
MaskRandomFloat64 converts a float64 to a random number in range (default 1000.3) if you pass "1000.3" to arg, it sets a random number in the range of 0.000 to 999.999
type MaskIntFunc ¶
list of func type that must be satisfied to add a custom mask
func MaskRandomInt ¶
func MaskRandomInt(arg ...int) MaskIntFunc
MaskRandomInt masks converts an integer (int) into a random number in range (default 1000)
type MaskStringFunc ¶
list of func type that must be satisfied to add a custom mask
func MaskFilledString ¶
func MaskFilledString(maskChar string, length ...int) MaskStringFunc
MaskFilledString masks the string length of the value with the same length or by passed length
func MaskHashString ¶
func MaskHashString() MaskStringFunc
MaskHashString masks and hashes (sha1) a string