mysql

package
v0.2.11 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const TableName = "access_token"

TODO(从配置里面读取)

Variables

This section is empty.

Functions

func InitTokenAccessor added in v0.2.10

func InitTokenAccessor(logger *logger.Client, db *gorm.DB) standard.TokenAccessor

Types

type AccessToken

type AccessToken struct {
	Jti        int    `gorm:"not null" json:"jti" form:"jti" gorm:"primary_key"`
	Sub        int    `gorm:"not null" json:"sub" form:"sub"`
	IaTime     int64  `gorm:"not null" json:"ia_time" form:"ia_time"`
	ExpTime    int64  `gorm:"not null;" json:"exp_time" form:"exp_time"`
	Ip         string `gorm:"not null" json:"ip" form:"ip"`
	CreateTime int64  `gorm:"not null" json:"create_time" form:"create_time"`
	IsLogout   int    `gorm:"not null;" json:"is_logout" form:"is_logout"`
	IsInvalid  int    `gorm:"not null;" json:"is_invalid" form:"is_invalid"`
	LogoutTime int64  `gorm:"not null" json:"logout_time" form:"logout_time"`
}

func (AccessToken) TableName

func (AccessToken) TableName() string

Jump to

Keyboard shortcuts

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