github.com/sleungcy-sap/cli@v7.1.0+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 //go:generate counterfeiter . UI 12 type UI interface { 13 DeferText(template string, data ...map[string]interface{}) 14 DisplayBoolPrompt(defaultResponse bool, template string, templateValues ...map[string]interface{}) (bool, error) 15 DisplayChangesForPush(changeSet []ui.Change) error 16 DisplayDeprecationWarning() 17 DisplayError(err error) 18 DisplayFileDeprecationWarning() 19 DisplayHeader(text string) 20 DisplayInstancesTableForApp(table [][]string) 21 DisplayKeyValueTable(prefix string, table [][]string, padding int) 22 DisplayKeyValueTableForApp(table [][]string) 23 DisplayLogMessage(message ui.LogMessage, displayHeader bool) 24 DisplayNewline() 25 DisplayNonWrappingTable(prefix string, table [][]string, padding int) 26 DisplayOK() 27 DisplayOptionalTextPrompt(defaultValue string, template string, templateValues ...map[string]interface{}) (string, error) 28 DisplayPasswordPrompt(template string, templateValues ...map[string]interface{}) (string, error) 29 DisplayTableWithHeader(prefix string, table [][]string, padding int) 30 DisplayText(template string, data ...map[string]interface{}) 31 DisplayTextMenu(choices []string, promptTemplate string, templateValues ...map[string]interface{}) (string, error) 32 DisplayTextPrompt(template string, templateValues ...map[string]interface{}) (string, error) 33 DisplayTextWithBold(text string, keys ...map[string]interface{}) 34 DisplayTextWithFlavor(text string, keys ...map[string]interface{}) 35 DisplayWarning(formattedString string, keys ...map[string]interface{}) 36 DisplayWarnings(warnings []string) 37 GetErr() io.Writer 38 GetIn() io.Reader 39 GetOut() io.Writer 40 RequestLoggerFileWriter(filePaths []string) *ui.RequestLoggerFileWriter 41 RequestLoggerTerminalDisplay() *ui.RequestLoggerTerminalDisplay 42 TranslateText(template string, data ...map[string]interface{}) string 43 UserFriendlyDate(input time.Time) string 44 Writer() io.Writer 45 }