tui

package
v0.0.0-...-e64805f Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(downloadSize int64, resInfo IResInfo, interruptChan chan bool)

Types

type IResInfo

type IResInfo interface {
	GetTotalSize() int64
	GetDownloadedSize() int64
	GetDownloadSpeed() float64
}

type Model

type Model struct {
	PW            *ProgressWriter
	Progress      progress.Model
	Err           error
	InterruptChan chan bool
}

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (Model) View

func (m Model) View() string

type ProgressWriter

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

func (*ProgressWriter) Start

func (pw *ProgressWriter) Start(resInfo IResInfo)

func (*ProgressWriter) Write

func (pw *ProgressWriter) Write() error

Jump to

Keyboard shortcuts

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