Documentation
¶
Index ¶
- func ParseFrontmatter(content string) (frontmatter, body string, err error)
- type BurndownPoint
- type ChangeListener
- type InMemoryStore
- func (s *InMemoryStore) AddComment(taskID string, comment task.Comment) bool
- func (s *InMemoryStore) AddListener(listener ChangeListener) int
- func (s *InMemoryStore) CreateTask(task *task.Task) error
- func (s *InMemoryStore) DeleteTask(id string)
- func (s *InMemoryStore) GetAllTasks() []*task.Task
- func (s *InMemoryStore) GetAllUsers() ([]string, error)
- func (s *InMemoryStore) GetBacklogTasks() []*task.Task
- func (s *InMemoryStore) GetBurndown() []BurndownPoint
- func (s *InMemoryStore) GetCurrentUser() (name string, email string, err error)
- func (s *InMemoryStore) GetGitOps() git.GitOps
- func (s *InMemoryStore) GetStats() []Stat
- func (s *InMemoryStore) GetTask(id string) *task.Task
- func (s *InMemoryStore) GetTasksByStatus(status task.Status) []*task.Task
- func (s *InMemoryStore) NewTaskTemplate() (*task.Task, error)
- func (s *InMemoryStore) Reload() error
- func (s *InMemoryStore) ReloadTask(taskID string) error
- func (s *InMemoryStore) RemoveListener(id int)
- func (s *InMemoryStore) Search(query string, filterFunc func(*task.Task) bool) []task.SearchResult
- func (s *InMemoryStore) SearchBacklog(query string) []task.SearchResult
- func (s *InMemoryStore) UpdateStatus(taskID string, newStatus task.Status) bool
- func (s *InMemoryStore) UpdateTask(task *task.Task) error
- type Stat
- type StatusChange
- type Store
- type TaskHistory
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseFrontmatter ¶
ParseFrontmatter extracts YAML frontmatter and body from markdown content
Types ¶
type BurndownPoint ¶
type ChangeListener ¶
type ChangeListener func()
ChangeListener is called when the store's data changes
type InMemoryStore ¶
type InMemoryStore struct {
// contains filtered or unexported fields
}
InMemoryStore is an in-memory task repository
func NewInMemoryStore ¶
func NewInMemoryStore() *InMemoryStore
NewInMemoryStore creates a new in-memory task store
func (*InMemoryStore) AddComment ¶
func (s *InMemoryStore) AddComment(taskID string, comment task.Comment) bool
AddComment adds a comment to a task
func (*InMemoryStore) AddListener ¶
func (s *InMemoryStore) AddListener(listener ChangeListener) int
AddListener registers a callback for change notifications. returns a listener ID that can be used to remove the listener.
func (*InMemoryStore) CreateTask ¶
func (s *InMemoryStore) CreateTask(task *task.Task) error
CreateTask adds a new task to the store
func (*InMemoryStore) DeleteTask ¶
func (s *InMemoryStore) DeleteTask(id string)
DeleteTask removes a task from the store
func (*InMemoryStore) GetAllTasks ¶
func (s *InMemoryStore) GetAllTasks() []*task.Task
GetAllTasks returns all tasks
func (*InMemoryStore) GetAllUsers ¶
func (s *InMemoryStore) GetAllUsers() ([]string, error)
GetAllUsers returns a placeholder user list for MemoryStore
func (*InMemoryStore) GetBacklogTasks ¶
func (s *InMemoryStore) GetBacklogTasks() []*task.Task
GetBacklogTasks returns tasks with backlog status
func (*InMemoryStore) GetBurndown ¶
func (s *InMemoryStore) GetBurndown() []BurndownPoint
GetBurndown returns nil for MemoryStore (no history tracking)
func (*InMemoryStore) GetCurrentUser ¶
func (s *InMemoryStore) GetCurrentUser() (name string, email string, err error)
GetCurrentUser returns a placeholder user (MemoryStore has no git integration)
func (*InMemoryStore) GetGitOps ¶
func (s *InMemoryStore) GetGitOps() git.GitOps
GetGitOps returns nil for in-memory store (no git operations)
func (*InMemoryStore) GetStats ¶
func (s *InMemoryStore) GetStats() []Stat
GetStats returns placeholder statistics for the header
func (*InMemoryStore) GetTask ¶
func (s *InMemoryStore) GetTask(id string) *task.Task
GetTask retrieves a task by ID
func (*InMemoryStore) GetTasksByStatus ¶
func (s *InMemoryStore) GetTasksByStatus(status task.Status) []*task.Task
GetTasksByStatus returns tasks filtered by status
func (*InMemoryStore) NewTaskTemplate ¶
func (s *InMemoryStore) NewTaskTemplate() (*task.Task, error)
NewTaskTemplate returns a new task with hardcoded defaults. MemoryStore doesn't load templates from files.
func (*InMemoryStore) Reload ¶
func (s *InMemoryStore) Reload() error
Reload is a no-op for in-memory store (no disk backing)
func (*InMemoryStore) ReloadTask ¶
func (s *InMemoryStore) ReloadTask(taskID string) error
ReloadTask reloads a single task (no-op for memory store)
func (*InMemoryStore) RemoveListener ¶
func (s *InMemoryStore) RemoveListener(id int)
RemoveListener removes a previously registered listener by ID
func (*InMemoryStore) Search ¶
func (s *InMemoryStore) Search(query string, filterFunc func(*task.Task) bool) []task.SearchResult
Search searches tasks with optional filter function (simplified in-memory version)
func (*InMemoryStore) SearchBacklog ¶
func (s *InMemoryStore) SearchBacklog(query string) []task.SearchResult
SearchBacklog searches backlog tasks by title (case-insensitive). Returns results with Score for relevance (currently all 1.0).
func (*InMemoryStore) UpdateStatus ¶
func (s *InMemoryStore) UpdateStatus(taskID string, newStatus task.Status) bool
UpdateStatus changes a task's status (with validation)
func (*InMemoryStore) UpdateTask ¶
func (s *InMemoryStore) UpdateTask(task *task.Task) error
UpdateTask updates an existing task
type StatusChange ¶
type Store ¶
type Store interface {
// AddListener registers a callback for change notifications.
// returns a listener ID that can be used to remove the listener.
AddListener(listener ChangeListener) int
// RemoveListener removes a previously registered listener by ID
RemoveListener(id int)
// CreateTask adds a new task to the store.
// Returns error if save fails (IO error, ErrConflict).
CreateTask(task *task.Task) error
// GetTask retrieves a task by ID
GetTask(id string) *task.Task
// UpdateTask updates an existing task.
// Returns error if save fails (IO error, ErrConflict).
UpdateTask(task *task.Task) error
// UpdateStatus changes a task's status (with validation)
UpdateStatus(taskID string, newStatus task.Status) bool
// DeleteTask removes a task from the store
DeleteTask(id string)
// GetAllTasks returns all tasks
GetAllTasks() []*task.Task
// GetTasksByStatus returns tasks filtered by status
GetTasksByStatus(status task.Status) []*task.Task
// GetBacklogTasks returns tasks with backlog status
GetBacklogTasks() []*task.Task
// SearchBacklog searches backlog tasks by title (case-insensitive).
// Returns results in relevance order (Score for future use).
// Deprecated: Use Search() instead for more flexible searching.
SearchBacklog(query string) []task.SearchResult
// Search searches tasks with optional filter function.
// query: case-insensitive search term (searches task titles)
// filterFunc: optional filter function to pre-filter tasks (nil = all tasks)
// Returns matching tasks sorted by ID with relevance scores.
Search(query string, filterFunc func(*task.Task) bool) []task.SearchResult
// AddComment adds a comment to a task
AddComment(taskID string, comment task.Comment) bool
// Reload reloads all data from the backing store
Reload() error
// ReloadTask reloads a single task from disk by ID
ReloadTask(taskID string) error
// GetCurrentUser returns the current git user name and email
GetCurrentUser() (name string, email string, err error)
// GetStats returns statistics for the header (user, branch, etc.)
GetStats() []Stat
// GetBurndown returns the burndown chart data
GetBurndown() []BurndownPoint
// GetAllUsers returns list of all git users for assignee selection
GetAllUsers() ([]string, error)
// NewTaskTemplate returns a new task populated with template defaults from new.md.
// The task will have an auto-generated ID, git author, and all fields from the template.
NewTaskTemplate() (*task.Task, error)
}
Store is the interface for task storage engines. Implementations must be thread-safe and notify listeners on changes.
type TaskHistory ¶
type TaskHistory struct {
// contains filtered or unexported fields
}
func NewTaskHistory ¶
func NewTaskHistory(taskDir string, gitOps git.GitOps) *TaskHistory
func (*TaskHistory) Build ¶
func (h *TaskHistory) Build() error
func (*TaskHistory) Burndown ¶
func (h *TaskHistory) Burndown() []BurndownPoint
func (*TaskHistory) Transitions ¶
func (h *TaskHistory) Transitions() map[string][]StatusChange