utils

package
v0.0.0-...-f2556d3 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2022 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var JWT *jwt.JWT

Functions

func Base64Decode

func Base64Decode(s string) ([]byte, error)

Base64解码

func Base64Encode

func Base64Encode(data []byte) string

Base64编码

func Base64URLDecode

func Base64URLDecode(s string) ([]byte, error)

Base64URL解码

func Base64URLEncode

func Base64URLEncode(data []byte) string

Base64URL编码

func GenerateID

func GenerateID() string

func GetAuthModel

func GetAuthModel(ctx *gin.Context) request.AuthJWT

GetAuthModel GetAuthModel

func GetContentTypeByFileName

func GetContentTypeByFileName(filename string) (string, string)

func GetPassword

func GetPassword(password string, sale string) string

func InitJWT

func InitJWT()

func InitPgSQL

func InitPgSQL(pgConf *conf.PgSQLConfig) (*gorm.DB, error)

func Md5Encode

func Md5Encode(str string) string

获取md5

func PrintObj

func PrintObj(obj interface{})

func RandKey

func RandKey(ln int) string

func RandSMSCode

func RandSMSCode(ln int) string

func XRand

func XRand(max int, min int) int

Types

This section is empty.

Jump to

Keyboard shortcuts

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