Documentation
¶
Index ¶
- Variables
- func GetTaskGroup(task Task) string
- func SetTaskGroup(task *Task, group string)
- func StatusIcon(status string) string
- type GroupStore
- func (s *GroupStore) AddGroup(group TaskGroup)
- func (s *GroupStore) DeleteGroup(name string) bool
- func (s *GroupStore) EnsureGroupExists(name string)
- func (s *GroupStore) GetGroup(name string) *TaskGroup
- func (s *GroupStore) GetGroupColor(name string) string
- func (s *GroupStore) GetGroupNames() []string
- func (s *GroupStore) MoveGroupDown(name string) bool
- func (s *GroupStore) MoveGroupUp(name string) bool
- func (s *GroupStore) NeedsReload() bool
- func (s *GroupStore) Save() error
- func (s *GroupStore) UpdateGroup(name string, updated TaskGroup) bool
- type Project
- type Task
- type TaskGroup
- type TaskStore
- func (s *TaskStore) AddTask(task Task) string
- func (s *TaskStore) DeleteTask(id string) error
- func (s *TaskStore) GetAllGroups() []string
- func (s *TaskStore) GetTask(id string) *Task
- func (s *TaskStore) GetTasksByGroup(group string) []Task
- func (s *TaskStore) GetTasksByStatus(status string) []Task
- func (s *TaskStore) NeedsReload() bool
- func (s *TaskStore) Save() error
- func (s *TaskStore) SearchTasks(query string) []Task
- func (s *TaskStore) UpdateTask(task Task) error
Constants ¶
This section is empty.
Variables ¶
var DefaultColors = []string{
"#8b5cf6",
"#3b82f6",
"#10b981",
"#f59e0b",
"#ef4444",
"#ec4899",
"#06b6d4",
"#84cc16",
}
DefaultColors provides preset colors for groups
Functions ¶
func GetTaskGroup ¶
GetTaskGroup returns the group name from task metadata
func SetTaskGroup ¶
SetTaskGroup sets the group name in task metadata
func StatusIcon ¶
StatusIcon returns the icon for a task status
Types ¶
type GroupStore ¶
type GroupStore struct {
ProjectName string
Groups []TaskGroup
// contains filtered or unexported fields
}
GroupStore handles group persistence
func LoadGroups ¶
func LoadGroups(projectName string) (*GroupStore, error)
LoadGroups loads groups from a project's _groups.json
func NewGroupStoreForTest ¶ added in v1.2.0
func NewGroupStoreForTest(dir string, groups []TaskGroup) (*GroupStore, error)
NewGroupStoreForTest creates a GroupStore for testing with a custom directory
func (*GroupStore) AddGroup ¶
func (s *GroupStore) AddGroup(group TaskGroup)
AddGroup adds a new group
func (*GroupStore) DeleteGroup ¶
func (s *GroupStore) DeleteGroup(name string) bool
DeleteGroup removes a group by name
func (*GroupStore) EnsureGroupExists ¶
func (s *GroupStore) EnsureGroupExists(name string)
EnsureGroupExists creates a group if it doesn't exist
func (*GroupStore) GetGroup ¶
func (s *GroupStore) GetGroup(name string) *TaskGroup
GetGroup returns a group by name
func (*GroupStore) GetGroupColor ¶
func (s *GroupStore) GetGroupColor(name string) string
GetGroupColor returns the color for a group name
func (*GroupStore) GetGroupNames ¶
func (s *GroupStore) GetGroupNames() []string
GetGroupNames returns just the group names in order
func (*GroupStore) MoveGroupDown ¶
func (s *GroupStore) MoveGroupDown(name string) bool
MoveGroupDown moves a group down in order
func (*GroupStore) MoveGroupUp ¶
func (s *GroupStore) MoveGroupUp(name string) bool
MoveGroupUp moves a group up in order
func (*GroupStore) NeedsReload ¶
func (s *GroupStore) NeedsReload() bool
NeedsReload checks if the groups file has been modified since last load
func (*GroupStore) Save ¶
func (s *GroupStore) Save() error
Save saves groups to the project's _groups.json
func (*GroupStore) UpdateGroup ¶
func (s *GroupStore) UpdateGroup(name string, updated TaskGroup) bool
UpdateGroup updates an existing group
type Project ¶
Project represents a project with task count
func ListProjects ¶
ListProjects returns all projects in the tasks directory
type Task ¶
type Task struct {
ID string `json:"id"`
Subject string `json:"subject"`
Description string `json:"description"`
ActiveForm string `json:"activeForm,omitempty"`
Status string `json:"status"` // pending, in_progress, completed
Blocks []string `json:"blocks"`
BlockedBy []string `json:"blockedBy"`
Owner string `json:"owner,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
}
Task represents a task item
type TaskGroup ¶
type TaskGroup struct {
Name string `json:"name"`
Order int `json:"order"`
Color string `json:"color"`
}
TaskGroup represents a task group with styling
type TaskStore ¶
TaskStore handles task persistence
func NewTaskStoreForTest ¶ added in v1.3.0
NewTaskStoreForTest creates a TaskStore for testing with a custom directory
func (*TaskStore) DeleteTask ¶
DeleteTask removes a task by ID
func (*TaskStore) GetAllGroups ¶
GetAllGroups returns all unique group names from tasks
func (*TaskStore) GetTasksByGroup ¶
GetTasksByGroup returns tasks filtered by group (from metadata)
func (*TaskStore) GetTasksByStatus ¶
GetTasksByStatus returns tasks filtered by status
func (*TaskStore) NeedsReload ¶
NeedsReload checks if the project directory has been modified since last load
func (*TaskStore) SearchTasks ¶
SearchTasks returns tasks matching the search query in subject or description
func (*TaskStore) UpdateTask ¶
UpdateTask updates an existing task