core

package
v0.0.0-...-a2e4898 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	CreateTask(task *models.Task) (int, error)
	Close() error
	DeleteTaskByID(taskID int) error
	GetServerStatus() (*models.Status, error)
	GetTaskList() (*models.List, error)
	StartTask(taskID int) error
	UpdateStatus(status *models.Status) error
	Config() *koanf.Koanf
	CreatePomodoro(taskID int, pomodoro models.Pomodoro) error
}

type Runner

type Runner interface {
	TimeRemaining() time.Duration
	SetState(state models.State)
	SetStatus(status models.Status)
	Status() *models.Status
	Toggle()
	Pause()
	Start()
	StartUI()
}

type Server

type Server interface {
	Start()
	Stop()
}

type Store

type Store interface {
	TaskGetByID(ctx context.Context, id int) (*models.Task, error)
	GetAllTasks(ctx context.Context) (models.List, error)
	TaskSave(ctx context.Context, task *models.Task) (int, error)
	TaskDeleteByID(ctx context.Context, id int) error

	PomodoroGetByTaskID(ctx context.Context, id int) ([]*models.Pomodoro, error)
	PomodoroSave(ctx context.Context, taskID int, pomodoro *models.Pomodoro) error
	PomodoroDeleteByTaskID(ctx context.Context, id int) error
	Close() error
	InitDB() error
}

Store is the persistent store of tasks

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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