Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Export ¶
func Export(cfg ExportConfig) error
Export generates a self-contained static site from task data.
func ExportWithFS ¶
func ExportWithFS(cfg ExportConfig, embeddedFS fs.FS) error
ExportWithFS generates a static site using the provided embedded filesystem. This is separated from Export to allow tests to inject a mock FS.
func StaticFiles ¶
StaticFiles returns an empty filesystem when web assets are not embedded.
Types ¶
type ConfigResponse ¶
ConfigResponse is the JSON response for GET /api/config.
type DataProvider ¶
type DataProvider struct {
// contains filtered or unexported fields
}
DataProvider caches scan results and invalidates on file changes.
func NewDataProvider ¶
func NewDataProvider(scanDir string, verbose bool) *DataProvider
NewDataProvider creates a DataProvider for the given directory.
func (*DataProvider) GetArchivedTasks ¶
func (dp *DataProvider) GetArchivedTasks() ([]*model.Task, error)
GetArchivedTasks scans archive directories for tasks used in dependency resolution.
func (*DataProvider) GetTasks ¶
func (dp *DataProvider) GetTasks() ([]*model.Task, error)
GetTasks returns cached tasks, rescanning if dirty.
func (*DataProvider) Invalidate ¶
func (dp *DataProvider) Invalidate()
Invalidate marks cached data as stale.
type ErrorResponse ¶
type ErrorResponse struct {
Error string `json:"error"`
Details []string `json:"details,omitempty"`
}
ErrorResponse is a structured JSON error response.
type ExportConfig ¶
type ExportConfig struct {
OutputDir string
ScanDir string
BasePath string
Verbose bool
Version string
}
ExportConfig holds configuration for the static site export.
type SSEBroker ¶
type SSEBroker struct {
// contains filtered or unexported fields
}
SSEBroker manages Server-Sent Events connections.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the taskmd web server.
type TaskDetail ¶
type TaskDetail struct {
*model.Task
Body string `json:"body"`
WorklogEntries int `json:"worklog_entries,omitempty"`
WorklogUpdated string `json:"worklog_updated,omitempty"`
}
TaskDetail includes the body field for individual task detail views
type TaskUpdateRequest ¶
type TaskUpdateRequest struct {
Title *string `json:"title"`
Status *string `json:"status"`
Priority *string `json:"priority"`
Effort *string `json:"effort"`
Type *string `json:"type"`
Owner *string `json:"owner"`
Parent *string `json:"parent"`
Tags *[]string `json:"tags"`
Body *string `json:"body"`
}
TaskUpdateRequest is the JSON request body for PUT /api/tasks/{id}.
type WorklogEntryJSON ¶
type WorklogEntryJSON struct {
Timestamp string `json:"timestamp"`
Content string `json:"content"`
}
WorklogEntryJSON is a single worklog entry for the API.