Documentation
¶
Index ¶
- type Task
- type Tasks
- func (t *Tasks) Add(description, tag string, remind string) Task
- func (t Tasks) CompletedTask() int
- func (t *Tasks) FlushDB() error
- func (t Tasks) GetAllTasks() Tasks
- func (t Tasks) GetCompletedTasks() Tasks
- func (t Tasks) GetLastId() int
- func (t Tasks) GetNextId() int
- func (t Tasks) GetPendingTasks() Tasks
- func (t Tasks) GetReminderTasks() Tasks
- func (t Tasks) GetTask(id int) (Task, error)
- func (t Tasks) Len() int
- func (t Tasks) Less(i, j int) bool
- func (t *Tasks) MarkAsCompleteTask(id int) (Task, error)
- func (t *Tasks) MarkAsPendingTask(id int) (Task, error)
- func (t Tasks) PendingTask() int
- func (t *Tasks) RemoveTask(id int) error
- func (t Tasks) Swap(i, j int)
- func (t Tasks) TotalTask() int
- func (t *Tasks) UpdateTask(id int, description string) (string, error)
- func (t *Tasks) UpdateTaskTag(id int, tag string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Task ¶
type Task struct { Id int `json:"id"` UID string `json:"uid"` Description string `json:"description"` Tag string `json:"tag"` Created string `json:"created"` Updated string `json:"updated"` RemindAt string `json:"remind_at"` Completed string `json:"completed"` }
Task describes a task object
type Tasks ¶
type Tasks []Task
Tasks represents a list of Task object
func (Tasks) CompletedTask ¶
CompletedTask return total completed task count
func (Tasks) GetCompletedTasks ¶
GetCompletedTasks fetch all completed tasks
func (Tasks) GetPendingTasks ¶
GetPendingTasks fetch all pending tasks
func (Tasks) GetReminderTasks ¶
GetReminderTasks fetch all the reminder tasks
func (*Tasks) MarkAsCompleteTask ¶
MarkAsCompleteTask mark a task as completed by id
func (*Tasks) MarkAsPendingTask ¶
MarkAsPendingTask mark a task as pending by id
func (Tasks) PendingTask ¶
PendingTask return total pending task count
func (*Tasks) UpdateTask ¶
UpdateTask update a task by id
Click to show internal directories.
Click to hide internal directories.