github.com/jenspinney/cli@v6.42.1-0.20190207184520-7450c600020e+incompatible/command/ui.go (about) 1 package command 2 3 import ( 4 "io" 5 "time" 6 7 "code.cloudfoundry.org/cli/util/ui" 8 ) 9 10 // UI is the interface to STDOUT, STDERR, and STDIN. 11 type UI interface { 12 DisplayBoolPrompt(defaultResponse bool, template string, templateValues ...map[string]interface{}) (bool, error) 13 DisplayPasswordPrompt(template string, templateValues ...map[string]interface{}) (string, error) 14 DisplayTextPrompt(template string, templateValues ...map[string]interface{}) (string, error) 15 DisplayChangesForPush(changeSet []ui.Change) error 16 DisplayError(err error) 17 DisplayHeader(text string) 18 DisplayInstancesTableForApp(table [][]string) 19 DisplayKeyValueTable(prefix string, table [][]string, padding int) 20 DisplayKeyValueTableForApp(table [][]string) 21 DisplayLogMessage(message ui.LogMessage, displayHeader bool) 22 DisplayNewline() 23 DisplayNonWrappingTable(prefix string, table [][]string, padding int) 24 DisplayOK() 25 DisplayTableWithHeader(prefix string, table [][]string, padding int) 26 DisplayText(template string, data ...map[string]interface{}) 27 DisplayTextWithFlavor(text string, keys ...map[string]interface{}) 28 DisplayTextWithBold(text string, keys ...map[string]interface{}) 29 DisplayWarning(formattedString string, keys ...map[string]interface{}) 30 DisplayWarnings(warnings []string) 31 GetIn() io.Reader 32 GetOut() io.Writer 33 GetErr() io.Writer 34 RequestLoggerFileWriter(filePaths []string) *ui.RequestLoggerFileWriter 35 RequestLoggerTerminalDisplay() *ui.RequestLoggerTerminalDisplay 36 TranslateText(template string, data ...map[string]interface{}) string 37 UserFriendlyDate(input time.Time) string 38 Writer() io.Writer 39 }