common

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var JwtKey []byte

Functions

func GenerateToken

func GenerateToken(appSecret string, user *JwtUser) (string, error)

Types

type Admin

type Admin string
const (
	AdminKey    Admin = "adminKey"
	AdminSecret Admin = "adminSecret"
)

type JwtUser

type JwtUser struct {
	Id          uint64 //用户id
	OrgId       int64  //登录的机构id
	UserAccount string //用户账户
	UserName    string //用户名称
	UserMobile  string //用户手机号
	UserCode    string //用户唯一编码
}

func ParseToken

func ParseToken(appSecret Admin, token string) (*JwtUser, error)

Jump to

Keyboard shortcuts

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