models

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2025 License: MIT Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 ConfigVia added in v0.1.2

type ConfigVia struct {
	Config        *cli.Config
	ConfigFetchFn cli.ConfigFetchFunc

	Flag, Singular string
}

func (*ConfigVia) Init added in v0.1.2

func (m *ConfigVia) Init() tea.Cmd

func (*ConfigVia) Update added in v0.1.2

func (m *ConfigVia) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*ConfigVia) View added in v0.1.2

func (m *ConfigVia) View() 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