mysql

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const TableName = "access_token"

TODO(从配置里面读取)

Variables

This section is empty.

Functions

func Register

func Register() common.Caller

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;comment:'过期时间'" 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;comment:'是否主动退出'" json:"is_logout" form:"is_logout"`
	IsInvalid  int    `` /* 127-byte string literal not displayed */
	LogoutTime int64  `gorm:"not null" json:"logout_time" form:"logout_time"`
}

func (AccessToken) TableName

func (AccessToken) TableName() string

type CallerCfg

type CallerCfg struct {
	// contains filtered or unexported fields
}

type Cfg

type Cfg struct {
	Muses struct {
		Token struct {
			JWT struct {
				CallerCfg `toml:"mysql"`
			} `toml:"jwt"`
		} `toml:"token"`
	} `toml:"muses"`
}

Jump to

Keyboard shortcuts

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