mocks

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockPubSub

type MockPubSub struct {
	mock.Mock
}

MockPubSub is an autogenerated mock type for the PubSub type

func NewMockPubSub

func NewMockPubSub(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockPubSub

NewMockPubSub creates a new instance of MockPubSub. 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 (*MockPubSub) Disconnect

func (_mock *MockPubSub) Disconnect(ctx context.Context) error

Disconnect provides a mock function for the type MockPubSub

func (*MockPubSub) EXPECT

func (_m *MockPubSub) EXPECT() *MockPubSub_Expecter

func (*MockPubSub) Publish

func (_mock *MockPubSub) Publish(ctx context.Context, topic string, msg any) error

Publish provides a mock function for the type MockPubSub

func (*MockPubSub) Subscribe

func (_mock *MockPubSub) Subscribe(ctx context.Context, topic string, handler mqtt.Handler) error

Subscribe provides a mock function for the type MockPubSub

func (*MockPubSub) Unsubscribe

func (_mock *MockPubSub) Unsubscribe(ctx context.Context, topic string) error

Unsubscribe provides a mock function for the type MockPubSub

type MockPubSub_Disconnect_Call

type MockPubSub_Disconnect_Call struct {
	*mock.Call
}

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

func (*MockPubSub_Disconnect_Call) Return

func (*MockPubSub_Disconnect_Call) Run

func (*MockPubSub_Disconnect_Call) RunAndReturn

type MockPubSub_Expecter

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

func (*MockPubSub_Expecter) Disconnect

func (_e *MockPubSub_Expecter) Disconnect(ctx interface{}) *MockPubSub_Disconnect_Call

Disconnect is a helper method to define mock.On call

  • ctx context.Context

func (*MockPubSub_Expecter) Publish

func (_e *MockPubSub_Expecter) Publish(ctx interface{}, topic interface{}, msg interface{}) *MockPubSub_Publish_Call

Publish is a helper method to define mock.On call

  • ctx context.Context
  • topic string
  • msg any

func (*MockPubSub_Expecter) Subscribe

func (_e *MockPubSub_Expecter) Subscribe(ctx interface{}, topic interface{}, handler interface{}) *MockPubSub_Subscribe_Call

Subscribe is a helper method to define mock.On call

  • ctx context.Context
  • topic string
  • handler mqtt.Handler

func (*MockPubSub_Expecter) Unsubscribe

func (_e *MockPubSub_Expecter) Unsubscribe(ctx interface{}, topic interface{}) *MockPubSub_Unsubscribe_Call

Unsubscribe is a helper method to define mock.On call

  • ctx context.Context
  • topic string

type MockPubSub_Publish_Call

type MockPubSub_Publish_Call struct {
	*mock.Call
}

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

func (*MockPubSub_Publish_Call) Return

func (*MockPubSub_Publish_Call) Run

func (_c *MockPubSub_Publish_Call) Run(run func(ctx context.Context, topic string, msg any)) *MockPubSub_Publish_Call

func (*MockPubSub_Publish_Call) RunAndReturn

func (_c *MockPubSub_Publish_Call) RunAndReturn(run func(ctx context.Context, topic string, msg any) error) *MockPubSub_Publish_Call

type MockPubSub_Subscribe_Call

type MockPubSub_Subscribe_Call struct {
	*mock.Call
}

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

func (*MockPubSub_Subscribe_Call) Return

func (*MockPubSub_Subscribe_Call) Run

func (_c *MockPubSub_Subscribe_Call) Run(run func(ctx context.Context, topic string, handler mqtt.Handler)) *MockPubSub_Subscribe_Call

func (*MockPubSub_Subscribe_Call) RunAndReturn

func (_c *MockPubSub_Subscribe_Call) RunAndReturn(run func(ctx context.Context, topic string, handler mqtt.Handler) error) *MockPubSub_Subscribe_Call

type MockPubSub_Unsubscribe_Call

type MockPubSub_Unsubscribe_Call struct {
	*mock.Call
}

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

func (*MockPubSub_Unsubscribe_Call) Return

func (*MockPubSub_Unsubscribe_Call) Run

func (*MockPubSub_Unsubscribe_Call) RunAndReturn

func (_c *MockPubSub_Unsubscribe_Call) RunAndReturn(run func(ctx context.Context, topic string) error) *MockPubSub_Unsubscribe_Call

Jump to

Keyboard shortcuts

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