Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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)
AppendFlashError(text string)
AppendFlashPending(text string)
AppendFlashSuccess(text string)
RestoreFocus()
// Direct access for command component (needed for handlers)
GetActiveFilter() string
SetActiveFilter(filter string)
// Layout management
SetCmdLineVisible(visible 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)
// 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.