fakes

package
v0.0.0-...-47874c9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 3, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Answer

type Answer struct {
	Text  string
	Error error
}

type FakeUI

type FakeUI struct {
	Said   []string
	Errors []string

	Blocks []string // keep as string to make ginkgo err msgs easier

	Table  Table
	Tables []Table

	AskedTextLabels []string
	AskedText       []Answer

	AskedPasswordLabels []string
	AskedPasswords      []Answer

	AskedChoiceCalled  bool
	AskedChoiceLabel   string
	AskedChoiceOptions []string
	AskedChoiceChosens []int
	AskedChoiceErrs    []error

	AskedConfirmationCalled bool
	AskedConfirmationErr    error

	Interactive bool

	Flushed bool
	// contains filtered or unexported fields
}

func (*FakeUI) AskForChoice

func (ui *FakeUI) AskForChoice(opts types.ChoiceOpts) (int, error)

func (*FakeUI) AskForConfirmation

func (ui *FakeUI) AskForConfirmation() error

func (*FakeUI) AskForPassword

func (ui *FakeUI) AskForPassword(label string) (string, error)

func (*FakeUI) AskForText

func (ui *FakeUI) AskForText(opts types.TextOpts) (string, error)

func (*FakeUI) BeginLinef

func (ui *FakeUI) BeginLinef(pattern string, args ...interface{})

func (*FakeUI) EndLinef

func (ui *FakeUI) EndLinef(pattern string, args ...interface{})

func (*FakeUI) ErrorLinef

func (ui *FakeUI) ErrorLinef(pattern string, args ...interface{})

func (*FakeUI) Flush

func (ui *FakeUI) Flush()

func (*FakeUI) IsInteractive

func (ui *FakeUI) IsInteractive() bool

func (*FakeUI) PrintBlock

func (ui *FakeUI) PrintBlock(block []byte)

func (*FakeUI) PrintErrorBlock

func (ui *FakeUI) PrintErrorBlock(block string)

func (*FakeUI) PrintLinef

func (ui *FakeUI) PrintLinef(pattern string, args ...interface{})

func (*FakeUI) PrintTable

func (ui *FakeUI) PrintTable(table Table)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL