ginutils

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cors

func Cors(params ...interface{}) gin.HandlerFunc

Cors 处理跨域请求,支持options访问

func GetChildDomain

func GetChildDomain(host string) string

GetChildDomain 获取子域名部分

func GetJWTToken

func GetJWTToken(tokenString, tokenKey string) (t *jwt.Token, e error)

func GetJWTTokenString

func GetJWTTokenString(info map[string]interface{}, key string, exp time.Duration) (string, error)

info 存储的信息 key 加密的key exp 有效期 GetJWTTokenString 获取Token字符串

Types

This section is empty.

Jump to

Keyboard shortcuts

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