mocks

package
v2.15.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DON added in v2.4.0

type DON struct {
	mock.Mock
}

DON is an autogenerated mock type for the DON type

func NewDON added in v2.4.0

func NewDON(t interface {
	mock.TestingT
	Cleanup(func())
}) *DON

NewDON creates a new instance of DON. 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 (*DON) EXPECT added in v2.15.0

func (_m *DON) EXPECT() *DON_Expecter

func (*DON) SendToNode added in v2.4.0

func (_m *DON) SendToNode(ctx context.Context, nodeAddress string, msg *api.Message) error

SendToNode provides a mock function with given fields: ctx, nodeAddress, msg

type DON_Expecter added in v2.15.0

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

func (*DON_Expecter) SendToNode added in v2.15.0

func (_e *DON_Expecter) SendToNode(ctx interface{}, nodeAddress interface{}, msg interface{}) *DON_SendToNode_Call

SendToNode is a helper method to define mock.On call

  • ctx context.Context
  • nodeAddress string
  • msg *api.Message

type DON_SendToNode_Call added in v2.15.0

type DON_SendToNode_Call struct {
	*mock.Call
}

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

func (*DON_SendToNode_Call) Return added in v2.15.0

func (*DON_SendToNode_Call) Run added in v2.15.0

func (_c *DON_SendToNode_Call) Run(run func(ctx context.Context, nodeAddress string, msg *api.Message)) *DON_SendToNode_Call

func (*DON_SendToNode_Call) RunAndReturn added in v2.15.0

type Handler

type Handler struct {
	mock.Mock
}

Handler is an autogenerated mock type for the Handler type

func NewHandler

func NewHandler(t interface {
	mock.TestingT
	Cleanup(func())
}) *Handler

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

func (_m *Handler) Close() error

Close provides a mock function with given fields:

func (*Handler) EXPECT added in v2.15.0

func (_m *Handler) EXPECT() *Handler_Expecter

func (*Handler) HandleNodeMessage

func (_m *Handler) HandleNodeMessage(ctx context.Context, msg *api.Message, nodeAddr string) error

HandleNodeMessage provides a mock function with given fields: ctx, msg, nodeAddr

func (*Handler) HandleUserMessage

func (_m *Handler) HandleUserMessage(ctx context.Context, msg *api.Message, callbackCh chan<- handlers.UserCallbackPayload) error

HandleUserMessage provides a mock function with given fields: ctx, msg, callbackCh

func (*Handler) Start

func (_m *Handler) Start(_a0 context.Context) error

Start provides a mock function with given fields: _a0

type Handler_Close_Call added in v2.15.0

type Handler_Close_Call struct {
	*mock.Call
}

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

func (*Handler_Close_Call) Return added in v2.15.0

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

func (*Handler_Close_Call) Run added in v2.15.0

func (_c *Handler_Close_Call) Run(run func()) *Handler_Close_Call

func (*Handler_Close_Call) RunAndReturn added in v2.15.0

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

type Handler_Expecter added in v2.15.0

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

func (*Handler_Expecter) Close added in v2.15.0

func (_e *Handler_Expecter) Close() *Handler_Close_Call

Close is a helper method to define mock.On call

func (*Handler_Expecter) HandleNodeMessage added in v2.15.0

func (_e *Handler_Expecter) HandleNodeMessage(ctx interface{}, msg interface{}, nodeAddr interface{}) *Handler_HandleNodeMessage_Call

HandleNodeMessage is a helper method to define mock.On call

  • ctx context.Context
  • msg *api.Message
  • nodeAddr string

func (*Handler_Expecter) HandleUserMessage added in v2.15.0

func (_e *Handler_Expecter) HandleUserMessage(ctx interface{}, msg interface{}, callbackCh interface{}) *Handler_HandleUserMessage_Call

HandleUserMessage is a helper method to define mock.On call

  • ctx context.Context
  • msg *api.Message
  • callbackCh chan<- handlers.UserCallbackPayload

func (*Handler_Expecter) Start added in v2.15.0

func (_e *Handler_Expecter) Start(_a0 interface{}) *Handler_Start_Call

Start is a helper method to define mock.On call

  • _a0 context.Context

type Handler_HandleNodeMessage_Call added in v2.15.0

type Handler_HandleNodeMessage_Call struct {
	*mock.Call
}

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

func (*Handler_HandleNodeMessage_Call) Return added in v2.15.0

func (*Handler_HandleNodeMessage_Call) Run added in v2.15.0

func (*Handler_HandleNodeMessage_Call) RunAndReturn added in v2.15.0

type Handler_HandleUserMessage_Call added in v2.15.0

type Handler_HandleUserMessage_Call struct {
	*mock.Call
}

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

func (*Handler_HandleUserMessage_Call) Return added in v2.15.0

func (*Handler_HandleUserMessage_Call) Run added in v2.15.0

func (*Handler_HandleUserMessage_Call) RunAndReturn added in v2.15.0

type Handler_Start_Call added in v2.15.0

type Handler_Start_Call struct {
	*mock.Call
}

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

func (*Handler_Start_Call) Return added in v2.15.0

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

func (*Handler_Start_Call) Run added in v2.15.0

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

func (*Handler_Start_Call) RunAndReturn added in v2.15.0

func (_c *Handler_Start_Call) RunAndReturn(run func(context.Context) error) *Handler_Start_Call

Jump to

Keyboard shortcuts

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