mock_lazygrpc

package
v0.10.3-0...-8fe6c1c Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 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 MockService

type MockService[T interface{}] struct {
	mock.Mock
}

MockService is an autogenerated mock type for the Service type

func NewMockService

func NewMockService[T interface{}](t interface {
	mock.TestingT
	Cleanup(func())
}) *MockService[T]

NewMockService creates a new instance of MockService. 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 (*MockService[T]) Close

func (_m *MockService[T]) Close()

Close provides a mock function with given fields:

func (*MockService[T]) EXPECT

func (_m *MockService[T]) EXPECT() *MockService_Expecter[T]

func (*MockService[T]) GetConn

func (_m *MockService[T]) GetConn(ctx context.Context) (*grpc.ClientConn, error)

GetConn provides a mock function with given fields: ctx

func (*MockService[T]) GetService

func (_m *MockService[T]) GetService(ctx context.Context) (T, error)

GetService provides a mock function with given fields: ctx

type MockService_Close_Call

type MockService_Close_Call[T interface{}] struct {
	*mock.Call
}

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

func (*MockService_Close_Call[T]) Return

func (_c *MockService_Close_Call[T]) Return() *MockService_Close_Call[T]

func (*MockService_Close_Call[T]) Run

func (_c *MockService_Close_Call[T]) Run(run func()) *MockService_Close_Call[T]

func (*MockService_Close_Call[T]) RunAndReturn

func (_c *MockService_Close_Call[T]) RunAndReturn(run func()) *MockService_Close_Call[T]

type MockService_Expecter

type MockService_Expecter[T interface{}] struct {
	// contains filtered or unexported fields
}

func (*MockService_Expecter[T]) Close

func (_e *MockService_Expecter[T]) Close() *MockService_Close_Call[T]

Close is a helper method to define mock.On call

func (*MockService_Expecter[T]) GetConn

func (_e *MockService_Expecter[T]) GetConn(ctx interface{}) *MockService_GetConn_Call[T]

GetConn is a helper method to define mock.On call

  • ctx context.Context

func (*MockService_Expecter[T]) GetService

func (_e *MockService_Expecter[T]) GetService(ctx interface{}) *MockService_GetService_Call[T]

GetService is a helper method to define mock.On call

  • ctx context.Context

type MockService_GetConn_Call

type MockService_GetConn_Call[T interface{}] struct {
	*mock.Call
}

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

func (*MockService_GetConn_Call[T]) Return

func (*MockService_GetConn_Call[T]) Run

func (_c *MockService_GetConn_Call[T]) Run(run func(ctx context.Context)) *MockService_GetConn_Call[T]

func (*MockService_GetConn_Call[T]) RunAndReturn

func (_c *MockService_GetConn_Call[T]) RunAndReturn(run func(context.Context) (*grpc.ClientConn, error)) *MockService_GetConn_Call[T]

type MockService_GetService_Call

type MockService_GetService_Call[T interface{}] struct {
	*mock.Call
}

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

func (*MockService_GetService_Call[T]) Return

func (_c *MockService_GetService_Call[T]) Return(_a0 T, _a1 error) *MockService_GetService_Call[T]

func (*MockService_GetService_Call[T]) Run

func (*MockService_GetService_Call[T]) RunAndReturn

func (_c *MockService_GetService_Call[T]) RunAndReturn(run func(context.Context) (T, error)) *MockService_GetService_Call[T]

Jump to

Keyboard shortcuts

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