services

package
v0.0.0-...-4aab756 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultTimeout = time.Duration(1500 * time.Millisecond)

Variables

This section is empty.

Functions

This section is empty.

Types

type ServiceHandler

type ServiceHandler struct {
	Interprete *interpreter.Interpreter
	Store      *db.Store
	Timeout    time.Duration
}

func NewServiceHandler

func NewServiceHandler(
	interpreter *interpreter.Interpreter,
	store *db.Store,
) *ServiceHandler

func (*ServiceHandler) CompleteTaskById

func (handler *ServiceHandler) CompleteTaskById(taskId int64) (bool, error)

func (*ServiceHandler) CountTasks

func (handler *ServiceHandler) CountTasks() (int64, error)

func (*ServiceHandler) CreateTask

func (handler *ServiceHandler) CreateTask(task *db.Task) (*db.Task, error)

func (*ServiceHandler) DecreasePriority

func (handler *ServiceHandler) DecreasePriority(id int64) (bool, error)

func (*ServiceHandler) DeleteTaskById

func (handler *ServiceHandler) DeleteTaskById(id int64) (bool, error)

func (*ServiceHandler) GetDependenciesForServices

func (serv *ServiceHandler) GetDependenciesForServices(taskId int64) ([]db.TaskDependency, error)

func (*ServiceHandler) GetTaskById

func (handler *ServiceHandler) GetTaskById(taskId int64) (*db.Task, error)

func (*ServiceHandler) GetTaskTimes

func (handler *ServiceHandler) GetTaskTimes(id int64) ([]db.TaskTime, error)

func (*ServiceHandler) IncreasePriority

func (handler *ServiceHandler) IncreasePriority(id int64) (bool, error)

func (*ServiceHandler) ListTasks

func (handler *ServiceHandler) ListTasks() ([]db.TaskDetailed, error)

func (*ServiceHandler) RunProgram

func (handler *ServiceHandler) RunProgram(program string) (*ast.Command, error)

func (*ServiceHandler) SetPriority

func (handler *ServiceHandler) SetPriority(id int64, priority db.TaskPriority) (bool, error)

func (*ServiceHandler) SortTasksByUrgency

func (handler *ServiceHandler) SortTasksByUrgency(tasks []db.TaskDetailed)

func (*ServiceHandler) StartTimeToggleById

func (handler *ServiceHandler) StartTimeToggleById(id int64) error

func (*ServiceHandler) StopTimeToggleById

func (handler *ServiceHandler) StopTimeToggleById(id int64) error

func (*ServiceHandler) TagCreate

func (handler *ServiceHandler) TagCreate(name string) (int64, error)

CreateTag will create a new tag in the database (this should not exist)

func (*ServiceHandler) TagLinkTask

func (handler *ServiceHandler) TagLinkTask(tagId, taskId int64) error

Used to link a task to a tag

func (*ServiceHandler) TagList

func (handler *ServiceHandler) TagList() ([]db.Tag, error)

Used to list all of the tags

Jump to

Keyboard shortcuts

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