charttui

package
v0.17.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package charttui provides a terminal user interface for chart management commands.

This package implements a TUI layer for github.com/macropower/kclipper/chartcmd, offering interactive visual feedback for chart operations. It uses the Bubble Tea framework to provide a rich terminal experience with progress indicators, spinners, and formatted output.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionModel

type ActionModel struct {
	// contains filtered or unexported fields
}

func NewActionModel

func NewActionModel(noun, verb string) *ActionModel

NewActionModel creates an ActionModel used to display the status of a simple action. It renders a spinner which is replaced with a result. If any logs are written, they will be displayed in the terminal above the spinner. `noun`: the outcome or instance of the action (e.g., "update"). `verb`: the ongoing action using present participle tense (e.g., "updating").

func (*ActionModel) Init

func (m *ActionModel) Init() tea.Cmd

func (*ActionModel) Update

func (m *ActionModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*ActionModel) View

func (m *ActionModel) View() string

type AddModel

type AddModel struct {
	// contains filtered or unexported fields
}

func NewAddModel

func NewAddModel(kind, name string) *AddModel

func (*AddModel) Init

func (m *AddModel) Init() tea.Cmd

func (*AddModel) Update

func (m *AddModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*AddModel) View

func (m *AddModel) View() string

type ChartCommander

type ChartCommander interface {
	Init() (bool, error)
	AddChart(key string, chart *kclchart.ChartConfig) error
	AddRepo(repo *kclhelm.ChartRepo) error
	Set(chart, keyValueOverrides string) error
	Update(charts ...string) error
	Subscribe(f func(any))
}

type ChartTUI

type ChartTUI struct {
	// contains filtered or unexported fields
}

func NewChartTUI

func NewChartTUI(w io.Writer, lvl slog.Level, pkg ChartCommander) *ChartTUI

func (*ChartTUI) AddChart

func (c *ChartTUI) AddChart(key string, chart *kclchart.ChartConfig) error

func (*ChartTUI) AddRepo

func (c *ChartTUI) AddRepo(repo *kclhelm.ChartRepo) error

func (*ChartTUI) Init

func (c *ChartTUI) Init() (bool, error)

func (*ChartTUI) Set

func (c *ChartTUI) Set(chart, keyValueOverrides string) error

func (*ChartTUI) Subscribe

func (c *ChartTUI) Subscribe(f func(any))

func (*ChartTUI) Update

func (c *ChartTUI) Update(charts ...string) error

func (*ChartTUI) Write

func (c *ChartTUI) Write(p []byte) (int, error)

type UpdateModel

type UpdateModel struct {
	// contains filtered or unexported fields
}

func NewUpdateModel

func NewUpdateModel() *UpdateModel

func (*UpdateModel) Init

func (m *UpdateModel) Init() tea.Cmd

func (*UpdateModel) Update

func (m *UpdateModel) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*UpdateModel) View

func (m *UpdateModel) View() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL