Documentation
¶
Overview ¶
Package users contains the DB functions and all SQL queries involving scoring users. This package exports an init function (InitUsers) that is required for proper use. It requires the DB conneciton to have already been initialized.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitUsers ¶
InitUsers fills the users table in the database with default usernames and passwords. Users that have had passwords changed in a previous run of the API will be ignored. This keeps consistent state between restarts. This requires the config to be loaded.
func UpdateUser ¶
func UpdateUser( ctx context.Context, db *pgxpool.Pool, userListID types.UserListName, teamNum types.TeamNum, user types.User, ) error
UpdateUser performs a password change request. This performs no validation. Will cause an error if invalid input is given. This query can only update the password in an existing row.