Documentation ¶
Index ¶
- func AddSubmission(db *sql.DB, sub faapi.Submission, overwrite bool) (err error)
- func AddUser(db *sql.DB, username string) (err error)
- func FindUserValue(db *sql.DB, username string, column string, value string) (found bool, err error)
- func GetSubmission(db *sql.DB, id int) (sub faapi.Submission, err error)
- func GetUser(db *sql.DB, column string, username ...string) (data [][][]string, err error)
- func OpenDatabase(path string) (db *sql.DB, err error)
- func RemoveSubmission(db *sql.DB, id int) (err error)
- func UpdateInfo(db *sql.DB, field string, value string) (err error)
- func UpdateInfoTotals(db *sql.DB) (err error)
- func UpdateUserAdd(db *sql.DB, username string, column string, value string) (err error)
- func UserURL(usrIn string) (userOut string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddSubmission ¶
AddSubmission add submission to database
func FindUserValue ¶
func FindUserValue(db *sql.DB, username string, column string, value string) (found bool, err error)
FindUserValue finds a value in a user column
func GetSubmission ¶
GetSubmission returns a submission as a faapi.Submission struct (if found)
func OpenDatabase ¶
OpenDatabase opens the database in path, if present
func RemoveSubmission ¶
RemoveSubmission removes a submission given its ID
func UpdateInfo ¶
UpdateInfo updates a field in the INFOS table
func UpdateInfoTotals ¶
UpdateInfoTotals updates the totals in the INFOS tables: USRN, SUBN
func UpdateUserAdd ¶
UpdateUserAdd writes content to a user's column
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.