Documentation ¶
Index ¶
- func BoolPtr(b bool) *bool
- func ComparePasswordAndHash(password, hash string) bool
- func HashPassword(password string) (string, error)
- func IntPtr(i int) *int
- func IsBurnerEmail(val string) bool
- func IsE164PhoneNumber(val string) bool
- func PasswordValidate(pass string, pwdLen int) bool
- func RandomID(strSize int, randType ...RandType) string
- func StringPtr(s string) *string
- type RandType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComparePasswordAndHash ¶
ComparePasswordAndHash compares a given password to its bcrypt hash
func HashPassword ¶
HashPassword hashes a password to bycrypt
func IsBurnerEmail ¶
IsBurnerEmail checks if an email is a burner email or not
func IsE164PhoneNumber ¶
IsE164PhoneNumber validates a number in the E164 Format
func PasswordValidate ¶
PasswordValidate: validates plain password against the rules defined below.
upp: at least one upper case letter. low: at least one lower case letter. num: at least one digit. sym: at least one special character. tot: at least theRequired passwordLength as passed in arguement. No empty string or whitespace.
Types ¶
type RandType ¶
type RandType string
const ( RandTypeAlphaNum RandType = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" RandTypeAlphaNumNoSimilarity RandType = "2346789abcdefghijkmnpqrtwxyzABCDEFGHJKLMNPQRTUVWXYZ" RandTypeAlpha RandType = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz" RandTypeNumber RandType = "0123456789" )
Click to show internal directories.
Click to hide internal directories.