Documentation
¶
Overview ¶
Package tui provides filter and debounce utilities for the TUI model.
Package tui defines message types for the TUI model.
Package tui implements the core TUI model and logic for the toolkit application. It provides the Model struct and related helpers for managing state, events, and rendering using Bubble Tea and Charmbracelet components.
Package tui contains reducer and event logic for the Model. This file contains methods for state transitions, event handling, and UI updates.
Package tui contains the Model struct and constructor for the toolkit TUI. This file defines the main state container and its initialization logic.
Package tui implements the update/reduce logic for the Model.
Package tui implements the view and rendering logic for the Model.
Index ¶
- func DebounceFilter(m *Model) tea.Cmd
- func FilterTable(m *Model, filter string)
- type DataMsg
- type ErrMsg
- type FilterMsg
- type Model
- type ModelOption
- func WithCategory(category domain.Category) ModelOption
- func WithContext(ctx context.Context) ModelOption
- func WithEnvironment(env models.Environment) ModelOption
- func WithFilter(filter string) ModelOption
- func WithKubeConfig(kubeConfig string) ModelOption
- func WithLoader(l loader.Loader) ModelOption
- func WithLogger(logger logging.Logger) ModelOption
- func WithRepoPath(repoPath string) ModelOption
- func WithTable(tbl *table.Model) ModelOption
- func WithVersion(v string) ModelOption
- type SetFilterMsg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DebounceFilter ¶
DebounceFilter triggers a debounced filter update for the model's text input.
func FilterTable ¶
FilterTable updates the model's filter and rows if the filter has changed.
Types ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model represents the main TUI model for the toolkit application. It manages state, events, and rendering for the Bubble Tea UI.
func NewModel ¶
func NewModel(opts ...ModelOption) (*Model, error)
NewModel creates a new Model for the toolkit TUI, applying the given options.
type ModelOption ¶
type ModelOption func(*Model)
ModelOption defines a functional option for configuring Model.
func WithCategory ¶
func WithCategory(category domain.Category) ModelOption
WithCategory sets the category field for the Model.
func WithContext ¶
func WithContext(ctx context.Context) ModelOption
WithContext sets the context.Context for the Model.
func WithEnvironment ¶
func WithEnvironment(env models.Environment) ModelOption
WithEnvironment sets the environment field.
func WithFilter ¶
func WithFilter(filter string) ModelOption
WithFilter sets a starting filter before Init().
func WithKubeConfig ¶
func WithKubeConfig(kubeConfig string) ModelOption
WithKubeConfig sets the kubeConfig field.
func WithLoader ¶
func WithLoader(l loader.Loader) ModelOption
WithLoader sets the Loader implementation for the Model. The Loader interface must implement all loader interfaces (DatasetLoader, BaseModelLoader, GpuPoolLoader, GpuNodeLoader, DedicatedAIClusterLoader).
func WithLogger ¶
func WithLogger(logger logging.Logger) ModelOption
WithLogger sets the logger for the Model.
func WithRepoPath ¶
func WithRepoPath(repoPath string) ModelOption
WithRepoPath sets the repoPath field.
func WithVersion ¶
func WithVersion(v string) ModelOption
WithVersion sets the version of the Model.
type SetFilterMsg ¶
type SetFilterMsg string
SetFilterMsg is a message to set the filter text in the model.
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
Package actions provides side-effectful operations for the TUI Model.
|
Package actions provides side-effectful operations for the TUI Model. |
Package common provides shared types and utilities for the TUI components.
|
Package common provides shared types and utilities for the TUI components. |
Package keys provides key binding definitions and utilities for the TUI.
|
Package keys provides key binding definitions and utilities for the TUI. |
Package view provides utilities for rendering and centering text in the TUI.
|
Package view provides utilities for rendering and centering text in the TUI. |