task

package
v0.0.0-...-3c1ba6e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(t Task)

Types

type FileStore

type FileStore struct {
	// contains filtered or unexported fields
}

func (*FileStore) Add

func (fs *FileStore) Add(t Task) error

func (*FileStore) ReadAll

func (fs *FileStore) ReadAll() ([]Task, error)

type Store

type Store interface {
	Add(t Task) error
	ReadAll() ([]Task, error)
}

type Task

type Task struct {
	Name        string    `json:"name"`
	IsUrgent    bool      `json:"isUrgent"`
	IsImportant bool      `json:"isImportant"`
	Deadline    time.Time `json:"deadline"`
}

func FilterImportant

func FilterImportant(tasks []Task) []Task

func FilterNotImportant

func FilterNotImportant(tasks []Task) []Task

func FilterNotUrgent

func FilterNotUrgent(tasks []Task) []Task

func FilterUrgent

func FilterUrgent(tasks []Task) []Task

func List

func List() []Task

func (*Task) IsOverdue

func (t *Task) IsOverdue() bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL