Documentation ¶
Index ¶
- Constants
- func DeleteAccount(userId uint, password string) error
- func GetSessionUser(cookieId string) (*db.User, error)
- func IsBadUsernamePasswordError(err error) bool
- func IsLoggedIn(cookieId string) bool
- func Login(cookieId string, username string, password string) error
- func Logout(cookieId string) error
- func Signup(cookieId string, username string, password string) error
- func UpdatePassword(userId uint, oldPassword string, newPassword string) error
- func UserAlreadyExists(err error) bool
Constants ¶
View Source
const ( MsgUsernameNotFound = "username not found" MsgPasswordMismatch = "password hash mismatch" )
View Source
const ( MsgErrorCreatingUser = "error creating user" MsgErrorGettingSession = "error getting session" MsgErrorSavingSession = "error saving session" )
Variables ¶
This section is empty.
Functions ¶
func DeleteAccount ¶
func IsLoggedIn ¶
func UpdatePassword ¶
func UserAlreadyExists ¶
Reasonable assumption here but error creating user might not mean already exists in edge cases.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.