Documentation ¶
Index ¶
- func DrawHelp(keyBindings map[string][]string, v *gocui.View)
- func LoadActionsView(ctx context.Context, list *ListWidget) error
- type CommandPanelWidget
- type ItemWidget
- func (w *ItemWidget) GetContent() string
- func (w *ItemWidget) GetContentType() handlers.ExpanderResponseType
- func (w *ItemWidget) Layout(g *gocui.Gui) error
- func (w *ItemWidget) PageDown()
- func (w *ItemWidget) PageUp()
- func (w *ItemWidget) SetContent(content string, contentType handlers.ExpanderResponseType, title string)
- type ListWidget
- func (w *ListWidget) ChangeSelection(i int)
- func (w *ListWidget) ClearFilter()
- func (w *ListWidget) CurrentExpandedItem() *handlers.TreeNode
- func (w *ListWidget) CurrentItem() *handlers.TreeNode
- func (w *ListWidget) CurrentSelection() int
- func (w *ListWidget) ExpandCurrentSelection()
- func (w *ListWidget) GoBack()
- func (w *ListWidget) HasCurrentItem() bool
- func (w *ListWidget) Layout(g *gocui.Gui) error
- func (w *ListWidget) MoveDown()
- func (w *ListWidget) MoveEnd()
- func (w *ListWidget) MoveHome()
- func (w *ListWidget) MovePageDown()
- func (w *ListWidget) MovePageUp()
- func (w *ListWidget) MoveUp()
- func (w *ListWidget) Navigate(nodes []*handlers.TreeNode, content handlers.ExpanderResponse, title string)
- func (w *ListWidget) Refresh()
- func (w *ListWidget) SetNodes(nodes []*handlers.TreeNode)
- type NotificationWidget
- type Page
- type Stack
- type StatusbarWidget
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadActionsView ¶
func LoadActionsView(ctx context.Context, list *ListWidget) error
LoadActionsView Shows available actions for the current resource
Types ¶
type CommandPanelWidget ¶ added in v1.1.333
type CommandPanelWidget struct {
// contains filtered or unexported fields
}
CommandPanelWidget controls the notifications windows in the top right
func NewCommandPanelWidget ¶ added in v1.1.333
func NewCommandPanelWidget(x, y, w int, g *gocui.Gui) *CommandPanelWidget
NewCommandPanelWidget create new instance and start go routine for spinner
func (*CommandPanelWidget) Layout ¶ added in v1.1.333
func (w *CommandPanelWidget) Layout(g *gocui.Gui) error
Layout draws the widget in the gocui view
func (*CommandPanelWidget) ShowWithText ¶ added in v1.1.333
func (w *CommandPanelWidget) ShowWithText(s string)
ShowWithText launches the command panel pre-populated with some text
func (*CommandPanelWidget) ToggleShowHide ¶ added in v1.1.333
func (w *CommandPanelWidget) ToggleShowHide()
ToggleShowHide shows and hides the command panel
type ItemWidget ¶
type ItemWidget struct {
// contains filtered or unexported fields
}
ItemWidget is response for showing the text response from the Rest requests
func NewItemWidget ¶
func NewItemWidget(x, y, w, h int, hideGuids bool, content string) *ItemWidget
NewItemWidget creates a new instance of ItemWidget
func (*ItemWidget) GetContent ¶
func (w *ItemWidget) GetContent() string
GetContent returns the current content
func (*ItemWidget) GetContentType ¶ added in v1.1.363
func (w *ItemWidget) GetContentType() handlers.ExpanderResponseType
GetContentType returns the current content type
func (*ItemWidget) Layout ¶
func (w *ItemWidget) Layout(g *gocui.Gui) error
Layout draws the widget in the gocui view
func (*ItemWidget) PageDown ¶ added in v1.1.251
func (w *ItemWidget) PageDown()
PageDown move the view down a page
func (*ItemWidget) PageUp ¶ added in v1.1.251
func (w *ItemWidget) PageUp()
PageUp move the view a page up
func (*ItemWidget) SetContent ¶
func (w *ItemWidget) SetContent(content string, contentType handlers.ExpanderResponseType, title string)
SetContent displays the string in the itemview
type ListWidget ¶
type ListWidget struct { FullscreenKeyBinding string ActionKeyBinding string // contains filtered or unexported fields }
ListWidget hosts the left panel showing resources and controls the navigation
func NewListWidget ¶
func NewListWidget(ctx context.Context, x, y, w, h int, items []string, selected int, contentView *ItemWidget, status *StatusbarWidget, enableTracing bool, title string, g *gocui.Gui) *ListWidget
NewListWidget creates a new instance
func (*ListWidget) ChangeSelection ¶
func (w *ListWidget) ChangeSelection(i int)
ChangeSelection updates the selected item
func (*ListWidget) ClearFilter ¶ added in v1.1.333
func (w *ListWidget) ClearFilter()
ClearFilter clears a filter if applied
func (*ListWidget) CurrentExpandedItem ¶
func (w *ListWidget) CurrentExpandedItem() *handlers.TreeNode
CurrentExpandedItem returns the currently expanded item as a treenode
func (*ListWidget) CurrentItem ¶
func (w *ListWidget) CurrentItem() *handlers.TreeNode
CurrentItem returns the selected item as a treenode
func (*ListWidget) CurrentSelection ¶
func (w *ListWidget) CurrentSelection() int
CurrentSelection returns the current selection int
func (*ListWidget) ExpandCurrentSelection ¶
func (w *ListWidget) ExpandCurrentSelection()
ExpandCurrentSelection opens the resource Sub->RG for example
func (*ListWidget) GoBack ¶
func (w *ListWidget) GoBack()
GoBack takes the user back to preview view
func (*ListWidget) HasCurrentItem ¶ added in v1.1.307
func (w *ListWidget) HasCurrentItem() bool
HasCurrentItem indicates whether there is a current item
func (*ListWidget) Layout ¶
func (w *ListWidget) Layout(g *gocui.Gui) error
Layout draws the widget in the gocui view
func (*ListWidget) MoveDown ¶ added in v1.1.230
func (w *ListWidget) MoveDown()
MoveDown moves the selection down one item
func (*ListWidget) MoveEnd ¶ added in v1.1.104
func (w *ListWidget) MoveEnd()
MoveEnd changes the selection to the bottom of the list
func (*ListWidget) MoveHome ¶ added in v1.1.104
func (w *ListWidget) MoveHome()
MoveHome changes the selection to the top of the list
func (*ListWidget) MovePageDown ¶ added in v1.1.104
func (w *ListWidget) MovePageDown()
MovePageDown changes the selection to be a page further down the list
func (*ListWidget) MovePageUp ¶ added in v1.1.104
func (w *ListWidget) MovePageUp()
MovePageUp changes the selection to be a page further up the list
func (*ListWidget) MoveUp ¶ added in v1.1.230
func (w *ListWidget) MoveUp()
MoveUp moves the selection up one item
func (*ListWidget) Navigate ¶ added in v1.1.307
func (w *ListWidget) Navigate(nodes []*handlers.TreeNode, content handlers.ExpanderResponse, title string)
Navigate updates the currently selected list nodes, title and details content
func (*ListWidget) SetNodes ¶
func (w *ListWidget) SetNodes(nodes []*handlers.TreeNode)
SetNodes allows others to set the list nodes
type NotificationWidget ¶ added in v1.1.170
type NotificationWidget struct { ConfirmDeleteKeyBinding string ClearPendingDeletesKeyBinding string // contains filtered or unexported fields }
NotificationWidget controls the notifications windows in the top right
func NewNotificationWidget ¶ added in v1.1.170
func NewNotificationWidget(x, y, w int, hideGuids bool, g *gocui.Gui) *NotificationWidget
NewNotificationWidget create new instance and start go routine for spinner
func (*NotificationWidget) AddPendingDelete ¶ added in v1.1.170
func (w *NotificationWidget) AddPendingDelete(item *handlers.TreeNode)
AddPendingDelete queues deletes for delete once confirmed
func (*NotificationWidget) ClearPendingDeletes ¶ added in v1.1.170
func (w *NotificationWidget) ClearPendingDeletes()
ClearPendingDeletes removes all pending deletes
func (*NotificationWidget) ConfirmDelete ¶ added in v1.1.170
func (w *NotificationWidget) ConfirmDelete()
ConfirmDelete delete all queued/pending deletes
type Page ¶
type Page struct { Value []*handlers.TreeNode Data string DataType handlers.ExpanderResponseType Title string Selection int ExpandedNodeItem *handlers.TreeNode }
Page represents a previous view in the nav stack
type Stack ¶
type Stack struct {
// contains filtered or unexported fields
}
Stack is a basic LIFO stack that resizes as needed.
type StatusbarWidget ¶
type StatusbarWidget struct { HelpKeyBinding string // contains filtered or unexported fields }
StatusbarWidget controls the statusbar
func NewStatusbarWidget ¶
func NewStatusbarWidget(x, y, w int, hideGuids bool, g *gocui.Gui) *StatusbarWidget
NewStatusbarWidget create new instance and start go routine for spinner
func (*StatusbarWidget) Layout ¶
func (w *StatusbarWidget) Layout(g *gocui.Gui) error
Layout draws the widget in the gocui view
func (*StatusbarWidget) Status ¶
func (w *StatusbarWidget) Status(message string, loading bool) func()
Status updates the message in the status bar and whether to show loading indicator