// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" "bnema.dev/ermite/internal/domain" mock "github.com/stretchr/testify/mock" ) // NewPasskeyStore creates a new instance of PasskeyStore. 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 NewPasskeyStore(t interface { mock.TestingT Cleanup(func()) }) *PasskeyStore { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &PasskeyStore{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // PasskeyStore is an autogenerated mock type for the PasskeyStore type type PasskeyStore struct { mock.Mock } type PasskeyStore_Expecter struct { mock *mock.Mock } func (_m *PasskeyStore) EXPECT() *PasskeyStore_Expecter { return &PasskeyStore_Expecter{mock: &_m.Mock} } // Create provides a mock function for the type PasskeyStore func (_mock *PasskeyStore) Create(ctx context.Context, p domain.Passkey) error { ret := _mock.Called(ctx, p) if len(ret) == 0 { panic("no return value specified for Create") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Passkey) error); ok { r0 = returnFunc(ctx, p) } else { r0 = ret.Error(0) } return r0 } // PasskeyStore_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create' type PasskeyStore_Create_Call struct { *mock.Call } // Create is a helper method to define mock.On call // - ctx context.Context // - p domain.Passkey func (_e *PasskeyStore_Expecter) Create(ctx any, p any) *PasskeyStore_Create_Call { return &PasskeyStore_Create_Call{Call: _e.mock.On("Create", ctx, p)} } func (_c *PasskeyStore_Create_Call) Run(run func(ctx context.Context, p domain.Passkey)) *PasskeyStore_Create_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.Passkey if args[1] != nil { arg1 = args[1].(domain.Passkey) } run( arg0, arg1, ) }) return _c } func (_c *PasskeyStore_Create_Call) Return(err error) *PasskeyStore_Create_Call { _c.Call.Return(err) return _c } func (_c *PasskeyStore_Create_Call) RunAndReturn(run func(ctx context.Context, p domain.Passkey) error) *PasskeyStore_Create_Call { _c.Call.Return(run) return _c } // Delete provides a mock function for the type PasskeyStore func (_mock *PasskeyStore) Delete(ctx context.Context, id []byte) error { ret := _mock.Called(ctx, id) if len(ret) == 0 { panic("no return value specified for Delete") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, []byte) error); ok { r0 = returnFunc(ctx, id) } else { r0 = ret.Error(0) } return r0 } // PasskeyStore_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete' type PasskeyStore_Delete_Call struct { *mock.Call } // Delete is a helper method to define mock.On call // - ctx context.Context // - id []byte func (_e *PasskeyStore_Expecter) Delete(ctx any, id any) *PasskeyStore_Delete_Call { return &PasskeyStore_Delete_Call{Call: _e.mock.On("Delete", ctx, id)} } func (_c *PasskeyStore_Delete_Call) Run(run func(ctx context.Context, id []byte)) *PasskeyStore_Delete_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 []byte if args[1] != nil { arg1 = args[1].([]byte) } run( arg0, arg1, ) }) return _c } func (_c *PasskeyStore_Delete_Call) Return(err error) *PasskeyStore_Delete_Call { _c.Call.Return(err) return _c } func (_c *PasskeyStore_Delete_Call) RunAndReturn(run func(ctx context.Context, id []byte) error) *PasskeyStore_Delete_Call { _c.Call.Return(run) return _c } // Get provides a mock function for the type PasskeyStore func (_mock *PasskeyStore) Get(ctx context.Context, id []byte) (domain.Passkey, error) { ret := _mock.Called(ctx, id) if len(ret) == 0 { panic("no return value specified for Get") } var r0 domain.Passkey var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, []byte) (domain.Passkey, error)); ok { return returnFunc(ctx, id) } if returnFunc, ok := ret.Get(0).(func(context.Context, []byte) domain.Passkey); ok { r0 = returnFunc(ctx, id) } else { r0 = ret.Get(0).(domain.Passkey) } if returnFunc, ok := ret.Get(1).(func(context.Context, []byte) error); ok { r1 = returnFunc(ctx, id) } else { r1 = ret.Error(1) } return r0, r1 } // PasskeyStore_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get' type PasskeyStore_Get_Call struct { *mock.Call } // Get is a helper method to define mock.On call // - ctx context.Context // - id []byte func (_e *PasskeyStore_Expecter) Get(ctx any, id any) *PasskeyStore_Get_Call { return &PasskeyStore_Get_Call{Call: _e.mock.On("Get", ctx, id)} } func (_c *PasskeyStore_Get_Call) Run(run func(ctx context.Context, id []byte)) *PasskeyStore_Get_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 []byte if args[1] != nil { arg1 = args[1].([]byte) } run( arg0, arg1, ) }) return _c } func (_c *PasskeyStore_Get_Call) Return(passkey domain.Passkey, err error) *PasskeyStore_Get_Call { _c.Call.Return(passkey, err) return _c } func (_c *PasskeyStore_Get_Call) RunAndReturn(run func(ctx context.Context, id []byte) (domain.Passkey, error)) *PasskeyStore_Get_Call { _c.Call.Return(run) return _c } // List provides a mock function for the type PasskeyStore func (_mock *PasskeyStore) List(ctx context.Context) ([]domain.Passkey, error) { ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for List") } var r0 []domain.Passkey var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context) ([]domain.Passkey, error)); ok { return returnFunc(ctx) } if returnFunc, ok := ret.Get(0).(func(context.Context) []domain.Passkey); ok { r0 = returnFunc(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]domain.Passkey) } } if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { r1 = returnFunc(ctx) } else { r1 = ret.Error(1) } return r0, r1 } // PasskeyStore_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' type PasskeyStore_List_Call struct { *mock.Call } // List is a helper method to define mock.On call // - ctx context.Context func (_e *PasskeyStore_Expecter) List(ctx any) *PasskeyStore_List_Call { return &PasskeyStore_List_Call{Call: _e.mock.On("List", ctx)} } func (_c *PasskeyStore_List_Call) Run(run func(ctx context.Context)) *PasskeyStore_List_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } run( arg0, ) }) return _c } func (_c *PasskeyStore_List_Call) Return(passkeys []domain.Passkey, err error) *PasskeyStore_List_Call { _c.Call.Return(passkeys, err) return _c } func (_c *PasskeyStore_List_Call) RunAndReturn(run func(ctx context.Context) ([]domain.Passkey, error)) *PasskeyStore_List_Call { _c.Call.Return(run) return _c } // Update provides a mock function for the type PasskeyStore func (_mock *PasskeyStore) Update(ctx context.Context, p domain.Passkey) error { ret := _mock.Called(ctx, p) if len(ret) == 0 { panic("no return value specified for Update") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Passkey) error); ok { r0 = returnFunc(ctx, p) } else { r0 = ret.Error(0) } return r0 } // PasskeyStore_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update' type PasskeyStore_Update_Call struct { *mock.Call } // Update is a helper method to define mock.On call // - ctx context.Context // - p domain.Passkey func (_e *PasskeyStore_Expecter) Update(ctx any, p any) *PasskeyStore_Update_Call { return &PasskeyStore_Update_Call{Call: _e.mock.On("Update", ctx, p)} } func (_c *PasskeyStore_Update_Call) Run(run func(ctx context.Context, p domain.Passkey)) *PasskeyStore_Update_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.Passkey if args[1] != nil { arg1 = args[1].(domain.Passkey) } run( arg0, arg1, ) }) return _c } func (_c *PasskeyStore_Update_Call) Return(err error) *PasskeyStore_Update_Call { _c.Call.Return(err) return _c } func (_c *PasskeyStore_Update_Call) RunAndReturn(run func(ctx context.Context, p domain.Passkey) error) *PasskeyStore_Update_Call { _c.Call.Return(run) return _c } // UserHandle provides a mock function for the type PasskeyStore func (_mock *PasskeyStore) UserHandle(ctx context.Context) ([]byte, error) { ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for UserHandle") } var r0 []byte var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context) ([]byte, error)); ok { return returnFunc(ctx) } if returnFunc, ok := ret.Get(0).(func(context.Context) []byte); ok { r0 = returnFunc(ctx) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]byte) } } if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok { r1 = returnFunc(ctx) } else { r1 = ret.Error(1) } return r0, r1 } // PasskeyStore_UserHandle_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UserHandle' type PasskeyStore_UserHandle_Call struct { *mock.Call } // UserHandle is a helper method to define mock.On call // - ctx context.Context func (_e *PasskeyStore_Expecter) UserHandle(ctx any) *PasskeyStore_UserHandle_Call { return &PasskeyStore_UserHandle_Call{Call: _e.mock.On("UserHandle", ctx)} } func (_c *PasskeyStore_UserHandle_Call) Run(run func(ctx context.Context)) *PasskeyStore_UserHandle_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } run( arg0, ) }) return _c } func (_c *PasskeyStore_UserHandle_Call) Return(bytes []byte, err error) *PasskeyStore_UserHandle_Call { _c.Call.Return(bytes, err) return _c } func (_c *PasskeyStore_UserHandle_Call) RunAndReturn(run func(ctx context.Context) ([]byte, error)) *PasskeyStore_UserHandle_Call { _c.Call.Return(run) return _c }