forked from cloudfoundry/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ui.go
45 lines (42 loc) · 1.94 KB
/
ui.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package command
import (
"io"
"time"
"code.cloudfoundry.org/cli/util/ui"
)
// UI is the interface to STDOUT, STDERR, and STDIN.
//go:generate counterfeiter . UI
type UI interface {
DeferText(template string, data ...map[string]interface{})
DisplayBoolPrompt(defaultResponse bool, template string, templateValues ...map[string]interface{}) (bool, error)
DisplayChangesForPush(changeSet []ui.Change) error
DisplayDeprecationWarning()
DisplayError(err error)
DisplayFileDeprecationWarning()
DisplayHeader(text string)
DisplayInstancesTableForApp(table [][]string)
DisplayKeyValueTable(prefix string, table [][]string, padding int)
DisplayKeyValueTableForApp(table [][]string)
DisplayLogMessage(message ui.LogMessage, displayHeader bool)
DisplayNewline()
DisplayNonWrappingTable(prefix string, table [][]string, padding int)
DisplayOK()
DisplayOptionalTextPrompt(defaultValue string, template string, templateValues ...map[string]interface{}) (string, error)
DisplayPasswordPrompt(template string, templateValues ...map[string]interface{}) (string, error)
DisplayTableWithHeader(prefix string, table [][]string, padding int)
DisplayText(template string, data ...map[string]interface{})
DisplayTextMenu(choices []string, promptTemplate string, templateValues ...map[string]interface{}) (string, error)
DisplayTextPrompt(template string, templateValues ...map[string]interface{}) (string, error)
DisplayTextWithBold(text string, keys ...map[string]interface{})
DisplayTextWithFlavor(text string, keys ...map[string]interface{})
DisplayWarning(formattedString string, keys ...map[string]interface{})
DisplayWarnings(warnings []string)
GetErr() io.Writer
GetIn() io.Reader
GetOut() io.Writer
RequestLoggerFileWriter(filePaths []string) *ui.RequestLoggerFileWriter
RequestLoggerTerminalDisplay() *ui.RequestLoggerTerminalDisplay
TranslateText(template string, data ...map[string]interface{}) string
UserFriendlyDate(input time.Time) string
Writer() io.Writer
}