Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataProvider ¶
type DataProvider interface {
Summary(ctx context.Context) (Summary, error)
InstalledMods(ctx context.Context) ([]ModItem, error)
SearchResults(ctx context.Context) ([]ModItem, error)
Profiles(ctx context.Context) ([]ProfileItem, error)
}
DataProvider is the narrow, read-only boundary between the TUI and app data. Implementations must be safe to call from a Bubble Tea command goroutine.
func NewCoreProvider ¶
NewCoreProvider returns a DataProvider backed by the real app service for one game/profile pair.
func NewPrototypeProvider ¶
func NewPrototypeProvider() DataProvider
NewPrototypeProvider returns the side-effect-free demo DataProvider used by --prototype mode and tests.
type KeyMap ¶
type KeyMap struct {
Quit key.Binding
Help key.Binding
NextScreen key.Binding
PrevScreen key.Binding
Up key.Binding
Down key.Binding
Search key.Binding
Dashboard key.Binding
InstalledMods key.Binding
Profiles key.Binding
Select key.Binding
}
KeyMap documents the TUI keyboard contract.
func DefaultKeyMap ¶
func DefaultKeyMap() KeyMap
DefaultKeyMap returns the shared key bindings shown in help and used by tests.
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model is the root Bubble Tea model for the lmm TUI.
func NewPrototypeModel ¶
NewPrototypeModel creates a side-effect-free TUI model backed by fake data.
func (Model) CurrentScreen ¶
CurrentScreen exposes the selected screen for tests.
func (Model) HelpVisible ¶
HelpVisible exposes help overlay state for tests.
func (Model) SelectedIndex ¶
SelectedIndex exposes the selected row for tests.
type Options ¶
type Options struct {
Theme string
Provider DataProvider
}
Options configures the TUI app.
type ProfileItem ¶
ProfileItem is one renderable profile row.