model

package
v1.0.1-0...-a3844e9 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminLevel

type AdminLevel int64
const (
	Admin          AdminLevel = 1 + iota // 管理员
	SuperModerator                       // 超级版主
	Moderator                            // 版主
)

func (AdminLevel) IsAdmin

func (a AdminLevel) IsAdmin(level AdminLevel) bool

type AuthInfo

type AuthInfo struct {
	UID           int64
	Username      string
	Email         string
	EmailVerified bool
	AdminLevel    AdminLevel
	Expiretime    time.Time
}

type LoginToken

type LoginToken struct {
	ID         string `json:"id"` // 登录id
	UID        int64  `json:"uid"`
	Token      string `json:"token"`
	LastToken  string `json:"last_token"` // 上一次的token
	Createtime int64  `json:"createtime"`
	Updatetime int64  `json:"updatetime"`
}

func (*LoginToken) Expired

func (l *LoginToken) Expired(t int64) bool

Expired 是否过期

Directories

Path Synopsis
user_entity/mock
Package mock_user_entity is a generated GoMock package.
Package mock_user_entity is a generated GoMock package.

Jump to

Keyboard shortcuts

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