utils

package
v0.0.0-...-1b2adb6 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncryptPassword

func EncryptPassword(password string) string

func GenJWT

func GenJWT(secretKey string, exp int64, opt ...JWTOption) (string, error)

GenJWT 生成JWT

Types

type JWTOption

type JWTOption struct {
	Key string
	Val any
}

JWTOption describes the jwt extra data

func WithJWTOption

func WithJWTOption(key string, val any) JWTOption

WithJWTOption returns the option from k/v

Jump to

Keyboard shortcuts

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