common

package
v0.0.0-...-ea71f84 Latest Latest
Warning

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

Go to latest
Published: May 3, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DB *gorm.DB

Functions

func GetDB

func GetDB() *gorm.DB

func GetToken

func GetToken(user model.User) (string, error)

func InitDB

func InitDB()

Types

type Claims

type Claims struct {
	UserId uint
	jwt.StandardClaims
}

func ParseToken

func ParseToken(tokenString string) (*jwt.Token, *Claims, error)

ParseToken parse the token

Jump to

Keyboard shortcuts

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