// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" "time" "bnema.dev/ermite/internal/domain" mock "github.com/stretchr/testify/mock" ) // NewWebPasskeyService creates a new instance of WebPasskeyService. 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 NewWebPasskeyService(t interface { mock.TestingT Cleanup(func()) }) *WebPasskeyService { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &WebPasskeyService{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // WebPasskeyService is an autogenerated mock type for the WebPasskeyService type type WebPasskeyService struct { mock.Mock } type WebPasskeyService_Expecter struct { mock *mock.Mock } func (_m *WebPasskeyService) EXPECT() *WebPasskeyService_Expecter { return &WebPasskeyService_Expecter{mock: &_m.Mock} } // BeginLogin provides a mock function for the type WebPasskeyService func (_mock *WebPasskeyService) BeginLogin(ctx context.Context, client string) (string, []byte, error) { ret := _mock.Called(ctx, client) if len(ret) == 0 { panic("no return value specified for BeginLogin") } var r0 string var r1 []byte var r2 error if returnFunc, ok := ret.Get(0).(func(context.Context, string) (string, []byte, error)); ok { return returnFunc(ctx, client) } if returnFunc, ok := ret.Get(0).(func(context.Context, string) string); ok { r0 = returnFunc(ctx, client) } else { r0 = ret.Get(0).(string) } if returnFunc, ok := ret.Get(1).(func(context.Context, string) []byte); ok { r1 = returnFunc(ctx, client) } else { if ret.Get(1) != nil { r1 = ret.Get(1).([]byte) } } if returnFunc, ok := ret.Get(2).(func(context.Context, string) error); ok { r2 = returnFunc(ctx, client) } else { r2 = ret.Error(2) } return r0, r1, r2 } // WebPasskeyService_BeginLogin_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BeginLogin' type WebPasskeyService_BeginLogin_Call struct { *mock.Call } // BeginLogin is a helper method to define mock.On call // - ctx context.Context // - client string func (_e *WebPasskeyService_Expecter) BeginLogin(ctx any, client any) *WebPasskeyService_BeginLogin_Call { return &WebPasskeyService_BeginLogin_Call{Call: _e.mock.On("BeginLogin", ctx, client)} } func (_c *WebPasskeyService_BeginLogin_Call) Run(run func(ctx context.Context, client string)) *WebPasskeyService_BeginLogin_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 string if args[1] != nil { arg1 = args[1].(string) } run( arg0, arg1, ) }) return _c } func (_c *WebPasskeyService_BeginLogin_Call) Return(ceremony string, options []byte, err error) *WebPasskeyService_BeginLogin_Call { _c.Call.Return(ceremony, options, err) return _c } func (_c *WebPasskeyService_BeginLogin_Call) RunAndReturn(run func(ctx context.Context, client string) (string, []byte, error)) *WebPasskeyService_BeginLogin_Call { _c.Call.Return(run) return _c } // BeginRegistration provides a mock function for the type WebPasskeyService func (_mock *WebPasskeyService) BeginRegistration(ctx context.Context, p domain.Principal, name string) (string, []byte, error) { ret := _mock.Called(ctx, p, name) if len(ret) == 0 { panic("no return value specified for BeginRegistration") } var r0 string var r1 []byte var r2 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, string) (string, []byte, error)); ok { return returnFunc(ctx, p, name) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, string) string); ok { r0 = returnFunc(ctx, p, name) } else { r0 = ret.Get(0).(string) } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal, string) []byte); ok { r1 = returnFunc(ctx, p, name) } else { if ret.Get(1) != nil { r1 = ret.Get(1).([]byte) } } if returnFunc, ok := ret.Get(2).(func(context.Context, domain.Principal, string) error); ok { r2 = returnFunc(ctx, p, name) } else { r2 = ret.Error(2) } return r0, r1, r2 } // WebPasskeyService_BeginRegistration_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BeginRegistration' type WebPasskeyService_BeginRegistration_Call struct { *mock.Call } // BeginRegistration is a helper method to define mock.On call // - ctx context.Context // - p domain.Principal // - name string func (_e *WebPasskeyService_Expecter) BeginRegistration(ctx any, p any, name any) *WebPasskeyService_BeginRegistration_Call { return &WebPasskeyService_BeginRegistration_Call{Call: _e.mock.On("BeginRegistration", ctx, p, name)} } func (_c *WebPasskeyService_BeginRegistration_Call) Run(run func(ctx context.Context, p domain.Principal, name string)) *WebPasskeyService_BeginRegistration_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.Principal if args[1] != nil { arg1 = args[1].(domain.Principal) } var arg2 string if args[2] != nil { arg2 = args[2].(string) } run( arg0, arg1, arg2, ) }) return _c } func (_c *WebPasskeyService_BeginRegistration_Call) Return(ceremony string, options []byte, err error) *WebPasskeyService_BeginRegistration_Call { _c.Call.Return(ceremony, options, err) return _c } func (_c *WebPasskeyService_BeginRegistration_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, name string) (string, []byte, error)) *WebPasskeyService_BeginRegistration_Call { _c.Call.Return(run) return _c } // FinishLogin provides a mock function for the type WebPasskeyService func (_mock *WebPasskeyService) FinishLogin(ctx context.Context, ceremony string, response []byte) (string, time.Duration, error) { ret := _mock.Called(ctx, ceremony, response) if len(ret) == 0 { panic("no return value specified for FinishLogin") } var r0 string var r1 time.Duration var r2 error if returnFunc, ok := ret.Get(0).(func(context.Context, string, []byte) (string, time.Duration, error)); ok { return returnFunc(ctx, ceremony, response) } if returnFunc, ok := ret.Get(0).(func(context.Context, string, []byte) string); ok { r0 = returnFunc(ctx, ceremony, response) } else { r0 = ret.Get(0).(string) } if returnFunc, ok := ret.Get(1).(func(context.Context, string, []byte) time.Duration); ok { r1 = returnFunc(ctx, ceremony, response) } else { r1 = ret.Get(1).(time.Duration) } if returnFunc, ok := ret.Get(2).(func(context.Context, string, []byte) error); ok { r2 = returnFunc(ctx, ceremony, response) } else { r2 = ret.Error(2) } return r0, r1, r2 } // WebPasskeyService_FinishLogin_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FinishLogin' type WebPasskeyService_FinishLogin_Call struct { *mock.Call } // FinishLogin is a helper method to define mock.On call // - ctx context.Context // - ceremony string // - response []byte func (_e *WebPasskeyService_Expecter) FinishLogin(ctx any, ceremony any, response any) *WebPasskeyService_FinishLogin_Call { return &WebPasskeyService_FinishLogin_Call{Call: _e.mock.On("FinishLogin", ctx, ceremony, response)} } func (_c *WebPasskeyService_FinishLogin_Call) Run(run func(ctx context.Context, ceremony string, response []byte)) *WebPasskeyService_FinishLogin_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 string if args[1] != nil { arg1 = args[1].(string) } var arg2 []byte if args[2] != nil { arg2 = args[2].([]byte) } run( arg0, arg1, arg2, ) }) return _c } func (_c *WebPasskeyService_FinishLogin_Call) Return(token string, lifetime time.Duration, err error) *WebPasskeyService_FinishLogin_Call { _c.Call.Return(token, lifetime, err) return _c } func (_c *WebPasskeyService_FinishLogin_Call) RunAndReturn(run func(ctx context.Context, ceremony string, response []byte) (string, time.Duration, error)) *WebPasskeyService_FinishLogin_Call { _c.Call.Return(run) return _c } // FinishRegistration provides a mock function for the type WebPasskeyService func (_mock *WebPasskeyService) FinishRegistration(ctx context.Context, p domain.Principal, ceremony string, response []byte) error { ret := _mock.Called(ctx, p, ceremony, response) if len(ret) == 0 { panic("no return value specified for FinishRegistration") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, string, []byte) error); ok { r0 = returnFunc(ctx, p, ceremony, response) } else { r0 = ret.Error(0) } return r0 } // WebPasskeyService_FinishRegistration_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FinishRegistration' type WebPasskeyService_FinishRegistration_Call struct { *mock.Call } // FinishRegistration is a helper method to define mock.On call // - ctx context.Context // - p domain.Principal // - ceremony string // - response []byte func (_e *WebPasskeyService_Expecter) FinishRegistration(ctx any, p any, ceremony any, response any) *WebPasskeyService_FinishRegistration_Call { return &WebPasskeyService_FinishRegistration_Call{Call: _e.mock.On("FinishRegistration", ctx, p, ceremony, response)} } func (_c *WebPasskeyService_FinishRegistration_Call) Run(run func(ctx context.Context, p domain.Principal, ceremony string, response []byte)) *WebPasskeyService_FinishRegistration_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.Principal if args[1] != nil { arg1 = args[1].(domain.Principal) } var arg2 string if args[2] != nil { arg2 = args[2].(string) } var arg3 []byte if args[3] != nil { arg3 = args[3].([]byte) } run( arg0, arg1, arg2, arg3, ) }) return _c } func (_c *WebPasskeyService_FinishRegistration_Call) Return(err error) *WebPasskeyService_FinishRegistration_Call { _c.Call.Return(err) return _c } func (_c *WebPasskeyService_FinishRegistration_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, ceremony string, response []byte) error) *WebPasskeyService_FinishRegistration_Call { _c.Call.Return(run) return _c } // List provides a mock function for the type WebPasskeyService func (_mock *WebPasskeyService) List(ctx context.Context, p domain.Principal) ([]domain.Passkey, error) { ret := _mock.Called(ctx, p) 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.Principal) ([]domain.Passkey, error)); ok { return returnFunc(ctx, p) } if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal) []domain.Passkey); ok { r0 = returnFunc(ctx, p) } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]domain.Passkey) } } if returnFunc, ok := ret.Get(1).(func(context.Context, domain.Principal) error); ok { r1 = returnFunc(ctx, p) } else { r1 = ret.Error(1) } return r0, r1 } // WebPasskeyService_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List' type WebPasskeyService_List_Call struct { *mock.Call } // List is a helper method to define mock.On call // - ctx context.Context // - p domain.Principal func (_e *WebPasskeyService_Expecter) List(ctx any, p any) *WebPasskeyService_List_Call { return &WebPasskeyService_List_Call{Call: _e.mock.On("List", ctx, p)} } func (_c *WebPasskeyService_List_Call) Run(run func(ctx context.Context, p domain.Principal)) *WebPasskeyService_List_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.Principal if args[1] != nil { arg1 = args[1].(domain.Principal) } run( arg0, arg1, ) }) return _c } func (_c *WebPasskeyService_List_Call) Return(passkeys []domain.Passkey, err error) *WebPasskeyService_List_Call { _c.Call.Return(passkeys, err) return _c } func (_c *WebPasskeyService_List_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal) ([]domain.Passkey, error)) *WebPasskeyService_List_Call { _c.Call.Return(run) return _c } // Remove provides a mock function for the type WebPasskeyService func (_mock *WebPasskeyService) Remove(ctx context.Context, p domain.Principal, id []byte) error { ret := _mock.Called(ctx, p, id) if len(ret) == 0 { panic("no return value specified for Remove") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Principal, []byte) error); ok { r0 = returnFunc(ctx, p, id) } else { r0 = ret.Error(0) } return r0 } // WebPasskeyService_Remove_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Remove' type WebPasskeyService_Remove_Call struct { *mock.Call } // Remove is a helper method to define mock.On call // - ctx context.Context // - p domain.Principal // - id []byte func (_e *WebPasskeyService_Expecter) Remove(ctx any, p any, id any) *WebPasskeyService_Remove_Call { return &WebPasskeyService_Remove_Call{Call: _e.mock.On("Remove", ctx, p, id)} } func (_c *WebPasskeyService_Remove_Call) Run(run func(ctx context.Context, p domain.Principal, id []byte)) *WebPasskeyService_Remove_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 domain.Principal if args[1] != nil { arg1 = args[1].(domain.Principal) } var arg2 []byte if args[2] != nil { arg2 = args[2].([]byte) } run( arg0, arg1, arg2, ) }) return _c } func (_c *WebPasskeyService_Remove_Call) Return(err error) *WebPasskeyService_Remove_Call { _c.Call.Return(err) return _c } func (_c *WebPasskeyService_Remove_Call) RunAndReturn(run func(ctx context.Context, p domain.Principal, id []byte) error) *WebPasskeyService_Remove_Call { _c.Call.Return(run) return _c }