tui

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2023 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const RootVertex = "<root>"

Variables

This section is empty.

Functions

func Follow

func Follow() tea.Msg

Types

type CommandExitMsg

type CommandExitMsg struct {
	Err error
}

type CommandOutMsg

type CommandOutMsg struct {
	Output []byte
}

type Details

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

func (*Details) Focus

func (m *Details) Focus(focus bool)

func (Details) Init

func (m Details) Init() tea.Cmd

func (*Details) Open

func (m *Details) Open() tea.Cmd

func (*Details) SetHeight

func (m *Details) SetHeight(height int)

func (*Details) SetItem

func (m *Details) SetItem(item TreeEntry) tea.Cmd

func (*Details) SetWidth

func (m *Details) SetWidth(width int)

func (Details) Update

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

func (Details) View

func (m Details) View() string

type EditorExitMsg

type EditorExitMsg struct {
	Err error
}

type Group

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

func NewGroup

func NewGroup(id, name string) *Group

func (*Group) Add

func (g *Group) Add(e TreeEntry)

func (*Group) Cached

func (g *Group) Cached() bool

func (*Group) Completed

func (g *Group) Completed() *time.Time

func (*Group) Entries

func (g *Group) Entries() []TreeEntry

func (*Group) Error

func (g *Group) Error() *string

func (*Group) ID

func (g *Group) ID() string

func (*Group) Infinite added in v0.6.0

func (g *Group) Infinite() bool

func (*Group) Inputs

func (g *Group) Inputs() []string

func (*Group) Name

func (g *Group) Name() string

func (*Group) Open

func (g *Group) Open() tea.Cmd

func (*Group) Save

func (g *Group) Save(dir string) (string, error)

func (*Group) ScrollPercent

func (g *Group) ScrollPercent() float64

func (*Group) SetWidth

func (g *Group) SetWidth(w int)

func (*Group) Started

func (g *Group) Started() *time.Time

func (*Group) Update

func (g *Group) Update(msg tea.Msg) (tea.Model, tea.Cmd)

type Item

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

func NewItem

func NewItem(v *progrock.Vertex, width int) *Item

func (*Item) Cached

func (i *Item) Cached() bool

func (*Item) Completed

func (i *Item) Completed() *time.Time

func (*Item) Entries

func (i *Item) Entries() []TreeEntry

func (*Item) Error

func (i *Item) Error() *string

func (*Item) ID

func (i *Item) ID() string

func (*Item) Infinite added in v0.6.0

func (i *Item) Infinite() bool

func (*Item) Init

func (i *Item) Init() tea.Cmd

Init is called when the item is first created _and_ when it is selected.

func (*Item) Inputs

func (i *Item) Inputs() []string

func (*Item) Internal

func (i *Item) Internal() bool

func (*Item) Name

func (i *Item) Name() string

func (*Item) Open

func (i *Item) Open() tea.Cmd

func (*Item) Save

func (i *Item) Save(dir string) (string, error)

func (*Item) ScrollPercent

func (i *Item) ScrollPercent() float64

func (*Item) SetHeight

func (i *Item) SetHeight(height int)

func (*Item) SetWidth

func (i *Item) SetWidth(width int)

func (*Item) Started

func (i *Item) Started() *time.Time

func (*Item) Update

func (i *Item) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*Item) UpdateLog

func (i *Item) UpdateLog(log *progrock.VertexLog)

func (*Item) UpdateStatus

func (i *Item) UpdateStatus(task *progrock.VertexTask)

func (*Item) UpdateVertex

func (i *Item) UpdateVertex(v *progrock.Vertex)

func (*Item) View

func (i *Item) View() string

type Model

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

func New

func New(quit func(), r progrock.Reader) *Model

func (Model) Init

func (m Model) Init() tea.Cmd

func (Model) IsDone

func (m Model) IsDone() bool

func (Model) Update

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

func (Model) View

func (m Model) View() string

type Tree

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

func (*Tree) Collapse

func (m *Tree) Collapse(entry TreeEntry, recursive bool)

func (Tree) Current

func (m Tree) Current() TreeEntry

func (*Tree) Expand

func (m *Tree) Expand(entry TreeEntry, recursive bool)

func (*Tree) Focus

func (m *Tree) Focus(focus bool)

func (*Tree) Follow

func (m *Tree) Follow()

func (*Tree) Init

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

func (*Tree) MoveDown

func (m *Tree) MoveDown()

func (*Tree) MoveToBottom

func (m *Tree) MoveToBottom()

func (*Tree) MoveToTop

func (m *Tree) MoveToTop()

func (*Tree) MoveUp

func (m *Tree) MoveUp()

func (*Tree) Open

func (m *Tree) Open() tea.Cmd

func (*Tree) PageDown

func (m *Tree) PageDown()

func (*Tree) PageUp

func (m *Tree) PageUp()

func (Tree) Root added in v0.6.0

func (m Tree) Root() TreeEntry

func (*Tree) SetHeight

func (m *Tree) SetHeight(height int)

func (*Tree) SetRoot

func (m *Tree) SetRoot(root TreeEntry)

func (*Tree) SetWidth

func (m *Tree) SetWidth(width int)

func (*Tree) Update

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

func (*Tree) UsedHeight

func (m *Tree) UsedHeight() int

func (*Tree) View

func (m *Tree) View() string

type TreeEntry

type TreeEntry interface {
	tea.Model

	ID() string
	Inputs() []string

	Name() string

	Entries() []TreeEntry

	Infinite() bool

	Started() *time.Time
	Completed() *time.Time
	Cached() bool
	Error() *string

	SetWidth(int)
	SetHeight(int)
	ScrollPercent() float64

	Save(dir string) (string, error)
	Open() tea.Cmd
}

type Vterm

type Vterm struct {
	Offset int
	Height int
	// contains filtered or unexported fields
}

func NewVterm

func NewVterm(width int) *Vterm

func (*Vterm) Init

func (term *Vterm) Init() tea.Cmd

func (*Vterm) Print

func (term *Vterm) Print(w io.Writer) error

Print prints the full log output without any formatting.

func (*Vterm) ScrollPercent

func (term *Vterm) ScrollPercent() float64

func (*Vterm) SetHeight

func (term *Vterm) SetHeight(height int)

func (*Vterm) SetWidth

func (term *Vterm) SetWidth(width int)

func (*Vterm) Update

func (term *Vterm) Update(msg tea.Msg) (tea.Model, tea.Cmd)

func (*Vterm) View

func (term *Vterm) View() string

func (*Vterm) Write

func (term *Vterm) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

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