Documentation
¶
Overview ¶
Package web provides a lightweight HTTP server for the TaskYou kanban board.
Package web provides a lightweight HTTP API server for TaskYou. It exposes the same operations as the CLI over HTTP/JSON, allowing external frontends (like ty-web) to build on top.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoardColumn ¶
type BoardColumn struct {
Status string `json:"status"`
Label string `json:"label"`
Count int `json:"count"`
Tasks []BoardEntry `json:"tasks"`
}
BoardColumn is a single kanban column.
type BoardEntry ¶
type BoardEntry struct {
ID int64 `json:"id"`
Title string `json:"title"`
Project string `json:"project"`
Type string `json:"type"`
Pinned bool `json:"pinned"`
AgeHint string `json:"age_hint"`
}
BoardEntry is a single task card in the board.
type BoardSnapshot ¶
type BoardSnapshot struct {
Columns []BoardColumn `json:"columns"`
}
BoardSnapshot is the top-level board state returned by the API.
func BuildBoardSnapshot ¶
func BuildBoardSnapshot(tasks []*db.Task, limit int) BoardSnapshot
BuildBoardSnapshot groups tasks into kanban columns.
type CommandRunner ¶
type CommandRunner interface {
Run(name string, args ...string) error
Output(name string, args ...string) ([]byte, error)
}
CommandRunner abstracts command execution for testability.
type Config ¶
type Config struct {
Addr string // e.g. ":8080"
DB *db.DB
CmdRunner CommandRunner
}
Config holds web server configuration.
Click to show internal directories.
Click to hide internal directories.