task

package
v0.0.0-...-6d4f6be Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2016 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Home is the directory for storing task files and settings.
	// Home can be overriden with YAP_HOME environment variable.
	Home = "~/.yap"
)

Functions

func Add

func Add(title string, dueDate, waitDate *datetime.DateTime) (id uint16, err error)

Add new task in pending state.

func Complete

func Complete(ids []uint16) error

Complete pending task.

func Continue

func Continue(ids []uint16) error

Continue completed task.

func FormatID

func FormatID(i uint16) string

func ParseID

func ParseID(s string) (uint16, error)

Types

type Task

type Task struct {
	ID          uint16
	UUID        uuid.UUID
	Title       string             `key:"title"`
	CreatedAt   time.Time          `key:"created_at"`
	CompletedAt *time.Time         `key:"completed_at"`
	DueDate     *datetime.DateTime `key:"due_date"`
	WaitDate    *datetime.DateTime `key:"wait_date"`
}

Task is a file stored in tasks dir.

func ListCompleted

func ListCompleted() ([]Task, error)

ListCompleted returns all completed tasks.

func ListPending

func ListPending() ([]Task, error)

ListPending returns all pending tasks.

func ListWaiting

func ListWaiting() ([]Task, error)

ListWaiting returns all waiting tasks.

Jump to

Keyboard shortcuts

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