source

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert2BubbleItems

func Convert2BubbleItems[T ListItem](items []T) []list.Item

convert2BubbleItems converts a slice of type T to a slice of type list.Item

Types

type List

type List struct {
	list.Model

	Title string
	// contains filtered or unexported fields
}

func NewList

func NewList(title string, items []ListItem) *List

func (*List) IsActive

func (l *List) IsActive() bool

func (*List) SelectedItem

func (l *List) SelectedItem() ListItem

func (*List) SetActive

func (l *List) SetActive(active bool)

func (*List) SetItems

func (l *List) SetItems(items []ListItem)

func (*List) Update

func (l *List) Update(msg tea.Msg) (*List, tea.Cmd)

type ListItem

type ListItem interface {
	String() string
	Children() []ListItem
	FilterValue() string
}

func Convert2ListItems

func Convert2ListItems[T ListItem](items []T) []ListItem

convert2ListItems converts a slice of type T to a slice of type ListItem

func ConvertInterface2ListItems

func ConvertInterface2ListItems(items interface{}) []ListItem

convertInterface2ListItems converts a slice to a slice of type ListItem

type Source

type Source interface {
	Init(stateChan chan state.State) tea.Cmd
	Columns() []*List
	Logs(ctx context.Context, stateChan chan state.State, logChan chan string) tea.Cmd
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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