Documentation
¶
Index ¶
- Variables
- type Service
- func (s *Service) AddTask(version string, description string, parentID string) (string, error)
- func (s *Service) AddVersion(version string) error
- func (s *Service) GetAll() (*TodoList, error)
- func (s *Service) GetByVersion(version string) (*VersionTasks, error)
- func (s *Service) UpdateTask(taskID string, completed *bool, description *string) error
- type Task
- type TodoList
- type VersionTasks
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrTaskNotFound is returned when a task is not found ErrTaskNotFound = errors.New("task not found") // ErrVersionNotFound is returned when a version is not found ErrVersionNotFound = errors.New("version not found") // ErrVersionExists is returned when a version already exists ErrVersionExists = errors.New("version already exists") )
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service provides todo operations
func NewService ¶
NewService creates a new todo service
func (*Service) AddVersion ¶
AddVersion adds a new version section to TODO.md
func (*Service) GetByVersion ¶
func (s *Service) GetByVersion(version string) (*VersionTasks, error)
GetByVersion retrieves tasks for a specific version
type Task ¶
type Task struct { ID string `json:"id"` Description string `json:"description"` Completed bool `json:"completed"` Version string `json:"version"` LineNumber int `json:"line_number"` Indent int `json:"indent"` SubTasks []*Task `json:"subtasks,omitempty"` }
Task represents a todo task
type TodoList ¶
type TodoList struct {
Versions []*VersionTasks `json:"versions"`
}
TodoList represents the entire TODO.md file
type VersionTasks ¶
VersionTasks represents tasks grouped by version
Click to show internal directories.
Click to hide internal directories.