command

package
v0.0.0-...-0202b1c Latest Latest
Warning

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

Go to latest
Published: May 25, 2023 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidAmountOfArgs = errors.New("invalid amount of args")
	ErrInvalidArg          = errors.New("invalid argument")
	ErrCouldNotFindTask    = errors.New("could not find task")
	ErrUnknownFolder       = errors.New("unknown folder")
	ErrFieldAlreadyUsed    = errors.New("field was already used")
	ErrInvalidDate         = errors.New("could not understand date format")
	ErrInvalidProject      = errors.New("could not understand project")
	ErrInvalidRecur        = errors.New("could not understand recurrer")
)

Functions

func ParseTaskFieldArgs

func ParseTaskFieldArgs(args []string) (*task.LocalUpdate, error)

Types

type Command

type Command interface {
	Do() string
}

func Parse

func Parse(args []string, conf *configuration.Configuration) (Command, error)

type Done

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

Done updates a task to be marked done

func NewDone

func NewDone(localId int, conf *configuration.Configuration) (*Done, error)

func (*Done) Do

func (d *Done) Do() string

type Empty

type Empty struct{}

func NewEmpty

func NewEmpty() (*Empty, error)

func (*Empty) Do

func (cmd *Empty) Do() string

type Fetch

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

func NewFetch

func NewFetch(conf *configuration.Configuration) (*Fetch, error)

func (*Fetch) Do

func (s *Fetch) Do() string

type Folder

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

func NewFolder

func NewFolder(conf *configuration.Configuration, cmdArgs []string) (*Folder, error)

func (*Folder) Do

func (f *Folder) Do() string

type Inbox

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

func NewInbox

func NewInbox(conf *configuration.Configuration) (*Inbox, error)

func (*Inbox) Do

func (i *Inbox) Do() string

type New

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

New sends an action to the NEW folder so it can be updated to a real task later

func NewNew

func NewNew(conf *configuration.Configuration, cmdArgs []string) (*New, error)

func (*New) Do

func (n *New) Do() string

type Project

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

func NewProject

func NewProject(conf *configuration.Configuration, cmdArgs []string) (*Project, error)

func (*Project) Do

func (p *Project) Do() string

type Projects

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

func NewProjects

func NewProjects(conf *configuration.Configuration) (*Projects, error)

func (*Projects) Do

func (p *Projects) Do() string

type Recur

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

func NewRecur

func NewRecur(conf *configuration.Configuration, cmdArgs []string) (*Recur, error)

func (*Recur) Do

func (r *Recur) Do() string

type Send

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

func NewSend

func NewSend(conf *configuration.Configuration) (*Send, error)

func (*Send) Do

func (s *Send) Do() string

type Show

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

func NewShow

func NewShow(id int, conf *configuration.Configuration) (*Show, error)

func (*Show) Do

func (s *Show) Do() string

type Sync

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

func NewSync

func NewSync(conf *configuration.Configuration) (*Sync, error)

func (*Sync) Do

func (s *Sync) Do() string

type Today

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

Today lists all task that are due today or past their due date

func NewToday

func NewToday(conf *configuration.Configuration) (*Today, error)

func (*Today) Do

func (t *Today) Do() string

type Tomorrow

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

Tomorrow lists all tasks that are due tomorrow

func NewTomorrow

func NewTomorrow(conf *configuration.Configuration) (*Tomorrow, error)

func (*Tomorrow) Do

func (t *Tomorrow) Do() string

type Update

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

func NewUpdate

func NewUpdate(localId int, conf *configuration.Configuration, cmdArgs []string) (*Update, error)

func (*Update) Do

func (u *Update) Do() string

type Week

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

func NewWeek

func NewWeek(conf *configuration.Configuration) (*Week, error)

func (*Week) Do

func (w *Week) Do() string

Jump to

Keyboard shortcuts

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