Documentation
¶
Index ¶
- func CursorDown(g *gocui.Gui, v *gocui.View) error
- func CursorStep(g *gocui.Gui, v *gocui.View, step int) error
- func CursorUp(g *gocui.Gui, v *gocui.View) error
- type Debug
- func (v *Debug) IsVisible() bool
- func (v *Debug) Layout(g *gocui.Gui, minX, minY, maxX, maxY int) error
- func (v *Debug) Name() string
- func (v *Debug) OnLayoutChange() error
- func (v *Debug) Render() error
- func (v *Debug) RequestedSize(available int) *int
- func (v *Debug) SetCurrentView(r Helper)
- func (v *Debug) Setup(view *gocui.View, header *gocui.View) error
- func (v *Debug) Update() error
- type FileTree
- func (v *FileTree) AddViewExtractListener(listener ...ViewExtractListener)
- func (v *FileTree) AddViewOptionChangeListener(listener ...ViewOptionChangeListener)
- func (v *FileTree) CursorDown() error
- func (v *FileTree) CursorLeft() error
- func (v *FileTree) CursorRight() error
- func (v *FileTree) CursorUp() error
- func (v *FileTree) IsVisible() bool
- func (v *FileTree) KeyHelp() string
- func (v *FileTree) Layout(g *gocui.Gui, minX, minY, maxX, maxY int) error
- func (v *FileTree) Name() string
- func (v *FileTree) OnLayoutChange() error
- func (v *FileTree) PageDown() error
- func (v *FileTree) PageUp() error
- func (v *FileTree) Render() error
- func (v *FileTree) RequestedSize(available int) *int
- func (v *FileTree) SetFilterRegex(filterRegex *regexp.Regexp)
- func (v *FileTree) SetTitle(title string)
- func (v *FileTree) SetTree(bottomTreeStart, bottomTreeStop, topTreeStart, topTreeStop int) error
- func (v *FileTree) Setup(view, header *gocui.View) error
- func (v *FileTree) Update() error
- type Filter
- func (v *Filter) AddFilterEditListener(listener ...FilterEditListener)
- func (v *Filter) Edit(view *gocui.View, key gocui.Key, ch rune, mod gocui.Modifier)
- func (v *Filter) IsVisible() bool
- func (v *Filter) KeyHelp() string
- func (v *Filter) Layout(g *gocui.Gui, minX, minY, maxX, maxY int) error
- func (v *Filter) Name() string
- func (v *Filter) OnLayoutChange() error
- func (v *Filter) Render() error
- func (v *Filter) RequestedSize(available int) *int
- func (v *Filter) Setup(view, header *gocui.View) error
- func (v *Filter) ToggleVisible() error
- func (v *Filter) Update() error
- type FilterEditListener
- type Helper
- type IView
- type ImageDetails
- func (v *ImageDetails) CursorDown() error
- func (v *ImageDetails) CursorUp() error
- func (v *ImageDetails) IsVisible() bool
- func (v *ImageDetails) KeyHelp() string
- func (v *ImageDetails) Name() string
- func (v *ImageDetails) OnLayoutChange() error
- func (v *ImageDetails) PageDown() error
- func (v *ImageDetails) PageUp() error
- func (v *ImageDetails) Render() error
- func (v *ImageDetails) Setup(body, header *gocui.View) error
- func (v *ImageDetails) Update() error
- type Layer
- func (v *Layer) AddLayerChangeListener(listener ...LayerChangeListener)
- func (v *Layer) CompareMode() viewmodel.LayerCompareMode
- func (v *Layer) ConstrainLayout()
- func (v *Layer) CurrentLayer() *image.Layer
- func (v *Layer) CursorDown() error
- func (v *Layer) CursorUp() error
- func (v *Layer) ExpandLayout()
- func (v *Layer) IsVisible() bool
- func (v *Layer) KeyHelp() string
- func (v *Layer) LayerCount() int
- func (v *Layer) Name() string
- func (v *Layer) OnLayoutChange() error
- func (v *Layer) PageDown() error
- func (v *Layer) PageUp() error
- func (v *Layer) Render() error
- func (v *Layer) SetCursor(layer int) error
- func (v *Layer) SetOrigin(x, y int) error
- func (v *Layer) Setup(body *gocui.View, header *gocui.View) error
- func (v *Layer) Update() error
- type LayerChangeListener
- type LayerDetails
- func (v *LayerDetails) CursorDown() error
- func (v *LayerDetails) CursorUp() error
- func (v *LayerDetails) IsVisible() bool
- func (v *LayerDetails) KeyHelp() string
- func (v *LayerDetails) Name() string
- func (v *LayerDetails) OnLayoutChange() error
- func (v *LayerDetails) Render() error
- func (v *LayerDetails) SetCursor(x, y int) error
- func (v *LayerDetails) Setup(body, header *gocui.View) error
- func (v *LayerDetails) Update() error
- type Renderer
- type Status
- func (v *Status) AddHelpKeys(keys ...*key.Binding)
- func (v *Status) IsVisible() bool
- func (v *Status) KeyHelp() string
- func (v *Status) Layout(g *gocui.Gui, minX, minY, maxX, maxY int) error
- func (v *Status) Name() string
- func (v *Status) OnLayoutChange() error
- func (v *Status) Render() error
- func (v *Status) RequestedSize(available int) *int
- func (v *Status) SetCurrentView(r Helper)
- func (v *Status) Setup(view *gocui.View) error
- func (v *Status) Update() error
- type ViewExtractListener
- type ViewOptionChangeListener
- type Views
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CursorDown ¶
CursorDown moves the cursor down in the currently selected gocui pane, scrolling the screen as needed.
func CursorStep ¶
Moves the cursor the given step distance, setting the origin to the new cursor line
Types ¶
type Debug ¶ added in v0.9.2
type Debug struct {
// contains filtered or unexported fields
}
Debug is just for me :)
func (*Debug) IsVisible ¶ added in v0.9.2
IsVisible indicates if the status view pane is currently initialized.
func (*Debug) OnLayoutChange ¶ added in v0.9.2
OnLayoutChange is called whenever the screen dimensions are changed
func (*Debug) RequestedSize ¶ added in v0.9.2
func (*Debug) SetCurrentView ¶ added in v0.9.2
type FileTree ¶
type FileTree struct {
// contains filtered or unexported fields
}
FileTree holds the UI objects and data models for populating the right pane. Specifically the pane that shows selected layer or aggregate file ASCII tree.
func (*FileTree) AddViewExtractListener ¶ added in v0.13.0
func (v *FileTree) AddViewExtractListener(listener ...ViewExtractListener)
func (*FileTree) AddViewOptionChangeListener ¶
func (v *FileTree) AddViewOptionChangeListener(listener ...ViewOptionChangeListener)
func (*FileTree) CursorDown ¶
CursorDown moves the cursor down and renders the view. Note: we cannot use the gocui buffer since any state change requires writing the entire tree to the buffer. Instead we are keeping an upper and lower bounds of the tree string to render and only flushing this range into the view buffer. This is much faster when tree sizes are large.
func (*FileTree) CursorLeft ¶
CursorLeft moves the cursor up until we reach the Parent Node or top of the tree
func (*FileTree) CursorRight ¶
CursorRight descends into directory expanding it if needed
func (*FileTree) CursorUp ¶
CursorUp moves the cursor up and renders the view. Note: we cannot use the gocui buffer since any state change requires writing the entire tree to the buffer. Instead we are keeping an upper and lower bounds of the tree string to render and only flushing this range into the view buffer. This is much faster when tree sizes are large.
func (*FileTree) IsVisible ¶
IsVisible indicates if the file tree view pane is currently initialized
func (*FileTree) KeyHelp ¶
KeyHelp indicates all the possible actions a user can take while the current pane is selected.
func (*FileTree) OnLayoutChange ¶
OnLayoutChange is called by the UI framework to inform the view-model of the new screen dimensions
func (*FileTree) RequestedSize ¶ added in v0.9.2
func (*FileTree) SetFilterRegex ¶
func (*FileTree) SetTree ¶
SetTreeByLayer populates the view model by stacking the indicated image layer file trees.
type Filter ¶
type Filter struct {
// contains filtered or unexported fields
}
Filter holds the UI objects and data models for populating the bottom row. Specifically the pane that allows the user to filter the file tree by path.
func (*Filter) AddFilterEditListener ¶
func (v *Filter) AddFilterEditListener(listener ...FilterEditListener)
func (*Filter) Edit ¶
Edit intercepts the key press events in the filer view to update the file view in real time.
func (*Filter) KeyHelp ¶
KeyHelp indicates all the possible actions a user can take while the current pane is selected.
func (*Filter) OnLayoutChange ¶ added in v0.9.2
OnLayoutChange is called whenever the screen dimensions are changed
func (*Filter) Render ¶
Render flushes the state objects to the screen. Currently this is the users path filter input.
func (*Filter) RequestedSize ¶ added in v0.9.2
func (*Filter) Setup ¶
Setup initializes the UI concerns within the context of a global gocui view object.
func (*Filter) ToggleVisible ¶
ToggleFilterView shows/hides the file tree filter pane.
type FilterEditListener ¶
type ImageDetails ¶ added in v0.11.0
type ImageDetails struct {
// contains filtered or unexported fields
}
func (*ImageDetails) CursorDown ¶ added in v0.11.0
func (v *ImageDetails) CursorDown() error
func (*ImageDetails) CursorUp ¶ added in v0.11.0
func (v *ImageDetails) CursorUp() error
func (*ImageDetails) IsVisible ¶ added in v0.11.0
func (v *ImageDetails) IsVisible() bool
IsVisible indicates if the details view pane is currently initialized.
func (*ImageDetails) KeyHelp ¶ added in v0.11.0
func (v *ImageDetails) KeyHelp() string
KeyHelp indicates all the possible actions a user can take while the current pane is selected (currently does nothing).
func (*ImageDetails) Name ¶ added in v0.11.0
func (v *ImageDetails) Name() string
func (*ImageDetails) OnLayoutChange ¶ added in v0.11.0
func (v *ImageDetails) OnLayoutChange() error
func (*ImageDetails) PageDown ¶ added in v0.11.0
func (v *ImageDetails) PageDown() error
func (*ImageDetails) PageUp ¶ added in v0.11.0
func (v *ImageDetails) PageUp() error
func (*ImageDetails) Render ¶ added in v0.11.0
func (v *ImageDetails) Render() error
Render flushes the state objects to the screen. The details pane reports: 1. the image efficiency score 2. the estimated wasted image space 3. a list of inefficient file allocations
func (*ImageDetails) Setup ¶ added in v0.11.0
func (v *ImageDetails) Setup(body, header *gocui.View) error
func (*ImageDetails) Update ¶ added in v0.11.0
func (v *ImageDetails) Update() error
Update refreshes the state objects for future rendering.
type Layer ¶
type Layer struct {
// contains filtered or unexported fields
}
Layer holds the UI objects and data models for populating the lower-left pane. Specifically the pane that shows the image layers and layer selector.
func (*Layer) AddLayerChangeListener ¶
func (v *Layer) AddLayerChangeListener(listener ...LayerChangeListener)
func (*Layer) CompareMode ¶
func (v *Layer) CompareMode() viewmodel.LayerCompareMode
func (*Layer) ConstrainLayout ¶ added in v0.9.2
func (v *Layer) ConstrainLayout()
func (*Layer) CurrentLayer ¶
CurrentLayer returns the Layer object currently selected.
func (*Layer) CursorDown ¶
CursorDown moves the cursor down in the layer pane (selecting a higher layer).
func (*Layer) ExpandLayout ¶ added in v0.9.2
func (v *Layer) ExpandLayout()
func (*Layer) KeyHelp ¶
KeyHelp indicates all the possible actions a user can take while the current pane is selected.
func (*Layer) LayerCount ¶ added in v0.9.2
func (*Layer) OnLayoutChange ¶ added in v0.9.2
OnLayoutChange is called whenever the screen dimensions are changed
func (*Layer) Render ¶
Render flushes the state objects to the screen. The layers pane reports: 1. the layers of the image + metadata 2. the current selected image
func (*Layer) SetCursor ¶
SetCursor resets the cursor and orients the file tree view based on the given layer index.
type LayerChangeListener ¶
type LayerChangeListener func(viewmodel.LayerSelection) error
type LayerDetails ¶ added in v0.11.0
func (*LayerDetails) CursorDown ¶ added in v0.11.0
func (v *LayerDetails) CursorDown() error
CursorDown moves the cursor up in the details pane
func (*LayerDetails) CursorUp ¶ added in v0.11.0
func (v *LayerDetails) CursorUp() error
CursorUp moves the cursor up in the details pane
func (*LayerDetails) IsVisible ¶ added in v0.11.0
func (v *LayerDetails) IsVisible() bool
IsVisible indicates if the details view pane is currently initialized.
func (*LayerDetails) KeyHelp ¶ added in v0.11.0
func (v *LayerDetails) KeyHelp() string
KeyHelp indicates all the possible actions a user can take while the current pane is selected (currently does nothing).
func (*LayerDetails) Name ¶ added in v0.11.0
func (v *LayerDetails) Name() string
func (*LayerDetails) OnLayoutChange ¶ added in v0.11.0
func (v *LayerDetails) OnLayoutChange() error
func (*LayerDetails) Render ¶ added in v0.11.0
func (v *LayerDetails) Render() error
Render flushes the state objects to the screen. The details pane reports the currently selected layer's: 1. tags 2. ID 3. digest 4. command
func (*LayerDetails) SetCursor ¶ added in v0.11.0
func (v *LayerDetails) SetCursor(x, y int) error
func (*LayerDetails) Setup ¶ added in v0.11.0
func (v *LayerDetails) Setup(body, header *gocui.View) error
func (*LayerDetails) Update ¶ added in v0.11.0
func (v *LayerDetails) Update() error
Update refreshes the state objects for future rendering.
type Status ¶
type Status struct {
// contains filtered or unexported fields
}
Status holds the UI objects and data models for populating the bottom-most pane. Specifically the panel shows the user a set of possible actions to take in the window and currently selected pane.
func (*Status) AddHelpKeys ¶
func (*Status) KeyHelp ¶
KeyHelp indicates all the possible global actions a user can take when any pane is selected.
func (*Status) OnLayoutChange ¶ added in v0.9.2
OnLayoutChange is called whenever the screen dimensions are changed
func (*Status) RequestedSize ¶ added in v0.9.2
func (*Status) SetCurrentView ¶
type ViewExtractListener ¶ added in v0.13.0
type ViewOptionChangeListener ¶
type ViewOptionChangeListener func() error