mocks

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Channel

type Channel struct {
	mock.Mock
}

Channel is an autogenerated mock type for the Channel type

func NewChannel

func NewChannel(t interface {
	mock.TestingT
	Cleanup(func())
}) *Channel

NewChannel creates a new instance of Channel. 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 (*Channel) EXPECT added in v1.4.0

func (_m *Channel) EXPECT() *Channel_Expecter

func (*Channel) Err

func (_m *Channel) Err() error

Err provides a mock function with no fields

func (*Channel) Receive

func (_m *Channel) Receive(_a0 context.Context) p2p.ChannelIterator

Receive provides a mock function with given fields: _a0

func (*Channel) Send

func (_m *Channel) Send(_a0 context.Context, _a1 p2p.Envelope) error

Send provides a mock function with given fields: _a0, _a1

func (*Channel) SendError

func (_m *Channel) SendError(_a0 context.Context, _a1 p2p.PeerError) error

SendError provides a mock function with given fields: _a0, _a1

func (*Channel) String

func (_m *Channel) String() string

String provides a mock function with no fields

type Channel_Err_Call added in v1.4.0

type Channel_Err_Call struct {
	*mock.Call
}

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

func (*Channel_Err_Call) Return added in v1.4.0

func (_c *Channel_Err_Call) Return(_a0 error) *Channel_Err_Call

func (*Channel_Err_Call) Run added in v1.4.0

func (_c *Channel_Err_Call) Run(run func()) *Channel_Err_Call

func (*Channel_Err_Call) RunAndReturn added in v1.4.0

func (_c *Channel_Err_Call) RunAndReturn(run func() error) *Channel_Err_Call

type Channel_Expecter added in v1.4.0

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

func (*Channel_Expecter) Err added in v1.4.0

Err is a helper method to define mock.On call

func (*Channel_Expecter) Receive added in v1.4.0

func (_e *Channel_Expecter) Receive(_a0 interface{}) *Channel_Receive_Call

Receive is a helper method to define mock.On call

  • _a0 context.Context

func (*Channel_Expecter) Send added in v1.4.0

func (_e *Channel_Expecter) Send(_a0 interface{}, _a1 interface{}) *Channel_Send_Call

Send is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 p2p.Envelope

func (*Channel_Expecter) SendError added in v1.4.0

func (_e *Channel_Expecter) SendError(_a0 interface{}, _a1 interface{}) *Channel_SendError_Call

SendError is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 p2p.PeerError

func (*Channel_Expecter) String added in v1.4.0

func (_e *Channel_Expecter) String() *Channel_String_Call

String is a helper method to define mock.On call

type Channel_Receive_Call added in v1.4.0

type Channel_Receive_Call struct {
	*mock.Call
}

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

func (*Channel_Receive_Call) Return added in v1.4.0

func (*Channel_Receive_Call) Run added in v1.4.0

func (_c *Channel_Receive_Call) Run(run func(_a0 context.Context)) *Channel_Receive_Call

func (*Channel_Receive_Call) RunAndReturn added in v1.4.0

type Channel_SendError_Call added in v1.4.0

type Channel_SendError_Call struct {
	*mock.Call
}

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

func (*Channel_SendError_Call) Return added in v1.4.0

func (*Channel_SendError_Call) Run added in v1.4.0

func (*Channel_SendError_Call) RunAndReturn added in v1.4.0

type Channel_Send_Call added in v1.4.0

type Channel_Send_Call struct {
	*mock.Call
}

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

func (*Channel_Send_Call) Return added in v1.4.0

func (_c *Channel_Send_Call) Return(_a0 error) *Channel_Send_Call

func (*Channel_Send_Call) Run added in v1.4.0

func (_c *Channel_Send_Call) Run(run func(_a0 context.Context, _a1 p2p.Envelope)) *Channel_Send_Call

func (*Channel_Send_Call) RunAndReturn added in v1.4.0

func (_c *Channel_Send_Call) RunAndReturn(run func(context.Context, p2p.Envelope) error) *Channel_Send_Call

type Channel_String_Call added in v1.4.0

type Channel_String_Call struct {
	*mock.Call
}

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

func (*Channel_String_Call) Return added in v1.4.0

func (*Channel_String_Call) Run added in v1.4.0

