model

package
v0.0.0-...-66c47ec Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: GPL-3.0 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
	Name     string
	Password string
}

func (*User) CheckPassword

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

CheckPassword 检验密码

func (*User) SetPassword

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

SetPassword 加密密码

Jump to

Keyboard shortcuts

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