Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPasswordHash ¶
CheckPasswordHash checks password hash and password from user input if they match
func GetAllUsers ¶
GetAllUsers returns a list of all the user
func HashPassword ¶
HashPassword hashes password from user input
Types ¶
type Task ¶
type Task struct { gorm.Model Name string `gorm:"size:100;not null" json:"name"` Completed bool `gorm:"not null" json:"completed"` }
Task structure with id, name, and completion status
func (*Task) UpdateTask ¶
TODO: change to toggle task completion status
type User ¶
type User struct { gorm.Model Email string `gorm:"type:varchar(100);unique_index" json:"email"` FirstName string `gorm:"size:100;not null" json:"firstname"` LastName string `gorm:"size:100;not null" json:"lastname"` Password string `gorm:"size:100;not null" json:"password"` }
User model
Click to show internal directories.
Click to hide internal directories.