model

package
v0.0.0-...-f6272d2 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type User

type User struct {
	Email              string   `json:"email" bson:"email"`
	EmailBackup        []string `json:"-" bson:"emailBackup"`
	ID                 string   `json:"id" bson:"_id"`
	Name               string   `json:"name" bson:"name"`
	Password           string   `json:"password" bson:"password"`
	ResetPasswordToken string   `json:"resetPasswordToken" bson:"resetPasswordToken"`
	Token              string   `json:"token" bson:"-"`
	VerifyToken        string   `json:"verifyToken" bson:"verifyToken"`
}

User is the structure of a user

func (*User) HashPassword

func (u *User) HashPassword() error

HashPassword hashed the password of the user

func (*User) MatchPassword

func (u *User) MatchPassword(password string) bool

MatchPassword returns true if the hashed user password matches the password

Jump to

Keyboard shortcuts

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