Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type User ¶
type User struct { ID int `json:"id"` Email string `json:"email" ` Password string `json:"password" ` Salt []byte `json:"salt"` Name string `json:"name"` Role string `json:"role"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` OwnedFiles []learningmodels.LearningFiles `json:"ownedFiles"` LearningGoals []learningmodels.LearningGoals `json:"learningGoals"` }
func (*User) CheckPassword ¶
CheckPassword takes a string as a parameter and compares it to the user's encrypted password
func (*User) HashPassword ¶
HashPassword takes a string as a parameter and encrypts it using argon2
Click to show internal directories.
Click to hide internal directories.