Documentation ¶
Index ¶
- type App
- func (app *App) AddContext(text string)
- func (app *App) Search()
- func (app *App) ShowBlock(client *ethclient.Client, numberOrHash any)
- func (app *App) ShowChainSummary(client *ethclient.Client)
- func (app *App) ShowTransaction(client *ethclient.Client, hash string)
- func (app *App) UpdateContext(text string)
- func (app *App) UpdateControls(controls *ControlMapping)
- type Context
- type Control
- type ControlMapping
- type Controls
- type NormalKeyControls
- type SearchType
- type SpecialKeyControls
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
type App struct { *tview.Application Context *Context Control *Controls Main *tview.Flex // contains filtered or unexported fields }
func (*App) AddContext ¶
Add adds the given text to the context view without clearing the existing text
func (*App) ShowChainSummary ¶
func (*App) ShowTransaction ¶
func (*App) UpdateContext ¶
Update updates the context view with the given text
func (*App) UpdateControls ¶
func (app *App) UpdateControls(controls *ControlMapping)
UpdateControls updates what controls the app can use and displays them in the control view
type Context ¶
Context is the view that displays the current context of the application, usually the chain URL and ID, but also errors and loading messages
type Control ¶
type Control struct { Key string Description string // Order is used to sort controls when displayed to the user. Default controls are always first Order uint Fn func() }
Control is a key press that triggers a function
type ControlMapping ¶
type ControlMapping struct { NormalControls NormalKeyControls SpecialControls SpecialKeyControls }
ControlMapping is a mapping of controls to their key and description
type Controls ¶
Controls is the view that displays the current controls available to the user
func NewControlView ¶
func NewControlView() *Controls
type NormalKeyControls ¶
NormalKeyControls is a mapping of a "normal" key press (rune) to a Control
type SearchType ¶
type SearchType string
const ( BlockNumber SearchType = "Block Number" Hash SearchType = "Hash" )
type SpecialKeyControls ¶
type SpecialKeyControls map[tcell.Key]Control
SpecialKeyControls is a mapping of a "special" key press (e.g. CTRL+C) to a Control