package
0.0.0-20170326034853-d9da739f0ff5
Repository: https://github.com/thewhitetulip/tasks-vue.git
Documentation: pkg.go.dev

# Functions

AddCategory is used to add the task in the database.
AddComments will be used to add comments in the database and return the added comment's ID and created date along with the error if there is any.
AddFile is used to add the md5 of a file name which is uploaded to our application this will enable us to randomize the URL without worrying about the file names.
AddTask is used to add the task in the databaseTODO: add dueDate feature later.
Close function closes this database connection.
CompleteTask is used to mark tasks as complete.
CreateUser will create a new user, take as input the parameters andinsert it into database.
DeleteAll is used to empty the trash.
DeleteCategoryByName will be used to delete a category from the category page.
DeleteCommentByID will actually delete the comment from db.
DeleteTask is used to delete the task from the database.
GetCategories will return the list of categories to berendered in the template.
GetCategoryByName will return the ID of that category passed as args used while inserting tasks into the table.
GetCategoryIDByName will return the category ID for the category, used in the edit taskfunction where we need to be able to update the categoryID of the task.
GetComments is used to get comments, all of them.We do not want 100 different pages to show tasks, we want to use as few pages as possibleso we are going to populate everything on the damn home pages.
GetFileName is used to fetch the name according to the md5 checksum from the db.
GetTaskByID function gets the tasks from the ID passed to the function, used to populate EditTask.
GetTasks retrieves all the tasks depending on thestatus pending or trashed or completed.
GetUserID will get the user's ID from the database.
RestoreTask is used to restore tasks from the Trash.
RestoreTaskFromComplete is used to restore tasks from the Trash.
SearchTask is used to return the search results depending on the query.
TrashTask is used to delete the task.
UpdateCategoryByName will be used to delete a category from the category page.
UpdateTask is used to update the tasks in the database.
ValidUser will check if the user exists in db and if exists if the username passwordcombination is valid.

# Structs

Database encapsulates database.