Documentation
¶
Index ¶
- func CreateTempFile(dir, pattern string) (file *os.File, stat fs.FileInfo, effect func(), err error)
- func GeneratePassword(userPassword string) ([]byte, error)
- func GetParamsInt64(c *gin.Context, key string) int64
- func GetParamsStr(c *gin.Context, key string) string
- func ProtectRun(entry func())
- func RandomAlphaString(length int) string
- func RandomDigitString(length int) string
- func RandomLowerString(length int) string
- func RandomString(length int) string
- func RandomUpperString(length int) string
- func RetData(c *gin.Context, data interface{})
- func RetErr(c *gin.Context, err error)
- func RetSuccess(c *gin.Context)
- func Unpack(tarFile []byte) (files [][]byte, err error)
- func ValidatePassword(userPassword string, hashed string) (isOK bool, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTempFile ¶
func CreateTempFile(dir, pattern string) (file *os.File, stat fs.FileInfo, effect func(), err error)
CreateTempFile usage:
f, stat, effect, err := CreateTempFile(dir, pattern) if err != nil { //...... } defer effect()
func GeneratePassword ¶
GeneratePassword 给密码就行加密操作
func RetSuccess ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.