Documentation
¶
Overview ¶
Package tui is the `wtm tui` dashboard. It knows nothing of git, docker or the registry: everything it shows comes through the Source it is handed.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
type Source ¶
type Source struct {
List func(ctx context.Context) ([]worktree.Entry, error)
Ports func(ctx context.Context, branch string) ([]string, error)
InspectRemoval func(ctx context.Context, branch string) (worktree.RemovalPlan, error)
// Wtm runs this very binary. The lifecycle verbs are handed the terminal
// rather than called in-process: docker streams straight to stdout, and a
// start may ask about memory.
Wtm func(args ...string) *exec.Cmd
// Open hands a URL to the desktop's browser.
Open func(url string) error
// Memory is the warning `wtm start` prints when memory is tight, empty when
// it is not. A start in the panel has no terminal to ask from, so the
// dashboard asks before it runs.
Memory func(ctx context.Context) (string, error)
// Update is the line saying a newer wtm is published, empty otherwise. Asked
// with each listing: a dashboard stays open all day, a release comes out in it.
Update func() string
}
Source is what the dashboard asks, the same questions `wtm list` and `wtm ports` answer.