Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectorMock ¶
ConnectorMock has a `Connect` method that matches the signature of the Connector func type
func NewConnector ¶
func NewConnector() *ConnectorMock
NewConnector creates mock with the `Connect` method that matches the signature of the Connector func type
func (*ConnectorMock) Connect ¶
func (c *ConnectorMock) Connect( clientConn net.Conn, secrets connector.CredentialValuesByID, ) (backendConn net.Conn, err error)
Connect mocks the Connector func type
type CredentialRetrieverMock ¶
CredentialRetrieverMock has a `RetrieveCredentials` method that matches the signature of the CredentialsRetriever func type
func NewCredentialRetriever ¶
func NewCredentialRetriever() *CredentialRetrieverMock
NewCredentialRetriever creates a mock with the `RetrieveCredentials` method that matches the signature of the CredentialsRetriever func type
func (*CredentialRetrieverMock) RetrieveCredentials ¶
func (cr *CredentialRetrieverMock) RetrieveCredentials() (bytes map[string][]byte, e error)
RetrieveCredentials mocks the CredentialsRetriever func type
type ListenerMock ¶
ListenerMock conforms to the net.Listener interface
func NewListener ¶
func NewListener() *ListenerMock
NewListener creates a net.Listener mock with an `Accept` method that returns the expectation values only on the first call, otherwise it blocks forever for all subsequent calls or if expected return values are not set.
func (*ListenerMock) Accept ¶
func (l *ListenerMock) Accept() (net.Conn, error)
Accept mocks the method of the same name on the net.Listener interface. It is a special mock method that normally blocks forever. When expected return values are set it will return those for the first call.
func (*ListenerMock) Close ¶
func (l *ListenerMock) Close() error
Close mocks the method of the same name on the net.Listener interface