output

package
v0.9.6 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TUI    = "tui"
	Native = "native"
)

Variables

View Source
var AvailableStyles = []string{TUI, Native}

Functions

func NativeCatalog

func NativeCatalog(cmd *cobra.Command)

NativeCatalog displays the repository catalog in a simple text format.

func NativeHandler

func NativeHandler(cmd *cobra.Command, channels []Channel)

NativeHandler is a simple output Handler that batches and prints output from each repository's channels in sequence. It is straightforward and compatible with all terminal environments, but lacks interactivity and modern UI features.

func NativeLabels

func NativeLabels(cmd *cobra.Command, verbose bool, filters ...string)

NativeLabels prints labels in the native/terminal output format. When no filters are provided, it prints all available labels and their repositories. When filters are provided, it prints a set-theory representation of the filter and matched repos.

func TUICatalog

func TUICatalog(cmd *cobra.Command)

TUICatalog displays the repository catalog using a TUI for an interactive experience.

func TUIHandler

func TUIHandler(cmd *cobra.Command, channels []Channel)

TUIHandler is an OutputHandler that uses a TUI to provide a modern, interactive interface. It displays repository progress with styled output, real-time updates, and a cleaner visual presentation.

func TUILabels

func TUILabels(cmd *cobra.Command, verbose bool, filters ...string)

TUILabels displays labels using a TUI for an interactive experience. When no filters are provided, it displays all available labels with their repositories. When filters are provided, it displays a concise set-theory representation with matched repos.

Types

type CatalogHandler

type CatalogHandler func(cmd *cobra.Command)

CatalogHandler represents a function for displaying the repository catalog.

func GetCatalogHandler

func GetCatalogHandler(ctx context.Context) CatalogHandler

GetCatalogHandler returns a CatalogHandler based on the configuration.

type Channel

type Channel interface {
	// Name returns the name of the channel.
	Name() string

	// Out returns the output channel for reading.
	Out() <-chan string
	// Err returns the error channel for reading.
	Err() <-chan error

	// WOut returns the output channel for writing.
	WOut() chan<- string
	// WErr returns the error channel for writing.
	WErr() chan<- error

	// Start begins processing with the specified weight for semaphore acquisition.
	// The returned function should be called when processing is complete to release
	// the semaphore and clean up channels. If a waitgroup is provided, it will be
	// decremented when the returned function is called.
	Start(weight int64) (done func(), err error)
}

func NewChannel

func NewChannel(ctx context.Context, name string, sem *semaphore.Weighted, wg *sync.WaitGroup) Channel

type Handler

type Handler func(cmd *cobra.Command, channels []Channel)

Handler represents a function for processing streaming command output.

func GetHandler

func GetHandler(ctx context.Context) Handler

GetHandler returns an output Handler based on the configuration.

type LabelHandler

type LabelHandler func(cmd *cobra.Command, verbose bool, filters ...string)

LabelHandler represents a function for displaying labels.

func GetLabelHandler

func GetLabelHandler(ctx context.Context) LabelHandler

GetLabelHandler returns a LabelHandler based on the configuration.

Jump to

Keyboard shortcuts

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