reader

package
v1.28.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2023 License: Apache-2.0 Imports: 9 Imported by: 3

Documentation

Overview

Package reader provides the reader of standard input.

Index

Constants

This section is empty.

Variables

Set provides an implementation and interface for Reader.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	ReadString(prompt string) (string, error)
	ReadPassword(prompt string) (string, error)
}

type MockInterface added in v1.25.2

type MockInterface struct {
	mock.Mock
}

MockInterface is an autogenerated mock type for the Interface type

func NewMockInterface added in v1.25.2

func NewMockInterface(t mockConstructorTestingTNewMockInterface) *MockInterface

NewMockInterface creates a new instance of MockInterface. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockInterface) EXPECT added in v1.25.2

func (_m *MockInterface) EXPECT() *MockInterface_Expecter

func (*MockInterface) ReadPassword added in v1.25.2

func (_m *MockInterface) ReadPassword(prompt string) (string, error)

ReadPassword provides a mock function with given fields: prompt

func (*MockInterface) ReadString added in v1.25.2

func (_m *MockInterface) ReadString(prompt string) (string, error)

ReadString provides a mock function with given fields: prompt

type MockInterface_Expecter added in v1.25.2

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

func (*MockInterface_Expecter) ReadPassword added in v1.25.2

func (_e *MockInterface_Expecter) ReadPassword(prompt interface{}) *MockInterface_ReadPassword_Call

ReadPassword is a helper method to define mock.On call

  • prompt string

func (*MockInterface_Expecter) ReadString added in v1.25.2

func (_e *MockInterface_Expecter) ReadString(prompt interface{}) *MockInterface_ReadString_Call

ReadString is a helper method to define mock.On call

  • prompt string

type MockInterface_ReadPassword_Call added in v1.25.2

type MockInterface_ReadPassword_Call struct {
	*mock.Call
}

MockInterface_ReadPassword_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadPassword'

func (*MockInterface_ReadPassword_Call) Return added in v1.25.2

func (*MockInterface_ReadPassword_Call) Run added in v1.25.2

type MockInterface_ReadString_Call added in v1.25.2

type MockInterface_ReadString_Call struct {
	*mock.Call
}

MockInterface_ReadString_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadString'

func (*MockInterface_ReadString_Call) Return added in v1.25.2

func (*MockInterface_ReadString_Call) Run added in v1.25.2

type Reader

type Reader struct {
	Stdin stdio.Stdin
}

func (*Reader) ReadPassword

func (*Reader) ReadPassword(prompt string) (string, error)

ReadPassword reads a password from the stdin without echo back.

func (*Reader) ReadString

func (x *Reader) ReadString(prompt string) (string, error)

ReadString reads a string from the stdin.

Jump to

Keyboard shortcuts

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