Documentation
¶
Index ¶
Constants ¶
View Source
const ( Full mtype = "full" Email mtype = "email" Mobile mtype = "mobile" CreditCard mtype = "credit" MStruct mtype = "struct" )
Variables ¶
This section is empty.
Functions ¶
func Struct ¶
Struct returns a copy of struct with masked fields. Fields can be marked for masking like this:
type Request struct {
Password string `mask:"full"`
Email string `mask:"email"`
Mobile string `mask:"mobile"`
CreditCard string `mask:"credit"`
SomeStruct T `mask:"struct"`
}
If unable to mask any field - returns MaskFail struct with error description field. Meant to be used only for logging/tracing purposes!
Types ¶
Click to show internal directories.
Click to hide internal directories.