ui

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsoleReporter

type ConsoleReporter struct{}

ConsoleReporter implements Reporter using go-pretty for console output.

func NewConsoleReporter

func NewConsoleReporter() *ConsoleReporter

func (*ConsoleReporter) StartPhase

func (c *ConsoleReporter) StartPhase(name string, total int64, isBytes bool) Phase

type NoOpReporter

type NoOpReporter struct{}

NoOpReporter implements Reporter doing nothing (for tests or silent mode).

func NewNoOpReporter

func NewNoOpReporter() *NoOpReporter

func (*NoOpReporter) StartPhase

func (n *NoOpReporter) StartPhase(name string, total int64, isBytes bool) Phase

type Phase

type Phase interface {
	Increment(n int64)
	Log(msg string)
	Done()
	Error()
}

Phase represents an active progress tracking phase.

type Reporter

type Reporter interface {
	// StartPhase starts a new progress tracking phase.
	// name: Description of the phase.
	// total: Total items/bytes to process. 0 for indeterminate.
	// isBytes: If true, units are bytes, otherwise count.
	StartPhase(name string, total int64, isBytes bool) Phase
}

Reporter defines the interface for progress reporting.

Jump to

Keyboard shortcuts

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