Versions in this module Expand all Collapse all v8 v8.4.4 Aug 24, 2022 v8.4.3 Aug 24, 2022 Changes in this version + const DefaultTableSpacePadding + const LogTimestampFormat + const RedactedValue + var ErrInvalidIndex = errors.New("invalid list index") + var ErrValueMissmatch = errors.New("values provided were of different types") + func ParseLocale(locale string) (string, error) + func RedactHeaders(header http.Header) http.Header + func SanitizeJSON(raw []byte) ([]byte, error) + type Change struct + CurrentValue interface{} + Header string + HiddenValue bool + NewValue interface{} + type Config interface + ColorEnabled func() configv3.ColorSetting + IsTTY func() bool + Locale func() string + TerminalWidth func() int + type Exiter interface + Exit func(code int) + type Interactor interface + NewInteraction func(prompt string, choices ...interact.Choice) Resolver + type InvalidChoiceError struct + Choice string + func (InvalidChoiceError) Error() string + type LocaleReader interface + Locale func() string + type LogMessage interface + Message func() string + SourceInstance func() string + SourceType func() string + Timestamp func() time.Time + Type func() string + type RequestLoggerFileWriter struct + func (display *RequestLoggerFileWriter) DisplayBody([]byte) error + func (display *RequestLoggerFileWriter) DisplayDump(dump string) error + func (display *RequestLoggerFileWriter) DisplayHeader(name string, value string) error + func (display *RequestLoggerFileWriter) DisplayHost(name string) error + func (display *RequestLoggerFileWriter) DisplayJSONBody(body []byte) error + func (display *RequestLoggerFileWriter) DisplayMessage(msg string) error + func (display *RequestLoggerFileWriter) DisplayRequestHeader(method string, uri string, httpProtocol string) error + func (display *RequestLoggerFileWriter) DisplayResponseHeader(httpProtocol string, status string) error + func (display *RequestLoggerFileWriter) DisplayType(name string, requestDate time.Time) error + func (display *RequestLoggerFileWriter) HandleInternalError(err error) + func (display *RequestLoggerFileWriter) Start() error + func (display *RequestLoggerFileWriter) Stop() error + type RequestLoggerTerminalDisplay struct + func (display *RequestLoggerTerminalDisplay) DisplayBody([]byte) error + func (display *RequestLoggerTerminalDisplay) DisplayDump(dump string) error + func (display *RequestLoggerTerminalDisplay) DisplayHeader(name string, value string) error + func (display *RequestLoggerTerminalDisplay) DisplayHost(name string) error + func (display *RequestLoggerTerminalDisplay) DisplayJSONBody(body []byte) error + func (display *RequestLoggerTerminalDisplay) DisplayMessage(msg string) error + func (display *RequestLoggerTerminalDisplay) DisplayRequestHeader(method string, uri string, httpProtocol string) error + func (display *RequestLoggerTerminalDisplay) DisplayResponseHeader(httpProtocol string, status string) error + func (display *RequestLoggerTerminalDisplay) DisplayType(name string, requestDate time.Time) error + func (display *RequestLoggerTerminalDisplay) HandleInternalError(err error) + func (display *RequestLoggerTerminalDisplay) Start() error + func (display *RequestLoggerTerminalDisplay) Stop() error + type Resolver interface + Resolve func(dst interface{}) error + SetIn func(io.Reader) + SetOut func(io.Writer) + type TranslateFunc func(translationID string, args ...interface{}) string + func GetTranslationFunc(reader LocaleReader) (TranslateFunc, error) + type TranslationEntry struct + ID string + Translation string + type UI struct + Err io.Writer + Exiter Exiter + In io.Reader + Interactor Interactor + IsTTY bool + Out io.Writer + OutForInteration io.Writer + TerminalWidth int + TimezoneLocation *time.Location + func NewPluginUI(config Config, outBuffer io.Writer, errBuffer io.Writer) (*UI, error) + func NewTestUI(in io.Reader, out io.Writer, err io.Writer) *UI + func NewUI(config Config) (*UI, error) + func (ui *UI) DeferText(template string, templateValues ...map[string]interface{}) + func (ui *UI) DisplayBoolPrompt(defaultResponse bool, template string, ...) (bool, error) + func (ui *UI) DisplayChangeForPush(header string, stringTypePadding int, hiddenValue bool, ...) error + func (ui *UI) DisplayChangesForPush(changeSet []Change) error + func (ui *UI) DisplayDeprecationWarning() + func (ui *UI) DisplayDiffAddition(lines string, depth int, addHyphen bool) + func (ui *UI) DisplayDiffRemoval(lines string, depth int, addHyphen bool) + func (ui *UI) DisplayDiffUnchanged(lines string, depth int, addHyphen bool) + func (ui *UI) DisplayError(err error) + func (ui *UI) DisplayFileDeprecationWarning() + func (ui *UI) DisplayHeader(text string) + func (ui *UI) DisplayInstancesTableForApp(table [][]string) + func (ui *UI) DisplayJSON(name string, jsonData interface{}) error + func (ui *UI) DisplayKeyValueTable(prefix string, table [][]string, padding int) + func (ui *UI) DisplayKeyValueTableForApp(table [][]string) + func (ui *UI) DisplayLogMessage(message LogMessage, displayHeader bool) + func (ui *UI) DisplayNewline() + func (ui *UI) DisplayNonWrappingTable(prefix string, table [][]string, padding int) + func (ui *UI) DisplayOK() + func (ui *UI) DisplayOptionalTextPrompt(defaultValue string, template string, templateValues ...map[string]interface{}) (string, error) + func (ui *UI) DisplayPasswordPrompt(template string, templateValues ...map[string]interface{}) (string, error) + func (ui *UI) DisplayTableWithHeader(prefix string, table [][]string, padding int) + func (ui *UI) DisplayText(template string, templateValues ...map[string]interface{}) + func (ui *UI) DisplayTextMenu(choices []string, promptTemplate string, ...) (string, error) + func (ui *UI) DisplayTextPrompt(template string, templateValues ...map[string]interface{}) (string, error) + func (ui *UI) DisplayTextWithBold(template string, templateValues ...map[string]interface{}) + func (ui *UI) DisplayTextWithFlavor(template string, templateValues ...map[string]interface{}) + func (ui *UI) DisplayWarning(template string, templateValues ...map[string]interface{}) + func (ui *UI) DisplayWarnings(warnings []string) + func (ui *UI) FlushDeferred() + func (ui *UI) GetErr() io.Writer + func (ui *UI) GetIn() io.Reader + func (ui *UI) GetOut() io.Writer + func (ui *UI) RequestLoggerFileWriter(filePaths []string) *RequestLoggerFileWriter + func (ui *UI) RequestLoggerTerminalDisplay() *RequestLoggerTerminalDisplay + func (ui *UI) TranslateText(template string, templateValues ...map[string]interface{}) string + func (ui *UI) UserFriendlyDate(input time.Time) string + func (ui *UI) Writer() io.Writer Other modules containing this package github.com/LukasHeimann/cloudfoundrycli