tui

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2026 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInteractiveRequired = errors.New("interactive required")
	ErrBlockingRequired    = errors.New("blocking required")
)
View Source
var ErrNoConfig = fmt.Errorf("config not found")

Functions

func Run

func Run(cfg *config.Config, ver string) error

Types

type CommandRunner added in v0.1.0

type CommandRunner interface {
	Run(ctx context.Context, input string) (stdout, stderr string, err error)
}
var Runner CommandRunner

type ErrorClearedMsg

type ErrorClearedMsg struct{}

type Model

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

func NewModel

func NewModel(ctx *tuicontext.ProgramContext) Model

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) Update

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

func (Model) View

func (m Model) View() tea.View

type Task

type Task struct {
	ID        string
	Name      string
	Status    TaskStatus
	Message   string
	Err       error
	StartTime time.Time
	EndTime   time.Time
}

type TaskClearedMsg

type TaskClearedMsg struct {
	TaskID string
}

type TaskFinishedMsg

type TaskFinishedMsg struct {
	TaskID  string
	Name    string
	Message string
	Err     error
}

type TaskProgressMsg

type TaskProgressMsg struct {
	TaskID  string
	Message string
}

type TaskStartedMsg

type TaskStartedMsg struct {
	TaskID string
	Name   string
}

type TaskStatus

type TaskStatus int
const (
	TaskRunning TaskStatus = iota
	TaskSuccess
	TaskFailed
)

Jump to

Keyboard shortcuts

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