component

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: 6 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 = models.Choosable

type Fetcher added in v0.0.39

type Fetcher[T Choosable] struct {
	FetchFn func() ([]T, error)
}

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

func (f *Fetcher[T]) Choices(ctx context.Context, drv *ui.Driver, flag string, creatable bool) ([]T, error)

type Selector added in v0.0.39

type Selector[T Choosable] struct {
	Prompt string
	Flag   string

	Creatable bool

	Choices []T
	Fetcher *Fetcher[T]
}

func (*Selector[T]) Choice added in v0.0.39

func (s *Selector[T]) Choice(ctx context.Context, drv *ui.Driver) (*T, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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