utils

package
v0.0.0-...-79f8893 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckErr

func CheckErr(err error)

func CheckTxErr

func CheckTxErr(err error, tx *sql.Tx)

func FilterHideCates

func FilterHideCates(cates []types.Catelog) []types.Catelog

func FilterHideTools

func FilterHideTools(tools []types.Tool, cates []types.Catelog) []types.Tool

func GenerateId

func GenerateId() int

func GetImgBase64FromUrl

func GetImgBase64FromUrl(url string) string

func GetMIME

func GetMIME(suffix string) string

func GetSuffixFromUrl

func GetSuffixFromUrl(url string) string

func In

func In(target string, str_array []string) bool

func IsLogin

func IsLogin(c *gin.Context) bool

func ParseJWT

func ParseJWT(tokenString string) (*jwt.Token, error)

解密一个 JTW

func PathExistsOrCreate

func PathExistsOrCreate(path string)

func RandomJWTKey

func RandomJWTKey() string

func SignJWT

func SignJWT(user types.User) (string, error)

签名一个 JTW

func SignJWTForAPI

func SignJWTForAPI(tokenName string, tokenId int) (string, error)

签名一个 JTW

Types

This section is empty.

Jump to

Keyboard shortcuts

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