helper

package
v0.0.0-...-45cb979 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2023 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CosInitPart

func CosInitPart(ext string) (string, string, error)

func CosPartUpload

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

func CosPartUploadComplete

func CosPartUploadComplete(key, uploadId string, co []cos.Object) error

func CosUpLoad

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

func GenerateToken

func GenerateToken(id int64, identity, name string, second int) (string, error)

生成 token

func GetRand

func GetRand() string

生成验证码

func Md5

func Md5(s string) string

func SendCode

func SendCode(toUserEmail, code string) error

MailSendCode 邮箱验证码发送

func UUID

func UUID() string

Types

type UserClaims

type UserClaims struct {
	Id       int64
	Identity string
	Name     string
	jwt.RegisteredClaims
}

func AnalyzeToken

func AnalyzeToken(token string) (*UserClaims, error)

AnalyzeToken Token 解析

Jump to

Keyboard shortcuts

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