progress

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyMap

type KeyMap struct {
	// Keybindings used when browsing the list.
	CursorUp   key.Binding
	CursorDown key.Binding
	NextPage   key.Binding
	PrevPage   key.Binding

	// Help toggle keybindings.
	ShowFullHelp  key.Binding
	CloseFullHelp key.Binding

	// The quit keybinding. This won't be caught when filtering.
	Quit key.Binding

	// The quit-no-matter-what keybinding. This will be caught when filtering.
	ForceQuit key.Binding
}

KeyMap defines keybindings. It satisfies to the help.KeyMap interface, which is used to render the menu menu.

func DefaultKeyMap

func DefaultKeyMap() KeyMap

DefaultKeyMap returns a default set of keybindings.

type Progress

type Progress struct {
	common.Common
	KeyMap KeyMap
	// contains filtered or unexported fields
}

func New

func New(c common.Common, targetBlock uint64) *Progress

func (*Progress) FullHelp

func (p *Progress) FullHelp() [][]key.Binding

func (*Progress) Init

func (p *Progress) Init() tea.Cmd

func (*Progress) SetSize

func (p *Progress) SetSize(w, h int)

func (*Progress) ShortHelp

func (p *Progress) ShortHelp() []key.Binding

func (*Progress) Update

func (p *Progress) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*Progress) View

func (p *Progress) View() string

Jump to

Keyboard shortcuts

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