public

package
v0.0.0-...-5357738 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ValidatorKey         = "ValidatorKey"
	TranslatorKey        = "TranslatorKey"
	HistoryStatusAll     = "all"
	HistoryStatusSuccess = "success"
	HistoryStatusFail    = "fail"
	LargePageSize        = 99999
)
View Source
const (
	PublicKey = `` /* 450-byte string literal not displayed */

	PrivateKey = `` /* 1703-byte string literal not displayed */

)

加解密相关

Variables

View Source
var (
	TaskSyncJob    = 1
	DateNumInfoJob = 2
)
View Source
var JWTToken jwtToken

Functions

func CreateDir

func CreateDir(path string)

CreateDir 创建文件夹

func Cronexpr

func Cronexpr(exprstr string) (string, error)

func DateTran

func DateTran(date string) string

DateTran 将带年的日期转为月份

func DefaultGetValidParams

func DefaultGetValidParams(c *gin.Context, params interface{}) error

func GenSaltPassword

func GenSaltPassword(salt, password string) string

func GetBeforeDates

func GetBeforeDates(day int) []string

GetBeforeDates 生成日期

func GetFileSize

func GetFileSize(fileanme string) int

func GetTranslation

func GetTranslation(c *gin.Context) (ut.Translator, error)

func GetValidator

func GetValidator(c *gin.Context) (*validator.Validate, error)

func HasDir

func HasDir(path string) (bool, error)

func IntToBool

func IntToBool(a int) bool
func PrintLogo()

func RsaDecode

func RsaDecode(strPlainText string) (string, error)

func RsaEncode

func RsaEncode(plain string) (string, error)

func StatusConversion

func StatusConversion(a int) string

func StringToTime

func StringToTime(receiveTime string) time.Time

Types

type CustomClaims

type CustomClaims struct {
	Uid int
	jwt.StandardClaims
}

CustomClaims 自定义token中携带的信息

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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