mockmutex

package
v0.0.0-...-a02da8a Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockMutex

type MockMutex struct {
	mock.Mock
}

MockMutex is an autogenerated mock type for the Mutex type

func NewMockMutex

func NewMockMutex(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockMutex

NewMockMutex creates a new instance of MockMutex. 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 (*MockMutex) EXPECT

func (_m *MockMutex) EXPECT() *MockMutex_Expecter

func (*MockMutex) Lock

func (_m *MockMutex) Lock(ctx context.Context) error

Lock provides a mock function with given fields: ctx

func (*MockMutex) Unlock

func (_m *MockMutex) Unlock(ctx context.Context) (bool, error)

Unlock provides a mock function with given fields: ctx

type MockMutexProvider

type MockMutexProvider struct {
	mock.Mock
}

MockMutexProvider is an autogenerated mock type for the MutexProvider type

func NewMockMutexProvider

func NewMockMutexProvider(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockMutexProvider

NewMockMutexProvider creates a new instance of MockMutexProvider. 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 (*MockMutexProvider) EXPECT

func (*MockMutexProvider) ProvideCreateUserMutex

func (_m *MockMutexProvider) ProvideCreateUserMutex(uid uint32) mutex.Mutex

ProvideCreateUserMutex provides a mock function with given fields: uid

type MockMutexProvider_Expecter

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

func (*MockMutexProvider_Expecter) ProvideCreateUserMutex

func (_e *MockMutexProvider_Expecter) ProvideCreateUserMutex(uid interface{}) *MockMutexProvider_ProvideCreateUserMutex_Call

ProvideCreateUserMutex is a helper method to define mock.On call

  • uid uint32

type MockMutexProvider_ProvideCreateUserMutex_Call

type MockMutexProvider_ProvideCreateUserMutex_Call struct {
	*mock.Call
}

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

func (*MockMutexProvider_ProvideCreateUserMutex_Call) Return

func (*MockMutexProvider_ProvideCreateUserMutex_Call) Run

func (*MockMutexProvider_ProvideCreateUserMutex_Call) RunAndReturn

type MockMutex_Expecter

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

func (*MockMutex_Expecter) Lock

func (_e *MockMutex_Expecter) Lock(ctx interface{}) *MockMutex_Lock_Call

Lock is a helper method to define mock.On call

  • ctx context.Context

func (*MockMutex_Expecter) Unlock

func (_e *MockMutex_Expecter) Unlock(ctx interface{}) *MockMutex_Unlock_Call

Unlock is a helper method to define mock.On call

  • ctx context.Context

type MockMutex_Lock_Call

type MockMutex_Lock_Call struct {
	*mock.Call
}

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

func (*MockMutex_Lock_Call) Return

func (*MockMutex_Lock_Call) Run

func (_c *MockMutex_Lock_Call) Run(run func(ctx context.Context)) *MockMutex_Lock_Call

func (*MockMutex_Lock_Call) RunAndReturn

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

type MockMutex_Unlock_Call

type MockMutex_Unlock_Call struct {
	*mock.Call
}

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

func (*MockMutex_Unlock_Call) Return

func (*MockMutex_Unlock_Call) Run

func (*MockMutex_Unlock_Call) RunAndReturn

func (_c *MockMutex_Unlock_Call) RunAndReturn(run func(context.Context) (bool, error)) *MockMutex_Unlock_Call

Jump to

Keyboard shortcuts

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