Documentation
¶
Index ¶
- Variables
- type AddTag
- type AddTodo
- type Clear
- type Command
- func Fabricate(todoList *model.TodoList, view view.View, flagArgs []string, ...) (Command, error)
- func NewAddTag(todoList *model.TodoList, view view.View, payload string) (Command, error)
- func NewAddTodo(todoList *model.TodoList, view view.View, payload string) (Command, error)
- func NewClear(todoList *model.TodoList, view view.View, _ string) (Command, error)
- func NewDeleteTodo(todoList *model.TodoList, view view.View, payload string) (Command, error)
- func NewEditTodo(todoList *model.TodoList, view view.View, payload string) (Command, error)
- func NewListTags(todoList *model.TodoList, view view.View, _ string) (Command, error)
- func NewListTagsOnTodo(todoList *model.TodoList, view view.View, payload string) (Command, error)
- func NewListTodos(todoList *model.TodoList, view view.View, _ string) (Command, error)
- func NewListTodosForTag(todoList *model.TodoList, view view.View, payload string) (Command, error)
- func NewPrintVersion(view view.View, version string) (Command, error)
- func NewRemoveTag(todoList *model.TodoList, view view.View, payload string) (Command, error)
- func NewRemoveTagFromTodo(todoList *model.TodoList, view view.View, payload string) (Command, error)
- func NewSwap(todoList *model.TodoList, view view.View, payload string) (Command, error)
- func NewTagTodo(todoList *model.TodoList, view view.View, payload string) (Command, error)
- func NewToggleTodo(todoList *model.TodoList, view view.View, payload string) (Command, error)
- type DeleteTodo
- type EditTodo
- type ListTags
- type ListTagsOnTodo
- type ListTodos
- type ListTodosForTag
- type PrintVersion
- type RemoveTag
- type RemoveTagFromTodo
- type Swap
- type TagTodo
- type ToggleTodo
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidId = "%s is an invalid id" ErrNoTodoWithId = "there is no todo with id %d" ErrNoTagWithId = "there is no tag with id %d" ErrEmptyTodoNotAllowed = errors.New("empty todo is not allowed") ErrTagAlreadyExists = "the tag %s already exists" ErrTodoDoesNotHaveTag = "the todo %d does not have tag with id %d" ErrTodoAlreadyHasTag = "the todo %d already has the tag with id %d" ErrTodoHasNoTags = errors.New("the todo has no tags") ErrCommandNotFound = errors.New("the command could not be found") )
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command interface {
Execute()
}
func Fabricate ¶ added in v1.4.1
func Fabricate(todoList *model.TodoList, view view.View, flagArgs []string, list *flag.FlagSet, add *flag.FlagSet, doDelete *flag.FlagSet, toggle *flag.FlagSet, edit *flag.FlagSet, doClear *flag.FlagSet, swap *flag.FlagSet, tags *flag.FlagSet, showTagsOnTodo *int, showTodosForTag *int, tag *flag.FlagSet, tagRm *bool, tagAdd *bool, versionFlag *flag.FlagSet, version string) (Command, error)
func NewAddTodo ¶ added in v0.10.0
func NewDeleteTodo ¶ added in v0.10.0
func NewEditTodo ¶ added in v0.10.0
func NewListTags ¶ added in v1.4.1
func NewListTagsOnTodo ¶ added in v1.4.1
func NewListTodos ¶ added in v1.2.0
func NewListTodosForTag ¶ added in v1.4.1
func NewPrintVersion ¶ added in v1.4.3
func NewRemoveTag ¶ added in v1.4.1
func NewRemoveTagFromTodo ¶ added in v1.4.1
func NewTagTodo ¶ added in v1.4.1
type DeleteTodo ¶
type DeleteTodo struct {
// contains filtered or unexported fields
}
func (*DeleteTodo) Execute ¶
func (cmd *DeleteTodo) Execute()
type ListTagsOnTodo ¶ added in v1.4.1
type ListTagsOnTodo struct {
// contains filtered or unexported fields
}
func (*ListTagsOnTodo) Execute ¶ added in v1.4.1
func (cmd *ListTagsOnTodo) Execute()
type ListTodos ¶ added in v1.2.0
type ListTodos struct {
// contains filtered or unexported fields
}
type ListTodosForTag ¶ added in v1.4.1
type ListTodosForTag struct {
// contains filtered or unexported fields
}
func (*ListTodosForTag) Execute ¶ added in v1.4.1
func (cmd *ListTodosForTag) Execute()
type PrintVersion ¶ added in v1.4.3
type PrintVersion struct {
// contains filtered or unexported fields
}
func (*PrintVersion) Execute ¶ added in v1.4.3
func (cmd *PrintVersion) Execute()
type RemoveTag ¶ added in v1.4.1
type RemoveTag struct {
// contains filtered or unexported fields
}
type RemoveTagFromTodo ¶ added in v1.4.1
type RemoveTagFromTodo struct {
// contains filtered or unexported fields
}
func (*RemoveTagFromTodo) Execute ¶ added in v1.4.1
func (cmd *RemoveTagFromTodo) Execute()
type ToggleTodo ¶
type ToggleTodo struct {
// contains filtered or unexported fields
}
func (*ToggleTodo) Execute ¶
func (cmd *ToggleTodo) Execute()
Click to show internal directories.
Click to hide internal directories.