core

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTable

func NewTable() *tablewriter.Table

Types

type CreateTaskDto

type CreateTaskDto struct {
	Description string
	Scope       string
}

type Task

type Task struct {
	UUID        uuid.UUID
	Description string
	Scope       string
	IsDone      bool
	CreatedAt   time.Time
	CompletedAt time.Time
}

func NewTask

func NewTask(data CreateTaskDto) Task

func (*Task) Complete

func (t *Task) Complete()

func (*Task) Edit

func (t *Task) Edit(description string)

func (*Task) GetAge

func (t *Task) GetAge() string

func (*Task) GetDesriptionWithStatus added in v0.2.0

func (t *Task) GetDesriptionWithStatus() string

func (*Task) GetStatusMark

func (t *Task) GetStatusMark() string

func (*Task) Uncomplete

func (t *Task) Uncomplete()

type TaskContainer

type TaskContainer struct {
	Data []Task
}
var (
	Tasks TaskContainer
)

func (*TaskContainer) Add

func (t *TaskContainer) Add(task Task)

func (*TaskContainer) Clean

func (t *TaskContainer) Clean()

func (*TaskContainer) Complete

func (t *TaskContainer) Complete(idx int) error

func (*TaskContainer) Edit

func (t *TaskContainer) Edit(idx int, description string) error

func (*TaskContainer) Init

func (t *TaskContainer) Init()

func (*TaskContainer) Load

func (t *TaskContainer) Load() error

func (*TaskContainer) Purge

func (t *TaskContainer) Purge()

func (*TaskContainer) Remove

func (t *TaskContainer) Remove(idx int) error

func (*TaskContainer) RenderAll

func (t *TaskContainer) RenderAll()

func (*TaskContainer) RenderByScope

func (t *TaskContainer) RenderByScope(scope string)

func (*TaskContainer) Save

func (t *TaskContainer) Save()

func (*TaskContainer) Sort

func (t *TaskContainer) Sort()

func (*TaskContainer) Uncomplete

func (t *TaskContainer) Uncomplete(idx int) error

Jump to

Keyboard shortcuts

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