ssh

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Key

type Key struct {
	Managed bool
	Value   string
	User    string
	Host    string
}

func ParseKey

func ParseKey(line string, managed bool) (Key, error)

func (Key) String

func (k Key) String() string

type KeySorter

type KeySorter []Key

func (KeySorter) Len

func (s KeySorter) Len() int

func (KeySorter) Less

func (s KeySorter) Less(a, b int) bool

func (KeySorter) Swap

func (s KeySorter) Swap(a, b int)

type KeysReader

type KeysReader interface {
	ReadKeys(filename string) ([]Key, error)
}

func NewKeysReader

func NewKeysReader() KeysReader

type KeysReaderMock

type KeysReaderMock struct {
	ReadKeysMock mKeysReaderMockReadKeys
	// contains filtered or unexported fields
}

KeysReaderMock implements KeysReader

func NewKeysReaderMock

func NewKeysReaderMock(t minimock.Tester) *KeysReaderMock

NewKeysReaderMock returns a mock for KeysReader

func (*KeysReaderMock) MinimockFinish

func (m *KeysReaderMock) MinimockFinish()

MinimockFinish checks that all mocked methods have been called the expected number of times

func (*KeysReaderMock) MinimockReadKeysDone

func (m *KeysReaderMock) MinimockReadKeysDone() bool

MinimockReadKeysDone returns true if the count of the ReadKeys invocations corresponds the number of defined expectations

func (*KeysReaderMock) MinimockReadKeysInspect

func (m *KeysReaderMock) MinimockReadKeysInspect()

MinimockReadKeysInspect logs each unmet expectation

func (*KeysReaderMock) MinimockWait

func (m *KeysReaderMock) MinimockWait(timeout mm_time.Duration)

MinimockWait waits for all mocked methods to be called the expected number of times

func (*KeysReaderMock) ReadKeys

func (mmReadKeys *KeysReaderMock) ReadKeys(filename string) (ka1 []Key, err error)

ReadKeys implements KeysReader

func (*KeysReaderMock) ReadKeysAfterCounter

func (mmReadKeys *KeysReaderMock) ReadKeysAfterCounter() uint64

ReadKeysAfterCounter returns a count of finished KeysReaderMock.ReadKeys invocations

func (*KeysReaderMock) ReadKeysBeforeCounter

func (mmReadKeys *KeysReaderMock) ReadKeysBeforeCounter() uint64

ReadKeysBeforeCounter returns a count of KeysReaderMock.ReadKeys invocations

type KeysReaderMockReadKeysExpectation

type KeysReaderMockReadKeysExpectation struct {
	Counter uint64
	// contains filtered or unexported fields
}

KeysReaderMockReadKeysExpectation specifies expectation struct of the KeysReader.ReadKeys

func (*KeysReaderMockReadKeysExpectation) Then

Then sets up KeysReader.ReadKeys return parameters for the expectation previously defined by the When method

type KeysReaderMockReadKeysParams

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

KeysReaderMockReadKeysParams contains parameters of the KeysReader.ReadKeys

type KeysReaderMockReadKeysResults

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

KeysReaderMockReadKeysResults contains results of the KeysReader.ReadKeys

Jump to

Keyboard shortcuts

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