Documentation
¶
Index ¶
- type Service
- func (s *Service) AddChecklistItem(ctx context.Context, taskID uuid.UUID, content string) (*domain.ChecklistItem, error)
- func (s *Service) ArchiveTask(ctx context.Context, id uuid.UUID) (*domain.Task, error)
- func (s *Service) CreateTask(ctx context.Context, title, notes string, tagNames []string, ...) (*domain.Task, error)
- func (s *Service) DeleteChecklistItem(ctx context.Context, itemID uuid.UUID) error
- func (s *Service) DeleteTask(ctx context.Context, id uuid.UUID) error
- func (s *Service) GetTask(ctx context.Context, id uuid.UUID) (*domain.Task, error)
- func (s *Service) ListTasks(ctx context.Context, filterTagIDs []uuid.UUID, limit, offset int, ...) ([]*domain.Task, error)
- func (s *Service) ReorderChecklistItems(ctx context.Context, taskID uuid.UUID, itemIDs []uuid.UUID) ([]domain.ChecklistItem, error)
- func (s *Service) SetChecklistItemCompleted(ctx context.Context, itemID uuid.UUID, completed bool) (*domain.ChecklistItem, error)
- func (s *Service) UnarchiveTask(ctx context.Context, id uuid.UUID) (*domain.Task, error)
- func (s *Service) UpdateChecklistItemContent(ctx context.Context, itemID uuid.UUID, content string) (*domain.ChecklistItem, error)
- func (s *Service) UpdateTask(ctx context.Context, id uuid.UUID, title, notes string, tagNames []string, ...) (*domain.Task, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service provides task business logic
func NewService ¶
func NewService(repo domain.Repository, tagRepo tagdomain.Repository, logger *slog.Logger) *Service
NewService creates a new task service
func (*Service) AddChecklistItem ¶ added in v0.1.7
func (s *Service) AddChecklistItem(ctx context.Context, taskID uuid.UUID, content string) (*domain.ChecklistItem, error)
AddChecklistItem adds a checklist item to a task.
func (*Service) ArchiveTask ¶ added in v0.1.3
ArchiveTask archives a task
func (*Service) CreateTask ¶
func (s *Service) CreateTask(ctx context.Context, title, notes string, tagNames []string, startDate *time.Time, checklistItems []string) (*domain.Task, error)
CreateTask creates a new task
func (*Service) DeleteChecklistItem ¶ added in v0.1.7
DeleteChecklistItem deletes a checklist item.
func (*Service) DeleteTask ¶
DeleteTask deletes a task
func (*Service) ListTasks ¶
func (s *Service) ListTasks(ctx context.Context, filterTagIDs []uuid.UUID, limit, offset int, includeArchived, archivedOnly bool) ([]*domain.Task, error)
ListTasks lists tasks
func (*Service) ReorderChecklistItems ¶ added in v0.1.7
func (s *Service) ReorderChecklistItems(ctx context.Context, taskID uuid.UUID, itemIDs []uuid.UUID) ([]domain.ChecklistItem, error)
ReorderChecklistItems sets a new checklist order for all task items.
func (*Service) SetChecklistItemCompleted ¶ added in v0.1.7
func (s *Service) SetChecklistItemCompleted(ctx context.Context, itemID uuid.UUID, completed bool) (*domain.ChecklistItem, error)
SetChecklistItemCompleted sets checklist item completion state.
func (*Service) UnarchiveTask ¶ added in v0.1.3
UnarchiveTask unarchives a task
Click to show internal directories.
Click to hide internal directories.