- **Today:** Display tasks of today and overdue - **Tomorrow:** Tasks scheduled for tomorrow - **Upcoming:** Tasks scheduled for next 7 days - Keep "Today" focused on starting - Order Tasks of dynamic list by Project - Parsing date input using local TZ - Fixes #7
22 lines
690 B
Go
22 lines
690 B
Go
package repository
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/ajaxray/geek-life/model"
|
|
)
|
|
|
|
// TaskRepository interface defines methods of task data accessor
|
|
type TaskRepository interface {
|
|
GetAll() ([]model.Task, error)
|
|
GetAllByProject(project model.Project) ([]model.Task, error)
|
|
GetAllByDate(date time.Time) ([]model.Task, error)
|
|
GetAllByDateRange(from, to time.Time) ([]model.Task, error)
|
|
GetByID(ID string) (model.Task, error)
|
|
GetByUUID(UUID string) (model.Task, error)
|
|
Create(project model.Project, title, details, UUID string, dueDate int64) (model.Task, error)
|
|
Update(t *model.Task) error
|
|
UpdateField(t *model.Task, field string, value interface{}) error
|
|
Delete(t *model.Task) error
|
|
}
|