Documentation
¶
Index ¶
- func CompareValues(a, b string) bool
- func DockerCommand(app AppController, args ...string) *exec.Cmd
- func FormatSC(key, action string) string
- func FormatSCHeader(key, action string) string
- func FormatSCHeaderGlobal(key, action string) string
- func GetLogo() []string
- func StripColorTags(text string) string
- type AppController
- type Inspector
- type Scope
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DockerCommand ¶ added in v0.49.81
func DockerCommand(app AppController, args ...string) *exec.Cmd
func FormatSCHeader ¶
func FormatSCHeaderGlobal ¶
func StripColorTags ¶
StripColorTags removes tview color tags from a string
Types ¶
type AppController ¶
type AppController interface {
RefreshCurrentView()
ActivateCmd(initial string)
SwitchTo(viewName string)
ExecuteCmd(cmd string)
// Accessors
GetPages() *tview.Pages
GetTviewApp() *tview.Application
GetScreen() tcell.Screen
GetDocker() *dao.DockerClient
GetConfig() *config.Config
// Actions
PerformAction(action func(id string) error, actionName string, color tcell.Color)
GetActionState(viewName string, id string) (string, tcell.Color, bool)
InspectCurrentSelection()
// State
IsReadOnly() bool
GetActiveScope() *Scope
SetActiveScope(scope *Scope)
SetFilter(filter string)
SetFlashText(text string)
SetFlashMessage(text string, duration time.Duration)
SetFlashError(text string)
SetFlashPending(text string)
SetFlashSuccess(text string)
AppendFlash(text string, duration ...time.Duration)
AppendFlashError(text string, duration ...time.Duration)
AppendFlashPending(text string, duration ...time.Duration)
AppendFlashSuccess(text string, duration ...time.Duration)
RestoreFocus()
// Direct access for command component (needed for handlers)
GetActiveFilter() string
SetActiveFilter(filter string)
// Layout management
SetCmdLineVisible(visible bool)
SetFullscreen(enabled bool)
UpdateShortcuts()
ScheduleViewHighlight(viewName string, match func(dao.Resource) bool, bg, fg tcell.Color, duration time.Duration)
// Inspector Management
OpenInspector(inspector Inspector)
CloseInspector()
// Async Task Management
RunInBackground(task func())
SetPaused(paused bool)
// Context Management
SetDefaultContext(contextName string)
ReloadContext(contextName string)
// Port-Forward Management
GetPortForwardManager() *portforward.Manager
// Refactoring: Auto Refresh Control
StartAutoRefresh()
StopAutoRefresh()
}
AppController defines the methods that sub-components need from the main App
type Inspector ¶
type Inspector interface {
// GetPrimitive returns the tview component to be displayed
GetPrimitive() tview.Primitive
// GetID returns a unique ID for this inspector instance (usually "inspect")
GetID() string
// InputHandler handles keyboard events. Returns nil if handled.
InputHandler(event *tcell.EventKey) *tcell.EventKey
// Helpers for the App to display info
GetTitle() string
GetShortcuts() []string
// Lifecycle
OnMount(app AppController)
OnUnmount()
// ApplyFilter applies a search/filter to the inspector view
ApplyFilter(filter string)
}
Inspector defines a component that can be shown in the inspection modal layer.
Click to show internal directories.
Click to hide internal directories.