Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type User ¶
type User struct { gorm.Model FullName string DisplayName string Username string Password []byte LastLogin time.Time }
User contains data for a user of the game
func AddNewUser ¶
AddNewUser creates a new user and inserts it into the DB
func FindUserByUsername ¶
FindUserByUsername finds the user based on the username
func (*User) HashAndSalt ¶
HashAndSalt converts password to hashed value
func (User) Insert ¶
Insert inserts the record into the db This does not check to see if the records already exists; it assumes it does not.
func (User) Save ¶
Save will insert or update the record, based on whether it has a primary key or not
func (User) VerifyPassword ¶
VerifyPassword will validate the given password
Click to show internal directories.
Click to hide internal directories.