func (_c *Channel_String_Call) Run(run func()) *Channel_String_Call

func (*Channel_String_Call) RunAndReturn added in v1.4.0

func (_c *Channel_String_Call) RunAndReturn(run func() string) *Channel_String_Call

type Connection

type Connection struct {
	mock.Mock
}

Connection is an autogenerated mock type for the Connection type

func NewConnection

func NewConnection(t interface {
	mock.TestingT
	Cleanup(func())
}) *Connection

NewConnection creates a new instance of Connection. 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 (*Connection) Close

func (_m *Connection) Close() error

Close provides a mock function with no fields

func (*Connection) EXPECT added in v1.4.0

func (_m *Connection) EXPECT() *Connection_Expecter

func (*Connection) Handshake

Handshake provides a mock function with given fields: _a0, _a1, _a2, _a3

func (*Connection) LocalEndpoint

func (_m *Connection) LocalEndpoint() p2p.Endpoint

LocalEndpoint provides a mock function with no fields

func (*Connection) ReceiveMessage

func (_m *Connection) ReceiveMessage(_a0 context.Context) (p2p.ChannelID, []byte, error)

ReceiveMessage provides a mock function with given fields: _a0

func (*Connection) RemoteEndpoint

func (_m *Connection) RemoteEndpoint() p2p.Endpoint

RemoteEndpoint provides a mock function with no fields

func (*Connection) SendMessage

func (_m *Connection) SendMessage(_a0 context.Context, _a1 p2p.ChannelID, _a2 []byte) error

SendMessage provides a mock function with given fields: _a0, _a1, _a2

func (*Connection) String

func (_m *Connection) String() string

String provides a mock function with no fields

type Connection_Close_Call added in v1.4.0

type Connection_Close_Call struct {
	*mock.Call
}

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

func (*Connection_Close_Call) Return added in v1.4.0

func (*Connection_Close_Call) Run added in v1.4.0

func (_c *Connection_Close_Call) Run(run func()) *Connection_Close_Call

func (*Connection_Close_Call) RunAndReturn added in v1.4.0

func (_c *Connection_Close_Call) RunAndReturn(run func() error) *Connection_Close_Call

type Connection_Expecter added in v1.4.0

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

func (*Connection_Expecter) Close added in v1.4.0

Close is a helper method to define mock.On call

func (*Connection_Expecter) Handshake added in v1.4.0

func (_e *Connection_Expecter) Handshake(_a0 interface{}, _a1 interface{}, _a2 interface{}, _a3 interface{}) *Connection_Handshake_Call

Handshake is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 time.Duration
  • _a2 types.NodeInfo
  • _a3 crypto.PrivKey

func (*Connection_Expecter) LocalEndpoint added in v1.4.0

LocalEndpoint is a helper method to define mock.On call

func (*Connection_Expecter) ReceiveMessage added in v1.4.0

func (_e *Connection_Expecter) ReceiveMessage(_a0 interface{}) *Connection_ReceiveMessage_Call

ReceiveMessage is a helper method to define mock.On call

  • _a0 context.Context

func (*Connection_Expecter) RemoteEndpoint added in v1.4.0

RemoteEndpoint is a helper method to define mock.On call

func (*Connection_Expecter) SendMessage added in v1.4.0

func (_e *Connection_Expecter) SendMessage(_a0 interface{}, _a1 interface{}, _a2 interface{}) *Connection_SendMessage_Call

SendMessage is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 p2p.ChannelID
  • _a2 []byte

func (*Connection_Expecter) String added in v1.4.0

String is a helper method to define mock.On call

type Connection_Handshake_Call added in v1.4.0

type Connection_Handshake_Call struct {
	*mock.Call
}

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

func (*Connection_Handshake_Call) Return added in v1.4.0

func (*Connection_Handshake_Call) Run added in v1.4.0

func (*Connection_Handshake_Call) RunAndReturn added in v1.4.0

type Connection_LocalEndpoint_Call added in v1.4.0

type Connection_LocalEndpoint_Call struct {
	*mock.Call
}

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

func (*Connection_LocalEndpoint_Call) Return added in v1.4.0

func (*Connection_LocalEndpoint_Call) Run added in v1.4.0

