Documentation
¶
Index ¶
- func BcryptCompare(passwordHash, plainPassword string) bool
- func BcryptGetCost(passwordHash string) int
- func BcryptPassword(plainPassword string) (string, error)
- func CopyStruct(src, dest interface{}) error
- func GenerateSpanId(addr string) string
- func GetTraceInfoFromCtx(ctx context.Context) (traceId, spanId, pSpanId string)
- func MaskEmail(address string) string
- func MaskLoginName(loginName string) string
- func MaskPhone(phone string) string
- func MaskRealName(realName string) string
- func PasswordComplexityVerify(s string) bool
- func RandNumStr(len uint8) string
- func RandomString(length uint8) string
- func SetCharset(c Charset)
- type Charset
- type Random
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BcryptCompare ¶
func BcryptGetCost ¶
func BcryptPassword ¶
func CopyStruct ¶
func CopyStruct(src, dest interface{}) error
func GenerateSpanId ¶
GenerateSpanId 生成spanId,思路:ip(空间唯一)与时间戳(时间唯一)异或运算+随机数
func GetTraceInfoFromCtx ¶
GetTraceInfoFromCtx 从ctx中获取trace信息
func MaskRealName ¶
MaskRealName 保留姓名首末位 如:张三--->张* 赵丽颖--->赵*颖 欧阳娜娜--->欧**娜
func RandNumStr ¶
func RandomString ¶
func SetCharset ¶
func SetCharset(c Charset)
Types ¶
Click to show internal directories.
Click to hide internal directories.