package
0.0.0-20200607091842-2d493691ea77
Repository: https://github.com/dictuantran/tasks.git
Documentation: pkg.go.dev

# Functions

AddCategory is used to add the task in the database.
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.
DeleteCategoryByName will be used to delete a category from the category page.
DeleteCommentByID will actually delete the comment from db.
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.
GetTasks retrieves all the tasks depending on thestatus pending or trashed or completed.
GetUserID will get the user's ID from the database.
SearchTask is used to return the search results depending on the query.
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.