Documentation ¶
Index ¶
- func Addcslashes(s string) string
- func ExtractDigitsInt(str string) int
- func ExtractDigitsString(str string) string
- func ExtractTitle(str string, limitChars, limitWords int) string
- func FileDeletionByMask(ctx context.Context, fpathes string) error
- func GetDateTimeFromExif(imageBytes []byte) (string, error)
- func GetEmailsAlias(email string) string
- func GetJwtClaimHMAC(tokenString, secret string) ([]byte, map[string]interface{}, error)
- func GetMD5Hash(text string) string
- func GetSaltedSha256(salt, password string) string
- func GetSha256(text string) string
- func GetUserpicURL(filepath string) string
- func ImagefileProgressiveOptimisation(ctx context.Context, fpath, targetpath string, removemeta bool) error
- func ImagefileRemove(fpath string) error
- func ImagefileResizing(fpath, newfpath string, setwidth uint) error
- func ImagefileValidations(fpath string) error
- func IsBadWords(str string, bads string) bool
- func IsEqualSaltedSha256(salt, password, hashDatabase string) bool
- func JpgValid(file *os.File) bool
- func MakeArgonHash(password string) (string, error)
- func MakeBCryptHash(raw string, cost int) string
- func MakeJwtString(secretString, tokid, fqdn, uid, appids, roles string) (string, error)
- func MakeUploadDirByUserId(prevPath, uid string) (string, error)
- func MatchArgonHashAndPassword(trypass, passhash string) bool
- func PhoneNormalisation(n string) string
- func Pkeyer(raw interface{}) int64
- func RandToken32bit() string
- func RandomHexString(n int) string
- func RandomUsableString(n int) string
- func SendEmailWithTempate(ctx context.Context, ...) error
- func Stringer(raw interface{}) string
- func Substr(input string, start int, length int) string
- func SwearDetector(message string) ([]string, error)
- func VerifyBCrypt(testPassword, hash string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Addcslashes ¶
TODO use that: regexp.QuoteMeta(`Escaping symbols like: .+*?()|[]{}^$`)
func ExtractDigitsInt ¶
func ExtractDigitsString ¶
func ExtractTitle ¶
func GetDateTimeFromExif ¶
Parse exif data in image-bytes and get datetime string if exist. If not - get file datetime info. Output photo format is: IMG_20200301_175147.jpg
func GetJwtClaimHMAC ¶
func GetMD5Hash ¶
func GetSaltedSha256 ¶
func GetUserpicURL ¶
func ImagefileProgressiveOptimisation ¶
func ImagefileProgressiveOptimisation(ctx context.Context, fpath, targetpath string, removemeta bool) error
Jpeg optimizing with jpegtran utilits then copy to -> userpic and maybe remove origfile
func ImagefileResizing ¶
func IsBadWords ¶
func IsEqualSaltedSha256 ¶
func MakeArgonHash ¶
func MakeBCryptHash ¶
Generate return a hashed password
func MakeJwtString ¶
get real jwt by next params: seckey, tokid, fqdn, uid, appsid, roles
func MakeUploadDirByUserId ¶
Make new dir with name as the eid in current prevPath directory For example prevPath="upload/", uid="123" will make new directory "upload/123"
func PhoneNormalisation ¶
func RandomHexString ¶
func RandomUsableString ¶
func SendEmailWithTempate ¶
func SwearDetector ¶
func VerifyBCrypt ¶
Verify compares a hashed password with plaintext password
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.