func (*Connection_LocalEndpoint_Call) RunAndReturn added in v1.4.0

type Connection_ReceiveMessage_Call added in v1.4.0

type Connection_ReceiveMessage_Call struct {
	*mock.Call
}

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

func (*Connection_ReceiveMessage_Call) Return added in v1.4.0

func (*Connection_ReceiveMessage_Call) Run added in v1.4.0

func (*Connection_ReceiveMessage_Call) RunAndReturn added in v1.4.0

type Connection_RemoteEndpoint_Call added in v1.4.0

type Connection_RemoteEndpoint_Call struct {
	*mock.Call
}

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

func (*Connection_RemoteEndpoint_Call) Return added in v1.4.0

func (*Connection_RemoteEndpoint_Call) Run added in v1.4.0

func (*Connection_RemoteEndpoint_Call) RunAndReturn added in v1.4.0

type Connection_SendMessage_Call added in v1.4.0

type Connection_SendMessage_Call struct {
	*mock.Call
}

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

func (*Connection_SendMessage_Call) Return added in v1.4.0

func (*Connection_SendMessage_Call) Run added in v1.4.0

func (*Connection_SendMessage_Call) RunAndReturn added in v1.4.0

type Connection_String_Call added in v1.4.0

type Connection_String_Call struct {
	*mock.Call
}

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

func (*Connection_String_Call) Return added in v1.4.0

func (*Connection_String_Call) Run added in v1.4.0

func (_c *Connection_String_Call) Run(run func()) *Connection_String_Call

func (*Connection_String_Call) RunAndReturn added in v1.4.0

func (_c *Connection_String_Call) RunAndReturn(run func() string) *Connection_String_Call

type Transport

type Transport struct {
	mock.Mock
}

Transport is an autogenerated mock type for the Transport type

func NewTransport

func NewTransport(t interface {
	mock.TestingT
	Cleanup(func())
}) *Transport

NewTransport creates a new instance of Transport. 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 (*Transport) Accept

func (_m *Transport) Accept(_a0 context.Context) (p2p.Connection, error)

Accept provides a mock function with given fields: _a0

func (*Transport) AddChannelDescriptors

func (_m *Transport) AddChannelDescriptors(_a0 []*p2p.ChannelDescriptor)

AddChannelDescriptors provides a mock function with given fields: _a0

func (*Transport) Close

func (_m *Transport) Close() error

Close provides a mock function with no fields

func (*Transport) Dial

func (_m *Transport) Dial(_a0 context.Context, _a1 *p2p.Endpoint) (p2p.Connection, error)

Dial provides a mock function with given fields: _a0, _a1

func (*Transport) EXPECT added in v1.4.0

func (_m *Transport) EXPECT() *Transport_Expecter

func (*Transport) Endpoint

func (_m *Transport) Endpoint() (*p2p.Endpoint, error)

Endpoint provides a mock function with no fields

func (*Transport) Listen

func (_m *Transport) Listen(_a0 *p2p.Endpoint) error

Listen provides a mock function with given fields: _a0

func (*Transport) Protocols

func (_m *Transport) Protocols() []p2p.Protocol

Protocols provides a mock function with no fields

func (*Transport) String

func (_m *Transport) String() string

String provides a mock function with no fields

type Transport_Accept_Call added in v1.4.0

type Transport_Accept_Call struct {
	*mock.Call
}

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

func (*Transport_Accept_Call) Return added in v1.4.0

func (*Transport_Accept_Call) Run added in v1.4.0

func (*Transport_Accept_Call) RunAndReturn added in v1.4.0

type Transport_AddChannelDescriptors_Call added in v1.4.0

type Transport_AddChannelDescriptors_Call struct {
	*mock.Call
}

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

func (*Transport_AddChannelDescriptors_Call) Return added in v1.4.0

func (*Transport_AddChannelDescriptors_Call) Run added in v1.4.0

func (*Transport_AddChannelDescriptors_Call) RunAndReturn added in v1.4.0

type Transport_Close_Call added in v1.4.0

type Transport_Close_Call struct {
	*mock.Call
}

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

func (*Transport_Close_Call) Return added in v1.4.0

func (*Transport_Close_Call) Run added in v1.4.0

func (_c *Transport_Close_Call) Run(run func()) *Transport_Close_Call

