Versions in this module Expand all Collapse all v0 v0.0.1 Sep 16, 2022 Changes in this version + func CheckPasswordHash(password, hash string) bool + func DeleteApplication(db *sql.DB, id int) (int64, error) + func DeleteAttachment(db *sql.DB, id int) (int64, error) + func DeleteCategory(db *sql.DB, id int) (int64, error) + func DeleteSubmission(db *sql.DB, id int) (int64, error) + func DeleteUser(db *sql.DB, id int) (int64, error) + func HashPassword(password string) (string, error) + func PutApplication(db *sql.DB, name string, category_id int) (int64, error) + func PutAttachment(db *sql.DB, filepath string, screenshot bool, submission_id int) (int64, error) + func PutCategory(db *sql.DB, name string) (int64, error) + func PutSubmission(db *sql.DB, name string, user_id int, application_id int) (int64, error) + func PutUser(db *sql.DB, name string, email string, password string) (int64, error) + func UpdateApplication(db *sql.DB, id int, name string, category_id int) (int64, error) + func UpdateAttachment(db *sql.DB, id int, filepath string, screenshot bool) (int64, error) + func UpdateCategory(db *sql.DB, id int, name string) (int64, error) + func UpdateSubmission(db *sql.DB, id int, name string) (int64, error) + func UpdateUser(db *sql.DB, id int, name string, email string) (int64, error) + type Application struct + CategoryID int + Created time.Time + ID int + Name string + Updated time.Time + func GetApplication(db *sql.DB, id int) (*Application, error) + func GetApplications(db *sql.DB, category_id int) ([]Application, error) + type Attachment struct + Created time.Time + Filepath string + ID int + Screenshot bool + SubmissionID int + Updated time.Time + func GetAttachment(db *sql.DB, id int) (*Attachment, error) + func GetAttachments(db *sql.DB, submission_id int) ([]Attachment, error) + type Category struct + Created time.Time + ID int + Name string + func GetCategories(db *sql.DB) ([]Category, error) + func GetCategory(db *sql.DB, id int) (*Category, error) + type Submission struct + ApplicationID int + Created time.Time + ID int + Name string + Updated time.Time + UserID int + func GetSubmission(db *sql.DB, id int) (*Submission, error) + func GetSubmissions(db *sql.DB, application_id int, user_id int) ([]Submission, error) + type User struct + Email string + ID int + IsAdmin bool + Joined time.Time + LastSeen time.Time + Name string + Password string + func Authenticate(db *sql.DB, username string, password string) (*User, error) + func GetUser(db *sql.DB, id int) (*User, error) + func GetUsers(db *sql.DB) ([]User, error)