model

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PassWordCost = 12 // 密码加密难度
)

Variables

This section is empty.

Functions

This section is empty.

Types

type User

type User struct {
	gorm.Model
	UserName       string `gorm:"unique"`
	PasswordDigest string
}

func (*User) CheckPassword

func (user *User) CheckPassword(password string) bool

检验密码

func (*User) SetPassword

func (user *User) SetPassword(password string) error

加密密码

Jump to

Keyboard shortcuts

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