terminal

package
v6.0.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2014 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdvisoryColor

func AdvisoryColor(message string) string

func Colorize

func Colorize(message string, color Color, bold bool) string

func CommandColor

func CommandColor(message string) string

func CrashedColor

func CrashedColor(message string) string

func EntityNameColor

func EntityNameColor(message string) string

func FailureColor

func FailureColor(message string) string

func HeaderColor

func HeaderColor(message string) string

func LogAppHeaderColor

func LogAppHeaderColor(message string) string

func LogStderrColor

func LogStderrColor(message string) string

func LogStdoutColor

func LogStdoutColor(message string) string

func LogSysHeaderColor

func LogSysHeaderColor(message string) string

func NotLoggedInText

func NotLoggedInText() string

func PromptColor

func PromptColor(message string) string

func StoppedColor

func StoppedColor(message string) string

func SuccessColor

func SuccessColor(message string) string

func TableContentHeaderColor

func TableContentHeaderColor(message string) string

func WarningColor

func WarningColor(message string) string

Types

type Color

type Color uint

type ColoringFunction

type ColoringFunction func(value string, row int, col int) string

type PrintableTable

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

func (*PrintableTable) Print

func (t *PrintableTable) Print(rows [][]string)

type Table

type Table interface {
	Print(rows [][]string)
}

func NewTable

func NewTable(ui UI, header []string) Table

type UI

type UI interface {
	PrintPaginator(rows []string, err error)
	Say(message string, args ...interface{})
	Warn(message string, args ...interface{})
	Ask(prompt string, args ...interface{}) (answer string)
	AskForPassword(prompt string, args ...interface{}) (answer string)
	Confirm(message string, args ...interface{}) bool
	Ok()
	Failed(message string, args ...interface{})
	FailWithUsage(ctxt *cli.Context, cmdName string)
	ConfigFailure(err error)
	ShowConfiguration(configuration.Reader)
	LoadingIndication()
	Wait(duration time.Duration)
	DisplayTable(table [][]string)
	Table(headers []string) Table
}

func NewUI

func NewUI(r io.Reader) UI

Jump to

Keyboard shortcuts

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