Documentation
¶
Index ¶
- Variables
- func Run(manager *Manager) error
- type Manager
- func (m *Manager) Add(description string, priority Priority, noteID string, dueDate time.Time) *Task
- func (m *Manager) Delete(id int) error
- func (m *Manager) Done(id int) error
- func (m *Manager) Get(id int) (*Task, error)
- func (m *Manager) List(showDone bool) []*Task
- func (m *Manager) ListByDueDate(showDone bool) []*Task
- func (m *Manager) ListByNote(noteID string) []*Task
- func (m *Manager) SetDueDate(id int, dueDate time.Time) error
- func (m *Manager) SetNoteID(id int, noteID string) error
- func (m *Manager) SortByDueDate(tasks []*Task) []*Task
- func (m *Manager) Toggle(id int) error
- func (m *Manager) UnlinkNote(id int) error
- type Model
- type Priority
- type Status
- type Task
Constants ¶
This section is empty.
Variables ¶
View Source
var PriorityCycle = []Priority{PriorityHigh, PriorityMedium, PriorityLow}
PriorityCycle is the order of priority cycling in TUI.
Functions ¶
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func (*Manager) ListByDueDate ¶ added in v0.4.0
func (*Manager) ListByNote ¶
func (*Manager) SetDueDate ¶ added in v0.4.0
func (*Manager) SortByDueDate ¶ added in v0.5.0
func (*Manager) UnlinkNote ¶
type Priority ¶
type Priority int
func CyclePriority ¶ added in v0.4.0
CyclePriority cycles through priorities in order or reverse.
func ParsePriority ¶ added in v0.5.0
ParsePriority parses a string into a Priority value.
type Task ¶
type Task struct {
ID int `yaml:"id"`
Description string `yaml:"description"`
Priority Priority `yaml:"priority"`
Status Status `yaml:"status"`
NoteID string `yaml:"note_id,omitempty"`
DueDate time.Time `yaml:"due_date,omitempty"`
Created time.Time `yaml:"created"`
Completed time.Time `yaml:"completed,omitempty"`
}
func (*Task) HasDueDate ¶ added in v0.4.0
func (*Task) SetDueDate ¶ added in v0.4.0
Click to show internal directories.
Click to hide internal directories.