ui

package
v1.23.1 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2026 License: MIT Imports: 53 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(cfg *config.Config, backend docker.Backend, store *hosts.Store, set *settings.Store, pluginSet *plugins.Set, keys keymap.Map, alertThresholds alerts.Thresholds, connectErr error, startInHosts bool) error

Types

type Mode

type Mode int
const (
	ModeNormal          Mode = iota
	ModeDetail               // 'i'
	ModeFilter               // '/'
	ModeCommand              // ':'
	ModeLogs                 // logs viewer
	ModeCopy                 // right-click / 'y' copy menu
	ModeHostForm             // add/edit host modal form
	ModeComposeEdit          // compose file editor
	ModeBackupPicker         // backup catalog overlay (list/restore/delete)
	ModeHelp                 // keyboard/command reference overlay ('?')
	ModeShell                // embedded interactive exec terminal ('x')
	ModeEvents               // live daemon events feed
	ModePushForm             // registry-credentials modal for image push
	ModeNetForm              // create-network modal form
	ModeVolForm              // create-volume modal form
	ModePullForm             // pull-image modal form (images view)
	ModeBuildForm            // build-image modal form (images view)
	ModeRunForm              // run-container wizard modal form
	ModeExecForm             // one-off interactive run wizard (`run --rm -it`)
	ModeConfirm              // generic y/esc confirmation overlay
	ModeFSBrowser            // container filesystem browser ('f' / :files)
	ModeNotice               // informational modal (e.g. SSH known_hosts mismatch)
	ModeCpForm               // upload-to-container wizard (`:cp` with no args)
	ModeThemePicker          // theme selector modal (`:theme` with no args, live preview)
	ModeLangPicker           // language selector modal (`:lang` with no args, live preview)
	ModeConnectAuth          // SSH login/password prompt before connecting (password-auth hosts)
	ModeNamespacePicker      // containerd namespace selector modal (`:namespace` with no args)
	ModeConnecting           // connection-progress window for hosts without a credential prompt
)

type Model

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

func NewModel

func NewModel(cfg *config.Config, backend docker.Backend, store *hosts.Store, connectErr error, startInHosts bool) Model

NewModel builds the root model. The app starts in the hosts view when startInHosts is set (e.g. no host configured, or the initial connection failed); connectErr, when non-nil, is shown as the footer error.

func (Model) Init

func (m Model) Init() tea.Cmd

func (*Model) SetAlerts

func (m *Model) SetAlerts(t alerts.Thresholds)

SetAlerts installs the resource-usage alert thresholds (from the config file) and refreshes the container view so any breaching rows are flagged at once.

func (*Model) SetKeymap

func (m *Model) SetKeymap(km keymap.Map)

SetKeymap installs the resolved normal-mode key bindings.

func (*Model) SetPlugins

func (m *Model) SetPlugins(p *plugins.Set)

SetPlugins installs the user-defined plugin set and refreshes command autocomplete for the current view. Safe to call with a nil set.

func (*Model) SetSettings

func (m *Model) SetSettings(s *settings.Store)

SetSettings installs the unified config store, used to persist runtime changes (e.g. the theme chosen via the picker). Safe to call with a nil store.

func (Model) Update

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

func (Model) View

func (m Model) View() string

type ResourceView

type ResourceView int

ResourceView identifies which Docker resource type is currently displayed.

const (
	ViewContainers ResourceView = iota
	ViewImages
	ViewNetworks
	ViewVolumes
	ViewHosts
	ViewCompose
)

func (ResourceView) String

func (r ResourceView) String() string

Directories

Path Synopsis
Package buildform renders the modal "build image" form shown in the images view when the build command is invoked without a context directory.
Package buildform renders the modal "build image" form shown in the images view when the build command is invoked without a context directory.
Package composeedit provides the embedded editor for compose files, with YAML syntax validation before saving.
Package composeedit provides the embedded editor for compose files, with YAML syntax validation before saving.
Package connform renders the modal credential prompt shown when connecting to an SSH host configured for password authentication.
Package connform renders the modal credential prompt shown when connecting to an SSH host configured for password authentication.
Package connwait renders the modal status window shown while d9c dials a saved host that needs no credential prompt (SSH by key, TCP, unix).
Package connwait renders the modal status window shown while d9c dials a saved host that needs no credential prompt (SSH by key, TCP, unix).
Package cpform renders the modal "upload to container" wizard shown in the containers view when `:cp` is invoked without arguments.
Package cpform renders the modal "upload to container" wizard shown in the containers view when `:cp` is invoked without arguments.
Package driverfield renders a horizontal driver selector used by the create-network and create-volume modal forms.
Package driverfield renders a horizontal driver selector used by the create-network and create-volume modal forms.
Package events provides a live-events viewer component for the d9c TUI.
Package events provides a live-events viewer component for the d9c TUI.
Package execform renders the modal one-off-run wizard: start a disposable interactive container from an image (`docker run --rm -it` analogue) with optional volume mounts and a command (empty = shell).
Package execform renders the modal one-off-run wizard: start a disposable interactive container from an image (`docker run --rm -it` analogue) with optional volume mounts and a command (empty = shell).
Package fsbrowser provides a navigable view of a container's filesystem for the d9c TUI.
Package fsbrowser provides a navigable view of a container's filesystem for the d9c TUI.
Package help renders the scrollable keyboard/command reference overlay.
Package help renders the scrollable keyboard/command reference overlay.
Package hostform renders the modal add/edit form for the hosts view.
Package hostform renders the modal add/edit form for the hosts view.
Package netform renders the modal "create network" form shown in the networks view.
Package netform renders the modal "create network" form shown in the networks view.
Package pullform renders the modal "pull image" form shown in the images view when the pull command is invoked without a selected image.
Package pullform renders the modal "pull image" form shown in the images view when the pull command is invoked without a selected image.
Package pushform renders the modal registry-credentials form shown before pushing an image to a private registry.
Package pushform renders the modal registry-credentials form shown before pushing an image to a private registry.
Package runform renders the modal "run container" wizard shown in the containers view: image plus optional name, ports, env and volumes.
Package runform renders the modal "run container" wizard shown in the containers view: image plus optional name, ports, env and volumes.
Package shell renders an interactive container exec session as a panel inside the TUI.
Package shell renders an interactive container exec session as a panel inside the TUI.
Package volform renders the modal "create volume" form shown in the volumes view.
Package volform renders the modal "create volume" form shown in the volumes view.

Jump to

Keyboard shortcuts

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