Documentation ¶ Index ¶ func Cors(params ...interface{}) gin.HandlerFunc func GetChildDomain(host string) string func GetJWTToken(tokenString, tokenKey string) (t *jwt.Token, e error) func GetJWTTokenString(info map[string]interface{}, key string, exp time.Duration) (string, error) 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. Source Files ¶ View all Source files utils.go Click to show internal directories. Click to hide internal directories.