tui

package
v0.0.0-...-2ee96bb Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clear

func Clear()

Clear only clear from pointer

func GetChoice

func GetChoice(options []string) string

func InitList

func InitList(listItem []string, title string) string

func Input

func Input(text string) string

func Table

func Table(cols []string, rows [][]string)

Types

type ChoiceModel

type ChoiceModel struct {
	// contains filtered or unexported fields
}

func (ChoiceModel) Init

func (m ChoiceModel) Init() tea.Cmd

func (ChoiceModel) Update

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

func (ChoiceModel) View

func (m ChoiceModel) View() string

type DownloadProgressModel

type DownloadProgressModel struct {
	Pw       *DownloadProgressWriter
	Progress progress.Model
	// contains filtered or unexported fields
}

func (DownloadProgressModel) Init

func (m DownloadProgressModel) Init() tea.Cmd

func (DownloadProgressModel) Update

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

func (DownloadProgressModel) View

func (m DownloadProgressModel) View() string

type DownloadProgressWriter

type DownloadProgressWriter struct {
	Total int

	File       *os.File
	Reader     io.Reader
	OnProgress func(float64)
	// contains filtered or unexported fields
}

func (*DownloadProgressWriter) Start

func (pw *DownloadProgressWriter) Start(p *tea.Program)

func (*DownloadProgressWriter) Write

func (pw *DownloadProgressWriter) Write(p []byte) (int, error)

type InputModel

type InputModel struct {
	// contains filtered or unexported fields
}

func (InputModel) Init

func (m InputModel) Init() tea.Cmd

func (InputModel) Update

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

func (InputModel) View

func (m InputModel) View() string

type ListModel

type ListModel struct {
	// contains filtered or unexported fields
}

func (ListModel) Init

func (m ListModel) Init() tea.Cmd

func (*ListModel) Update

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

func (ListModel) View

func (m ListModel) View() string

type ProgressErrMsg

type ProgressErrMsg struct {
	// contains filtered or unexported fields
}

type ProgressMsg

type ProgressMsg float64

type SpinnerModel

type SpinnerModel struct {
	Prompt string
	// contains filtered or unexported fields
}

func InitialSpinnerModel

func InitialSpinnerModel() SpinnerModel

InitialSpinnerModel returns a new SpinnerModel

func (SpinnerModel) Init

func (m SpinnerModel) Init() tea.Cmd

func (SpinnerModel) Update

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

func (SpinnerModel) View

func (m SpinnerModel) View() string

type TableModel

type TableModel struct {
	// contains filtered or unexported fields
}

func (TableModel) Init

func (m TableModel) Init() tea.Cmd

func (TableModel) Update

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

func (TableModel) View

func (m TableModel) View() string

Jump to

Keyboard shortcuts

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