ui

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Button

type Button struct {
	Name    string
	OnClick func(msgboxWnd *winman.WindowBase)
}

type Commands added in v0.0.5

type Commands struct {
	KeyComb    rune
	CommandKey string
	Text       string
	OnExecute  func()
}

type ComponentLayout

type ComponentLayout struct {
	MenuList     *tview.List
	BookmarkList *tview.TreeView
	LogList      *tview.TextView
	OutputPanel  InitOutputPanelComponents
}

type CreateModalDiaLog

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

type InitOutputPanelComponents added in v0.0.5

type InitOutputPanelComponents struct {
	Layout   *tview.Flex
	TextArea *tview.TextArea
	Buffer   string
}

type ShowMessageBoxParam

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

type UI

type UI struct {
	App    *tview.Application
	WinMan *winman.Manager
	Layout *ComponentLayout

	GRPC          *grpc.GRPC
	Bookmark      *bookmark.Bookmark
	Storage       *storage.Storage
	LogChannel    chan entity.Log
	OutputChannel chan entity.Output

	Theme *entity.Theme
}

func NewUI

func NewUI() UI

func (*UI) ApplyBookmark

func (u *UI) ApplyBookmark(session entity.Session)

func (*UI) CloseModalDialog

func (u *UI) CloseModalDialog(wnd *winman.WindowBase, focus tview.Primitive)

CloseModalDialog is a helper to close the modal dialog window

func (*UI) CreateModalDialog

func (u *UI) CreateModalDialog(param CreateModalDiaLog) *winman.WindowBase

CreateModalDialog is a helper to create a modal dialog window

func (*UI) DeleteBookmark

func (u *UI) DeleteBookmark(b entity.Session) error

DeleteBookmark is used to delete a bookmark from the bookmark tree and save the bookmark

func (*UI) InitBookmarkMenu

func (u *UI) InitBookmarkMenu() *tview.TreeView

InitBookmarkMenu initializes the bookmark sidebar menu

func (*UI) InitBookmarkMenu_SetInputCapture

func (u *UI) InitBookmarkMenu_SetInputCapture(bookmarkList *tview.TreeView)

func (*UI) InitBookmarkMenu_SetSelection

func (u *UI) InitBookmarkMenu_SetSelection(bookmarkList *tview.TreeView)

func (*UI) InitLogList

func (u *UI) InitLogList() *tview.TextView

InitLogList initializes the log panel on the main screen

func (*UI) InitLogList_SetInputCapture

func (u *UI) InitLogList_SetInputCapture(logPanel *tview.TextView)

func (*UI) InitOutputPanel added in v0.0.5

func (u *UI) InitOutputPanel() InitOutputPanelComponents

InitOutputPanel initializes the output panel on the main screen

func (*UI) InitSidebarMenu

func (u *UI) InitSidebarMenu() *tview.List

InitSidebarMenu is used to initialize and populate sidebar menu

func (*UI) InitSidebarMenu_SetInputCapture

func (u *UI) InitSidebarMenu_SetInputCapture(menuList *tview.List)

func (*UI) InvokeRPC

func (u *UI) InvokeRPC()

func (*UI) OverwriteBookmark

func (u *UI) OverwriteBookmark(b *entity.Session) error

OverwriteBookmark is used to overwrite the bookmark with current active session

func (*UI) PrintLog

func (u *UI) PrintLog(param entity.Log)

PrintLog is used to print a log message to the log window

func (*UI) PrintOutput added in v0.0.5

func (u *UI) PrintOutput(param entity.Output)

PrintOutput used to print output to the output panel

func (UI) QuitApplication

func (u UI) QuitApplication()

func (*UI) RefreshBookmarkList

func (u *UI) RefreshBookmarkList() int16

func (UI) Run

func (u UI) Run() error

func (*UI) SetFocus

func (u *UI) SetFocus(p tview.Primitive)

func (*UI) ShowAuthorizationModal

func (u *UI) ShowAuthorizationModal()

ShowAuthorizationModal used to show the authorization modal dialog

func (*UI) ShowAuthorizationModal_SetInputCapture

func (u *UI) ShowAuthorizationModal_SetInputCapture(wnd *winman.WindowBase, txtAuthorization *tview.InputField, currentToken string)

