Documentation ¶
Index ¶
Constants ¶
View Source
const ( PasswordBlank = "password is blank" EmailBlank = "email is blank" EmailInvalid = "email format is invalid" EmailExists = "email already exists" EmailNotFound = "email does not exist" EmailPasswordInvalid = "email and/or password is invalid" TokenNotFound = "token does not exist" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type User ¶
type User struct { Id int `json:"id"` Email string `json:"email"` Password string `json:"password,omitempty"` Token string `json:"token,omitempty"` }
func (*User) Authenticate ¶
func (*User) EncryptPassword ¶
func (*User) GenerateToken ¶
func (u *User) GenerateToken()
type UserRepo ¶
type UserRepo struct {
// contains filtered or unexported fields
}
func (*UserRepo) FetchByEmail ¶
Click to show internal directories.
Click to hide internal directories.