Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPasswordHash ¶
CheckPassword hash compares raw password with it's hashed values
func GetUserIdByUsername ¶
GetUserIdByUsername check if a user exists in database by given username
func HashPassword ¶
HashPassword hashes given password
Types ¶
type User ¶
type User struct { ID string `json:"id"` Username string `json:"name"` Password string `json:"password"` }
func GetUsernameById ¶
GetUserByID check if a user exists in database and return the user object.
func (*User) Authenticate ¶
Click to show internal directories.
Click to hide internal directories.