prompter

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package prompter is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
var (
	EmptyList = errors.New("options can not be empty")
)

Functions

This section is empty.

Types

type ListOption

type ListOption struct {
	DisplayText string
	ReturnVal   any
}

type MockPrompter

type MockPrompter struct {
	// contains filtered or unexported fields
}

MockPrompter is a mock of Prompter interface.

func NewMockPrompter

func NewMockPrompter(ctrl *gomock.Controller) *MockPrompter

NewMockPrompter creates a new mock instance.

func (*MockPrompter) AskForMultilineString

func (m *MockPrompter) AskForMultilineString(direction, defaultValue, pattern string) (string, error)

AskForMultilineString mocks base method.

func (*MockPrompter) AskForMultipleSelectionFromList added in v1.8.0

func (m *MockPrompter) AskForMultipleSelectionFromList(direction string, list []fmt.Stringer) ([]any, error)

AskForMultipleSelectionFromList mocks base method.

func (*MockPrompter) AskForSelectionFromList

func (m *MockPrompter) AskForSelectionFromList(direction string, list []fmt.Stringer) (any, error)

AskForSelectionFromList mocks base method.

func (*MockPrompter) AskForString

func (m *MockPrompter) AskForString(direction string, validator Validator) (string, error)

AskForString mocks base method.

func (*MockPrompter) AskForYesOrNo

func (m *MockPrompter) AskForYesOrNo(direction string) (bool, error)

AskForYesOrNo mocks base method.

func (*MockPrompter) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

type MockPrompterMockRecorder

type MockPrompterMockRecorder struct {
	// contains filtered or unexported fields
}

MockPrompterMockRecorder is the mock recorder for MockPrompter.

func (*MockPrompterMockRecorder) AskForMultilineString

func (mr *MockPrompterMockRecorder) AskForMultilineString(direction, defaultValue, pattern interface{}) *gomock.Call

AskForMultilineString indicates an expected call of AskForMultilineString.

func (*MockPrompterMockRecorder) AskForMultipleSelectionFromList added in v1.8.0

func (mr *MockPrompterMockRecorder) AskForMultipleSelectionFromList(direction, list interface{}) *gomock.Call

AskForMultipleSelectionFromList indicates an expected call of AskForMultipleSelectionFromList.

func (*MockPrompterMockRecorder) AskForSelectionFromList

func (mr *MockPrompterMockRecorder) AskForSelectionFromList(direction, list interface{}) *gomock.Call

AskForSelectionFromList indicates an expected call of AskForSelectionFromList.

func (*MockPrompterMockRecorder) AskForString

func (mr *MockPrompterMockRecorder) AskForString(direction, validator interface{}) *gomock.Call

AskForString indicates an expected call of AskForString.

func (*MockPrompterMockRecorder) AskForYesOrNo

func (mr *MockPrompterMockRecorder) AskForYesOrNo(direction interface{}) *gomock.Call

AskForYesOrNo indicates an expected call of AskForYesOrNo.

type Prompter

type Prompter interface {
	AskForString(direction string, validator Validator) (string, error)
	AskForSelectionFromList(direction string, list []fmt.Stringer) (any, error)
	AskForMultipleSelectionFromList(direction string, list []fmt.Stringer) ([]any, error)
	AskForYesOrNo(direction string) (bool, error)
	AskForMultilineString(direction, defaultValue, pattern string) (string, error)
}

func GetInstance

func GetInstance() Prompter

type Validator

type Validator func(any) error

Jump to

Keyboard shortcuts

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