Versions in this module Expand all Collapse all v1 v1.0.0 Feb 23, 2026 Changes in this version + var ErrDependencyCycle = errors.New("tasks: dependency cycle detected") + var ErrEmptySubject = errors.New("tasks: subject is required") + var ErrInvalidTaskID = errors.New("tasks: invalid task id") + var ErrInvalidTaskStatus = errors.New("tasks: invalid task status") + var ErrSelfDependency = errors.New("tasks: task cannot depend on itself") + var ErrTaskBlocked = errors.New("tasks: task is blocked by incomplete dependencies") + var ErrTaskNotFound = errors.New("tasks: task not found") + type Store interface + AddDependency func(taskID, blockedByID string) error + Close func() error + Create func(subject, description, activeForm string) (*Task, error) + Delete func(id string) error + Get func(id string) (*Task, error) + GetBlockedTasks func(taskID string) []*Task + GetBlockingTasks func(taskID string) []*Task + List func() []*Task + RemoveDependency func(taskID, blockedByID string) error + Snapshot func() []*Task + Update func(id string, updates TaskUpdate) (*Task, error) + type Task struct + ActiveForm string + BlockedBy []string + Blocks []string + CreatedAt time.Time + Description string + ID string + Owner string + Status TaskStatus + Subject string + UpdatedAt time.Time + type TaskStatus string + const TaskBlocked + const TaskCompleted + const TaskInProgress + const TaskPending + type TaskStore struct + func NewTaskStore() *TaskStore + func NewTaskStoreFromSnapshot(snapshot []*Task) *TaskStore + func (s *TaskStore) AddDependency(taskID, blockedByID string) error + func (s *TaskStore) Close() error + func (s *TaskStore) Create(subject, description, activeForm string) (*Task, error) + func (s *TaskStore) Delete(id string) error + func (s *TaskStore) Get(id string) (*Task, error) + func (s *TaskStore) GetBlockedTasks(taskID string) []*Task + func (s *TaskStore) GetBlockingTasks(taskID string) []*Task + func (s *TaskStore) List() []*Task + func (s *TaskStore) RemoveDependency(taskID, blockedByID string) error + func (s *TaskStore) Snapshot() []*Task + func (s *TaskStore) Update(id string, updates TaskUpdate) (*Task, error) + type TaskUpdate struct + ActiveForm *string + Description *string + Owner *string + Status *TaskStatus + Subject *string