Documentation
¶
Overview ¶
Package uxBlock provides building blocks for UX and communication with a user.
Index ¶
- func NewBlock(outputLogger logger.Logger, debugFileLogger logger.Logger, isTerminal bool, ...) *uxBlocks
- func XXX(cmdList ...tea.Cmd) func() tea.Msg
- type MergeMessage
- type PromptOption
- type SelectOption
- type Spinner
- type SpinnerOption
- type TableBody
- type TableCell
- type TableOption
- type TableRow
- type UxBlocks
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MergeMessage ¶
type PromptOption ¶
type PromptOption = func(cfg *promptConfig)
type SelectOption ¶
type SelectOption = func(cfg *selectConfig)
func SelectEnableMultiSelect ¶
func SelectEnableMultiSelect() SelectOption
func SelectLabel ¶
func SelectLabel(label string) SelectOption
func SelectTableHeader ¶
func SelectTableHeader(header *TableRow) SelectOption
type SpinnerOption ¶
type SpinnerOption = func(cfg *spinnerConfig)
type TableBody ¶
type TableBody struct {
// contains filtered or unexported fields
}
func NewTableBody ¶
func NewTableBody() *TableBody
func (*TableBody) AddStringsRow ¶
func (*TableBody) AddStringsRows ¶
type TableOption ¶
type TableOption = func(cfg *tableConfig)
func WithTableHeader ¶
func WithTableHeader(header *TableRow) TableOption
type TableRow ¶
type TableRow struct {
// contains filtered or unexported fields
}
func NewTableRow ¶
func NewTableRow() *TableRow
func (*TableRow) AddStringCell ¶
func (*TableRow) AddStringCells ¶
type UxBlocks ¶
type UxBlocks interface {
LogDebug(message string)
PrintInfo(line styles.Line)
PrintWarning(line styles.Line)
PrintError(line styles.Line)
Table(body *TableBody, auxOptions ...TableOption)
Select(ctx context.Context, tableBody *TableBody, auxOptions ...SelectOption) ([]int, error)
Prompt(
ctx context.Context,
message string,
choices []string,
auxOptions ...PromptOption,
) (int, error)
RunSpinners(ctx context.Context, spinners []*Spinner, auxOptions ...SpinnerOption) func()
}
Click to show internal directories.
Click to hide internal directories.