app

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 31, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFocusTracker

func NewFocusTracker() fx.Option

func NewTviewApp

func NewTviewApp(cfg *config.Config, grid *tview.Grid) *tview.Application

NewTviewApp creates tview.Application

func NewTviewGrid

func NewTviewGrid(cfg *config.Config) *tview.Grid

NewTviewGrid creates a tview.Grid

func Schedule

func Schedule(widget block.Schedulable)

Schedule queues widgets for data refresh on a timer

Types

type FocusState

type FocusState int

type FocusTracker

type FocusTracker struct {
	App       *tview.Application
	Idx       int
	IsFocused bool
	Widgets   []block.Block

	Config *config.Config
}

func (*FocusTracker) Next

func (tracker *FocusTracker) Next()

Next sets the focus on the next widget in the widget list. If the current widget is the last widget, sets focus on the first widget.

func (*FocusTracker) None

func (tracker *FocusTracker) None()

None removes focus from the currently-focused widget.

func (*FocusTracker) Prev

func (tracker *FocusTracker) Prev()

Prev sets the focus on the previous widget in the widget list. If the current widget is the last widget, sets focus on the last widget.

func (*FocusTracker) Refocus

func (tracker *FocusTracker) Refocus()

type TerminalMonitor

type TerminalMonitor struct {
	App          *tview.Application
	HttpClient   *client.HttpClient
	Blocks       []block.Block
	FocusTracker *FocusTracker
}

TerminalMonitor is the terminal app for ipfs. For now it has some of the ipfs apis implemented and rendered

func Bootstrap

func Bootstrap(ctx context.Context) (*TerminalMonitor, error)

Bootstrap TerminalMonitor using fx

Jump to

Keyboard shortcuts

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