ssh

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2024 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 ErrInvalidPrivateKey

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

ErrInvalidPrivateKey will be used to wrap an Ed25519 internal error

func (*ErrInvalidPrivateKey) Error

func (e *ErrInvalidPrivateKey) Error() string

func (*ErrInvalidPrivateKey) Is

func (e *ErrInvalidPrivateKey) Is(err error) bool

func (*ErrInvalidPrivateKey) Unwrap

func (e *ErrInvalidPrivateKey) Unwrap() error

type KeyFactory

type KeyFactory interface {
	Create() (*KeyPair, error)
}

KeyFactory is a factory for Public and Private key pairs

func NewKeyFactory

func NewKeyFactory(logger logging.Logger) KeyFactory

NewKeyFactory instantiates a concrete instance of KeyFactory

type KeyPair

type KeyPair struct {
	PublicKey  []byte
	PrivateKey []byte
}

KeyPair centralizes the generated public and private keys

type MockKeyFactory

type MockKeyFactory struct {
	mock.Mock
}

MockKeyFactory is an autogenerated mock type for the KeyFactory type

func NewMockKeyFactory added in v0.3.0

func NewMockKeyFactory(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockKeyFactory

NewMockKeyFactory creates a new instance of MockKeyFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockKeyFactory) Create

func (_m *MockKeyFactory) Create() (*KeyPair, error)

Create provides a mock function with given fields:

Jump to

Keyboard shortcuts

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