util

package
v0.0.0-...-4cd4f3f Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckExt

func CheckExt(filename string) bool

func GetVideoCover

func GetVideoCover(videoPath, snapshotPath string, frameNum int) error

func Md5Salt

func Md5Salt(code string) string

func Mkdir

func Mkdir(basePath string) string

Mkdir 定义一个创建文件目录的方法

Types

type JWT

type JWT struct {
}

func (*JWT) GenerateToken

func (j *JWT) GenerateToken(msg string, ttl int64) string

func (*JWT) ParseToken

func (j *JWT) ParseToken(tokenString string) (string, error)

type MyClaims

type MyClaims struct {
	jwt.RegisteredClaims        // 内置的payload字段
	UserID               string `json:"user_id"` // 自定义的payload字段
}

MyClaims 自定义的payload

Jump to

Keyboard shortcuts

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