Documentation ¶
Index ¶
- 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
- type Attachment
- type Category
- type Submission
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckPasswordHash ¶
func HashPassword ¶
func PutAttachment ¶
func PutSubmission ¶
func UpdateApplication ¶
func UpdateAttachment ¶
Types ¶
type Application ¶
type Application struct { ID int `json:"id"` Name string `json:"name"` CategoryID int `json:"category_id"` Updated time.Time `json:"updated"` Created time.Time `json:"created"` }
func GetApplication ¶
func GetApplication(db *sql.DB, id int) (*Application, error)
func GetApplications ¶
func GetApplications(db *sql.DB, category_id int) ([]Application, error)
type Attachment ¶
type Attachment struct { ID int `json:"id"` Filepath string `json:"filepath"` Screenshot bool `json:"screenshot"` SubmissionID int `json:"submission_id"` Updated time.Time `json:"updated"` Created time.Time `json:"created"` }
func GetAttachment ¶
func GetAttachment(db *sql.DB, id int) (*Attachment, error)
func GetAttachments ¶
func GetAttachments(db *sql.DB, submission_id int) ([]Attachment, error)
type Category ¶
type Submission ¶
type Submission struct { ID int `json:"id"` Name string `json:"name"` UserID int `json:"user_id"` ApplicationID int `json:"application_id"` Updated time.Time `json:"updated"` Created time.Time `json:"created"` }
func GetSubmission ¶
func GetSubmission(db *sql.DB, id int) (*Submission, error)
func GetSubmissions ¶
Click to show internal directories.
Click to hide internal directories.