web

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package web token

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateToken

func CreateToken(user *UserInfo) (tokens string, err error)

CreateToken 创建token

Types

type UserInfo

type UserInfo struct {
	Id       int64  `json:"id"`
	UserName string `json:"user_name"`
	UserType int64  `json:"user_type"`
	RegionId int64  `json:"region_id"`
}

func ParseToken

func ParseToken(tokens string) (user *UserInfo, err error)

ParseToken 获取token中的结构体

Directories

Path Synopsis
Package beego_utils beego 获取参数
Package beego_utils beego 获取参数
Package gin_utils Gin request 请求参数
Package gin_utils Gin request 请求参数
Package iris_utils iris response Subpackage
Package iris_utils iris response Subpackage

Jump to

Keyboard shortcuts

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