models

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Choosable added in v0.0.39

type Choosable interface {
	comparable

	Key() string
	String() string

	Singular() string
	Plural() string
}

type Fetcher added in v0.0.39

type Fetcher[T Choosable] struct {
	Flag, Plural, Singular string

	Creatable bool
	// contains filtered or unexported fields
}

func (*Fetcher[T]) Init added in v0.0.39

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

func (*Fetcher[T]) Update added in v0.0.39

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

func (*Fetcher[T]) View added in v0.0.39

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

type Selector

type Selector[T Choosable] struct {
	Prompt  string
	Flag    string
	Choices []ui.ListItem[T]

	ChoiceCh chan<- T
	// 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

Jump to

Keyboard shortcuts

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