func (*UI) ShowBookmarkCategoryModal

func (u *UI) ShowBookmarkCategoryModal(onSelectedCategory func(wnd winman.Window, b *entity.Category))

func (*UI) ShowBookmarkCategoryModal_SetInputCapture

func (u *UI) ShowBookmarkCategoryModal_SetInputCapture(wnd *winman.WindowBase, list *tview.List)

func (*UI) ShowBookmarkNameModal

func (u *UI) ShowBookmarkNameModal(parentWND winman.Window, onEnter func(bookmarkName string))

ShowBookmarkNameModal is used to show modal with text box to change the bookmark name

func (UI) ShowBookmarkOptionsModal

func (u UI) ShowBookmarkOptionsModal(parentWnd tview.Primitive, bookmark *entity.Session)

ShowBookmarkOptionsModal is used to show the bookmark options modal, to load, overwrite, or remove the bookmark

func (*UI) ShowBookmarkOptionsModal_SetInputCapture

func (u *UI) ShowBookmarkOptionsModal_SetInputCapture(wnd *winman.WindowBase, parentWnd tview.Primitive, listOptions *tview.List)

ShowBookmarkOptionsModal_SetInputCapture sets the input capture for the bookmark options modal

func (*UI) ShowCreateNewCategoryModal

func (u *UI) ShowCreateNewCategoryModal(parentWND *winman.WindowBase, list *tview.List, onSelectedCategory func(wnd winman.Window, b *entity.Category))

ShowCreateNewCategoryModal is used to show modal with text box to create new category

func (*UI) ShowMessageBox

func (u *UI) ShowMessageBox(param ShowMessageBoxParam)

ShowMessageBox is used to show message box with fixed size 50x11

func (*UI) ShowMessageBox_SetComponentActions

func (u *UI) ShowMessageBox_SetComponentActions(wnd *winman.WindowBase, form *tview.Form, buttons []Button)

func (*UI) ShowMessageBox_SetInputCapture

func (u *UI) ShowMessageBox_SetInputCapture(wnd *winman.WindowBase, parent *tview.Form)

func (*UI) ShowMetadataModal

func (u *UI) ShowMetadataModal()

func (*UI) ShowMetadataModal_RefreshMetadataTable

func (u *UI) ShowMetadataModal_RefreshMetadataTable(table *tview.Table)

func (*UI) ShowMetadataModal_SetInputCapture added in v0.0.3

func (u *UI) ShowMetadataModal_SetInputCapture(wnd *winman.WindowBase, table *tview.Table, form *tview.Form)

func (*UI) ShowRequestPayloadModal

func (u *UI) ShowRequestPayloadModal()

ShowRequestPayloadModal is used to show the request payload modal dialog

func (*UI) ShowRequestPayloadModal_SetComponentActions

func (u *UI) ShowRequestPayloadModal_SetComponentActions(wnd *winman.WindowBase, form *tview.Form, txtPayload *tview.TextArea)

func (*UI) ShowRequestPayloadModal_SetInputCapture

func (u *UI) ShowRequestPayloadModal_SetInputCapture(wnd *winman.WindowBase, form *tview.Form)

func (*UI) ShowSaveToBookmarkModal

func (u *UI) ShowSaveToBookmarkModal()

ShowSaveToBookmarkModal used to open the save bookmark dialog to save the current payload to bookmark

func (*UI) ShowSetRequestMethodModal

func (u *UI) ShowSetRequestMethodModal()

ShowSetRequestMethodModal is used to show the RPC method selection modal dialog

func (*UI) ShowSetRequestMethodModal_SetInputCapture

func (u *UI) ShowSetRequestMethodModal_SetInputCapture(wnd *winman.WindowBase, listMethods *tview.List, txtSearch *tview.InputField)

func (*UI) ShowSetServerURLModal

func (u *UI) ShowSetServerURLModal()

func (*UI) ShowSetServerURLModal_SetInputCapture

func (u *UI) ShowSetServerURLModal_SetInputCapture(wnd *winman.WindowBase, inp *tview.InputField)

ShowSetServerURLModal_SetInputCapture handle the input capture from keyboard

Jump to

Keyboard shortcuts

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