Documentation ¶
Index ¶
- Constants
- Variables
- func AdvisoryColor(message string) string
- func Colorize(message string, textColor color.Attribute) string
- func ColorizeBold(message string, textColor color.Attribute) string
- func CommandColor(message string) string
- func CrashedColor(message string) string
- func Decolorize(message string) string
- func EntityNameColor(message string) string
- func FailureColor(message string) string
- func HeaderColor(message string) string
- func InitColorSupport()
- func LogAppHeaderColor(message string) string
- func LogHealthHeaderColor(message string) string
- func LogStderrColor(message string) string
- func LogStdoutColor(message string) string
- func LogSysHeaderColor(message string) string
- func NotLoggedInText() string
- func PrintToTerminal(str string) (int, error)
- func PrintlnToTerminal(str string) (int, error)
- func PromptColor(message string) string
- func StoppedColor(message string) string
- func SuccessColor(message string) string
- func TableContentHeaderColor(message string) string
- func WarningColor(message string) string
- type ColoringFunction
- type DebugPrinter
- type Printer
- type Table
- type TeePrinter
- func (t *TeePrinter) DisableTerminalOutput(disable bool)
- func (t *TeePrinter) Print(values ...interface{}) (int, error)
- func (t *TeePrinter) Printf(format string, a ...interface{}) (int, error)
- func (t *TeePrinter) Println(values ...interface{}) (int, error)
- func (t *TeePrinter) SetOutputBucket(bucket io.Writer)
- type Transformer
- type UI
- type UITable
Constants ¶
const QuietPanic = "This shouldn't print anything"
Variables ¶
var ( TerminalSupportsColors = isTerminal() UserAskedForColors = "" )
Functions ¶
func AdvisoryColor ¶
func CommandColor ¶
func CrashedColor ¶
func Decolorize ¶
func EntityNameColor ¶
func FailureColor ¶
func HeaderColor ¶
func InitColorSupport ¶
func InitColorSupport()
func LogAppHeaderColor ¶
func LogHealthHeaderColor ¶
func LogStderrColor ¶
func LogStdoutColor ¶
func LogSysHeaderColor ¶
func NotLoggedInText ¶
func NotLoggedInText() string
func PrintToTerminal ¶
func PrintlnToTerminal ¶
func PromptColor ¶
func StoppedColor ¶
func SuccessColor ¶
func TableContentHeaderColor ¶
func WarningColor ¶
Types ¶
type DebugPrinter ¶
func (DebugPrinter) Print ¶
func (p DebugPrinter) Print(title, dump string)
type Table ¶
type Table struct {
// contains filtered or unexported fields
}
PrintableTable is an implementation of the Table interface. It remembers the headers, the added rows, the column widths, and a number of other things.
func NewTable ¶
NewTable is the constructor function creating a new printable table from a list of headers. The table is also connected to a UI, which is where it will print itself to on demand.
func (*Table) NoHeaders ¶
func (t *Table) NoHeaders()
NoHeaders disables the printing of the header row for the specified table.
func (*Table) PrintTo ¶
PrintTo is the core functionality for printing the table, placing the formatted table into the writer given to it as argument. The exported Print() is just a wrapper around this which redirects the result into CF datastructures.
func (*Table) SetTransformer ¶
func (t *Table) SetTransformer(columnIndex int, tr Transformer)
SetTransformer specifies a string transformer to apply to the content of the given column in the specified table.
type TeePrinter ¶
type TeePrinter struct {
// contains filtered or unexported fields
}
func NewTeePrinter ¶
func NewTeePrinter() *TeePrinter
func (*TeePrinter) DisableTerminalOutput ¶
func (t *TeePrinter) DisableTerminalOutput(disable bool)
func (*TeePrinter) Print ¶
func (t *TeePrinter) Print(values ...interface{}) (int, error)
func (*TeePrinter) Printf ¶
func (t *TeePrinter) Printf(format string, a ...interface{}) (int, error)
func (*TeePrinter) Println ¶
func (t *TeePrinter) Println(values ...interface{}) (int, error)
func (*TeePrinter) SetOutputBucket ¶
func (t *TeePrinter) SetOutputBucket(bucket io.Writer)
type Transformer ¶
Transformer is the type of functions used to modify the content of a table cell for actual display. For multi-line content of a cell the transformation is applied to each individual line.
type UI ¶
type UI interface { PrintPaginator(rows []string, err error) Say(message string, args ...interface{}) // ProgressReader PrintCapturingNoOutput(message string, args ...interface{}) Warn(message string, args ...interface{}) Ask(prompt string) (answer string) AskForPassword(prompt string) (answer string) Confirm(message string) bool ConfirmDelete(modelType, modelName string) bool ConfirmDeleteWithAssociations(modelType, modelName string) bool Ok() Failed(message string, args ...interface{}) PanicQuietly() ShowConfiguration(coreconfig.Reader) LoadingIndication() Table(headers []string) *UITable NotifyUpdateIfNeeded(coreconfig.Reader) }
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
This file was generated by counterfeiter
|
This file was generated by counterfeiter |