func (*Transport_Close_Call) RunAndReturn added in v1.4.0

func (_c *Transport_Close_Call) RunAndReturn(run func() error) *Transport_Close_Call

type Transport_Dial_Call added in v1.4.0

type Transport_Dial_Call struct {
	*mock.Call
}

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

func (*Transport_Dial_Call) Return added in v1.4.0

func (*Transport_Dial_Call) Run added in v1.4.0

func (_c *Transport_Dial_Call) Run(run func(_a0 context.Context, _a1 *p2p.Endpoint)) *Transport_Dial_Call

func (*Transport_Dial_Call) RunAndReturn added in v1.4.0

type Transport_Endpoint_Call added in v1.4.0

type Transport_Endpoint_Call struct {
	*mock.Call
}

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

func (*Transport_Endpoint_Call) Return added in v1.4.0

func (*Transport_Endpoint_Call) Run added in v1.4.0

func (_c *Transport_Endpoint_Call) Run(run func()) *Transport_Endpoint_Call

func (*Transport_Endpoint_Call) RunAndReturn added in v1.4.0

func (_c *Transport_Endpoint_Call) RunAndReturn(run func() (*p2p.Endpoint, error)) *Transport_Endpoint_Call

type Transport_Expecter added in v1.4.0

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

func (*Transport_Expecter) Accept added in v1.4.0

func (_e *Transport_Expecter) Accept(_a0 interface{}) *Transport_Accept_Call

Accept is a helper method to define mock.On call

  • _a0 context.Context

func (*Transport_Expecter) AddChannelDescriptors added in v1.4.0

func (_e *Transport_Expecter) AddChannelDescriptors(_a0 interface{}) *Transport_AddChannelDescriptors_Call

AddChannelDescriptors is a helper method to define mock.On call

  • _a0 []*p2p.ChannelDescriptor

func (*Transport_Expecter) Close added in v1.4.0

Close is a helper method to define mock.On call

func (*Transport_Expecter) Dial added in v1.4.0

func (_e *Transport_Expecter) Dial(_a0 interface{}, _a1 interface{}) *Transport_Dial_Call

Dial is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 *p2p.Endpoint

func (*Transport_Expecter) Endpoint added in v1.4.0

Endpoint is a helper method to define mock.On call

func (*Transport_Expecter) Listen added in v1.4.0

func (_e *Transport_Expecter) Listen(_a0 interface{}) *Transport_Listen_Call

Listen is a helper method to define mock.On call

  • _a0 *p2p.Endpoint

func (*Transport_Expecter) Protocols added in v1.4.0

Protocols is a helper method to define mock.On call

func (*Transport_Expecter) String added in v1.4.0

String is a helper method to define mock.On call

type Transport_Listen_Call added in v1.4.0

type Transport_Listen_Call struct {
	*mock.Call
}

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

func (*Transport_Listen_Call) Return added in v1.4.0

func (*Transport_Listen_Call) Run added in v1.4.0

func (_c *Transport_Listen_Call) Run(run func(_a0 *p2p.Endpoint)) *Transport_Listen_Call

func (*Transport_Listen_Call) RunAndReturn added in v1.4.0

func (_c *Transport_Listen_Call) RunAndReturn(run func(*p2p.Endpoint) error) *Transport_Listen_Call

type Transport_Protocols_Call added in v1.4.0

type Transport_Protocols_Call struct {
	*mock.Call
}

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

func (*Transport_Protocols_Call) Return added in v1.4.0

func (*Transport_Protocols_Call) Run added in v1.4.0

func (*Transport_Protocols_Call) RunAndReturn added in v1.4.0

func (_c *Transport_Protocols_Call) RunAndReturn(run func() []p2p.Protocol) *Transport_Protocols_Call

type Transport_String_Call added in v1.4.0

type Transport_String_Call struct {
	*mock.Call
}

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

func (*Transport_String_Call) Return added in v1.4.0

func (*Transport_String_Call) Run added in v1.4.0

func (_c *Transport_String_Call) Run(run func()) *Transport_String_Call

func (*Transport_String_Call) RunAndReturn added in v1.4.0

func (_c *Transport_String_Call) RunAndReturn(run func() string) *Transport_String_Call

Jump to

Keyboard shortcuts

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