utils

package
v0.0.0-...-ce7cf01 Latest Latest
Warning

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

Go to latest
Published: May 3, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnalyzeToken

func AnalyzeToken(token string) (*define.UserClaim, error)

AnalyzeToken 解析token

func FormatErrorLog

func FormatErrorLog(err error) string

FormatErrorLog 统一异常返回方法

func GenerateToken

func GenerateToken(id int, identity string, userName string, second int) (error, string)

GenerateToken 生成token

func GetFileType

func GetFileType(ext string) string

func GetUUID

func GetUUID() string

GetUUID 获取UUID

func MailSendCode

func MailSendCode(mail, code string) error

MailSendCode 验证码发送

func Md5ToString

func Md5ToString(s string) string

Md5ToString 生成md5

func RandCode

func RandCode() string

RandCode 生成随机吗

func UploadFileToMinio

func UploadFileToMinio(r *http.Request) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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