utils

package
v0.0.0-...-e24b382 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 20, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckEmailValidity

func CheckEmailValidity(email string) (matched bool)

CheckEmailValidity -

func CheckPhoneValidity

func CheckPhoneValidity(phone string) (matched bool)

CheckPhoneValidity -

func CheckUsernameValidity

func CheckUsernameValidity(username string) (matched bool)

CheckUsernameValidity -

func ExecLinuxShell

func ExecLinuxShell(shell string) (err error)

ExecLinuxShell -

func GenerateToken

func GenerateToken(username string) (token string)

GenerateToken - token = md5(username+timestamp+tokenSalt)+timestamp[:]

func GetFileSize

func GetFileSize(path string) (int64, error)

GetFileSize -

func MD5Byte

func MD5Byte(data []byte) string

MD5Byte -

func MD5File

func MD5File(file *os.File) string

MD5File -

func ModifyFileName

func ModifyFileName(path string, newFileName string) (newPatn string, err error)

ModifyFileName -

func PathExists

func PathExists(path string) bool

PathExists -

func Sha1Byte

func Sha1Byte(data []byte) string

Sha1Byte -

func Sha1File

func Sha1File(file *os.File) string

Sha1File -

func Sha1MFile

func Sha1MFile(file multipart.File) string

Sha1MFile -

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL