Documentation ¶
Index ¶
- func CreateTask(w http.ResponseWriter, r *http.Request, t *TaskHandlerInput, db *sql.DB)
- func DeleteTask(w http.ResponseWriter, r *http.Request, t *TaskHandlerInput, db *sql.DB)
- func GetAllTasks(w http.ResponseWriter, r *http.Request, db *sql.DB)
- func GetAllTodoTasks(w http.ResponseWriter, r *http.Request, db *sql.DB)
- func GetByTitle(w http.ResponseWriter, r *http.Request, db *sql.DB, title string)
- func GetByTodayTasks(w http.ResponseWriter, r *http.Request, db *sql.DB)
- func GetOverdueTasks(w http.ResponseWriter, r *http.Request, db *sql.DB)
- func UpdateTask(w http.ResponseWriter, r *http.Request, t *TaskHandlerInput, db *sql.DB)
- func ValidateTaskEntry(t *TaskHandlerInput) (bool, map[string]string)
- type TaskHandlerInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTask ¶
func CreateTask(w http.ResponseWriter, r *http.Request, t *TaskHandlerInput, db *sql.DB)
CreateTask function performs updation task on the task list
func DeleteTask ¶
func DeleteTask(w http.ResponseWriter, r *http.Request, t *TaskHandlerInput, db *sql.DB)
DeleteTask function performs updation task on the task list
func GetAllTasks ¶
GetAllTasks function gets all tasks from the task list db
func GetAllTodoTasks ¶
GetAllTodoTasks function gets all tasks from the task list db which are not completed
func GetByTitle ¶
GetByTitle provides the searched task from the db with matching title
func GetByTodayTasks ¶
GetByTodayTasks function gets all tasks from the task list db which are due by taday's date
func GetOverdueTasks ¶
GetOverdueTasks function gets all tasks from the task list db which are overdue
func UpdateTask ¶
func UpdateTask(w http.ResponseWriter, r *http.Request, t *TaskHandlerInput, db *sql.DB)
UpdateTask function performs updation task on the task list
func ValidateTaskEntry ¶
func ValidateTaskEntry(t *TaskHandlerInput) (bool, map[string]string)
ValidateTaskEntry function validates the input before they are processed into the database
Types ¶
type TaskHandlerInput ¶
type TaskHandlerInput struct { TaskTitle string `json:"taskTitle" bson:"taskTitle"` DueDate string `json:"dueDate" bson:"dueDate"` TaskDone bool `json:"taskDone" bson:"taskDone"` }
TaskHandlerInput defines the input json structure for dml endpoints