Documentation
¶
Index ¶
- Constants
- Variables
- func NativeCatalog(cmd *cobra.Command)
- func NativeHandler(cmd *cobra.Command, channels []Channel)
- func NativeLabels(cmd *cobra.Command, verbose bool, filters ...string)
- func TUICatalog(cmd *cobra.Command)
- func TUIHandler(cmd *cobra.Command, channels []Channel)
- func TUILabels(cmd *cobra.Command, verbose bool, filters ...string)
- type CatalogHandler
- type Channel
- type Handler
- type LabelHandler
Constants ¶
const ( TUI = "tui" Native = "native" )
Variables ¶
var AvailableStyles = []string{TUI, Native}
Functions ¶
func NativeCatalog ¶
NativeCatalog displays the repository catalog in a simple text format.
func NativeHandler ¶
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 ¶
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 ¶
TUICatalog displays the repository catalog using a TUI for an interactive experience.
func TUIHandler ¶
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.
Types ¶
type CatalogHandler ¶
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)
}
type Handler ¶
Handler represents a function for processing streaming command output.
func GetHandler ¶
GetHandler returns an output Handler based on the configuration.
type LabelHandler ¶
LabelHandler represents a function for displaying labels.
func GetLabelHandler ¶
func GetLabelHandler(ctx context.Context) LabelHandler
GetLabelHandler returns a LabelHandler based on the configuration.