tui

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ShowFileInTerminal

func ShowFileInTerminal(content []byte) error

func ShowTable

func ShowTable(options TableOptions) error

Types

type Message

type Message struct{}

func (*Message) ShowError

func (t *Message) ShowError(opt MessageOptions)

func (*Message) ShowInfo

func (t *Message) ShowInfo(opt MessageOptions)

func (*Message) ShowSuccess

func (t *Message) ShowSuccess(opt MessageOptions)

func (*Message) ShowWarning

func (t *Message) ShowWarning(opt MessageOptions)

type MessageOptions

type MessageOptions struct {
	Title   string
	Message string
	Error   error
}

type MessageWriter

type MessageWriter interface {
	ShowError(opt MessageOptions)
	ShowInfo(opt MessageOptions)
	ShowSuccess(opt MessageOptions)
	ShowWarning(opt MessageOptions)
}

func NewMessageWriter

func NewMessageWriter() MessageWriter

type TableOptions

type TableOptions struct {
	Headers   []string
	Data      [][]string
	WithBoxed bool
}

type Title

type Title struct {
}

func (*Title) ShowSubTitle

func (t *Title) ShowSubTitle(title, subTitle string)

func (*Title) ShowTitle

func (t *Title) ShowTitle(title string)

func (*Title) ShowTitleAndDescription

func (t *Title) ShowTitleAndDescription(title, description string)

type TitleWriter

type TitleWriter interface {
	ShowTitle(title string)
	ShowTitleAndDescription(title, description string)
	ShowSubTitle(mainTitle, subtitle string)
}

func NewTitleWriter

func NewTitleWriter() TitleWriter

Jump to

Keyboard shortcuts

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