models

package
v0.0.38 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Selector

type Selector[T comparable] struct {
	ChoiceCh chan<- T
	Choices  SelectorChoices[T]
	Prompt   string
	// contains filtered or unexported fields
}

func (*Selector[T]) Init

func (m *Selector[T]) Init() tea.Cmd

func (*Selector[T]) Update

func (m *Selector[T]) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*Selector[T]) View

func (m *Selector[T]) View() string

type SelectorChoices

type SelectorChoices[T comparable] interface {
	Flag() string
	Plural() string
	Singular() string

	ListItems() []ui.ListItem[T]
}

type SelectorFetcher

type SelectorFetcher[T comparable, U SelectorChoices[T]] struct {
	// contains filtered or unexported fields
}

func (*SelectorFetcher[T, U]) Init

func (m *SelectorFetcher[T, U]) Init() tea.Cmd

func (*SelectorFetcher[T, U]) Update

func (m *SelectorFetcher[T, U]) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*SelectorFetcher[T, U]) View

func (m *SelectorFetcher[T, U]) View() string

Jump to

Keyboard shortcuts

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