v0.21.0 ef38ad0

PasskeyStore.go RawHistoryFolder

1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package mocks
6
7import (
8	"context"
9
10	"bnema.dev/ermite/internal/domain"
11	mock "github.com/stretchr/testify/mock"
12)
13
14// 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.
15// The first argument is typically a *testing.T value.
16func NewPasskeyStore(t interface {
17	mock.TestingT
18	Cleanup(func())
19}) *PasskeyStore {
20	if helper, ok := t.(interface{ Helper() }); ok {
21		helper.Helper()
22	}
23
24	mock := &PasskeyStore{}
25	mock.Mock.Test(t)
26
27	t.Cleanup(func() {
28		if helper, ok := t.(interface{ Helper() }); ok {
29			helper.Helper()
30		}
31		mock.AssertExpectations(t)
32	})
33
34	return mock
35}
36
37// PasskeyStore is an autogenerated mock type for the PasskeyStore type
38type PasskeyStore struct {
39	mock.Mock
40}
41
42type PasskeyStore_Expecter struct {
43	mock *mock.Mock
44}
45
46func (_m *PasskeyStore) EXPECT() *PasskeyStore_Expecter {
47	return &PasskeyStore_Expecter{mock: &_m.Mock}
48}
49
50// Create provides a mock function for the type PasskeyStore
51func (_mock *PasskeyStore) Create(ctx context.Context, p domain.Passkey) error {
52	ret := _mock.Called(ctx, p)
53
54	if len(ret) == 0 {
55		panic("no return value specified for Create")
56	}
57
58	var r0 error
59	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Passkey) error); ok {
60		r0 = returnFunc(ctx, p)
61	} else {
62		r0 = ret.Error(0)
63	}
64	return r0
65}
66
67// PasskeyStore_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create'
68type PasskeyStore_Create_Call struct {
69	*mock.Call
70}
71
72// Create is a helper method to define mock.On call
73//   - ctx context.Context
74//   - p domain.Passkey
75func (_e *PasskeyStore_Expecter) Create(ctx any, p any) *PasskeyStore_Create_Call {
76	return &PasskeyStore_Create_Call{Call: _e.mock.On("Create", ctx, p)}
77}
78
79func (_c *PasskeyStore_Create_Call) Run(run func(ctx context.Context, p domain.Passkey)) *PasskeyStore_Create_Call {
80	_c.Call.Run(func(args mock.Arguments) {
81		var arg0 context.Context
82		if args[0] != nil {
83			arg0 = args[0].(context.Context)
84		}
85		var arg1 domain.Passkey
86		if args[1] != nil {
87			arg1 = args[1].(domain.Passkey)
88		}
89		run(
90			arg0,
91			arg1,
92		)
93	})
94	return _c
95}
96
97func (_c *PasskeyStore_Create_Call) Return(err error) *PasskeyStore_Create_Call {
98	_c.Call.Return(err)
99	return _c
100}
101
102func (_c *PasskeyStore_Create_Call) RunAndReturn(run func(ctx context.Context, p domain.Passkey) error) *PasskeyStore_Create_Call {
103	_c.Call.Return(run)
104	return _c
105}
106
107// Delete provides a mock function for the type PasskeyStore
108func (_mock *PasskeyStore) Delete(ctx context.Context, id []byte) error {
109	ret := _mock.Called(ctx, id)
110
111	if len(ret) == 0 {
112		panic("no return value specified for Delete")
113	}
114
115	var r0 error
116	if returnFunc, ok := ret.Get(0).(func(context.Context, []byte) error); ok {
117		r0 = returnFunc(ctx, id)
118	} else {
119		r0 = ret.Error(0)
120	}
121	return r0
122}
123
124// PasskeyStore_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
125type PasskeyStore_Delete_Call struct {
126	*mock.Call
127}
128
129// Delete is a helper method to define mock.On call
130//   - ctx context.Context
131//   - id []byte
132func (_e *PasskeyStore_Expecter) Delete(ctx any, id any) *PasskeyStore_Delete_Call {
133	return &PasskeyStore_Delete_Call{Call: _e.mock.On("Delete", ctx, id)}
134}
135
136func (_c *PasskeyStore_Delete_Call) Run(run func(ctx context.Context, id []byte)) *PasskeyStore_Delete_Call {
137	_c.Call.Run(func(args mock.Arguments) {
138		var arg0 context.Context
139		if args[0] != nil {
140			arg0 = args[0].(context.Context)
141		}
142		var arg1 []byte
143		if args[1] != nil {
144			arg1 = args[1].([]byte)
145		}
146		run(
147			arg0,
148			arg1,
149		)
150	})
151	return _c
152}
153
154func (_c *PasskeyStore_Delete_Call) Return(err error) *PasskeyStore_Delete_Call {
155	_c.Call.Return(err)
156	return _c
157}
158
159func (_c *PasskeyStore_Delete_Call) RunAndReturn(run func(ctx context.Context, id []byte) error) *PasskeyStore_Delete_Call {
160	_c.Call.Return(run)
161	return _c
162}
163
164// Get provides a mock function for the type PasskeyStore
165func (_mock *PasskeyStore) Get(ctx context.Context, id []byte) (domain.Passkey, error) {
166	ret := _mock.Called(ctx, id)
167
168	if len(ret) == 0 {
169		panic("no return value specified for Get")
170	}
171
172	var r0 domain.Passkey
173	var r1 error
174	if returnFunc, ok := ret.Get(0).(func(context.Context, []byte) (domain.Passkey, error)); ok {
175		return returnFunc(ctx, id)
176	}
177	if returnFunc, ok := ret.Get(0).(func(context.Context, []byte) domain.Passkey); ok {
178		r0 = returnFunc(ctx, id)
179	} else {
180		r0 = ret.Get(0).(domain.Passkey)
181	}
182	if returnFunc, ok := ret.Get(1).(func(context.Context, []byte) error); ok {
183		r1 = returnFunc(ctx, id)
184	} else {
185		r1 = ret.Error(1)
186	}
187	return r0, r1
188}
189
190// PasskeyStore_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'
191type PasskeyStore_Get_Call struct {
192	*mock.Call
193}
194
195// Get is a helper method to define mock.On call
196//   - ctx context.Context
197//   - id []byte
198func (_e *PasskeyStore_Expecter) Get(ctx any, id any) *PasskeyStore_Get_Call {
199	return &PasskeyStore_Get_Call{Call: _e.mock.On("Get", ctx, id)}
200}
201
202func (_c *PasskeyStore_Get_Call) Run(run func(ctx context.Context, id []byte)) *PasskeyStore_Get_Call {
203	_c.Call.Run(func(args mock.Arguments) {
204		var arg0 context.Context
205		if args[0] != nil {
206			arg0 = args[0].(context.Context)
207		}
208		var arg1 []byte
209		if args[1] != nil {
210			arg1 = args[1].([]byte)
211		}
212		run(
213			arg0,
214			arg1,
215		)
216	})
217	return _c
218}
219
220func (_c *PasskeyStore_Get_Call) Return(passkey domain.Passkey, err error) *PasskeyStore_Get_Call {
221	_c.Call.Return(passkey, err)
222	return _c
223}
224
225func (_c *PasskeyStore_Get_Call) RunAndReturn(run func(ctx context.Context, id []byte) (domain.Passkey, error)) *PasskeyStore_Get_Call {
226	_c.Call.Return(run)
227	return _c
228}
229
230// List provides a mock function for the type PasskeyStore
231func (_mock *PasskeyStore) List(ctx context.Context) ([]domain.Passkey, error) {
232	ret := _mock.Called(ctx)
233
234	if len(ret) == 0 {
235		panic("no return value specified for List")
236	}
237
238	var r0 []domain.Passkey
239	var r1 error
240	if returnFunc, ok := ret.Get(0).(func(context.Context) ([]domain.Passkey, error)); ok {
241		return returnFunc(ctx)
242	}
243	if returnFunc, ok := ret.Get(0).(func(context.Context) []domain.Passkey); ok {
244		r0 = returnFunc(ctx)
245	} else {
246		if ret.Get(0) != nil {
247			r0 = ret.Get(0).([]domain.Passkey)
248		}
249	}
250	if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
251		r1 = returnFunc(ctx)
252	} else {
253		r1 = ret.Error(1)
254	}
255	return r0, r1
256}
257
258// PasskeyStore_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List'
259type PasskeyStore_List_Call struct {
260	*mock.Call
261}
262
263// List is a helper method to define mock.On call
264//   - ctx context.Context
265func (_e *PasskeyStore_Expecter) List(ctx any) *PasskeyStore_List_Call {
266	return &PasskeyStore_List_Call{Call: _e.mock.On("List", ctx)}
267}
268
269func (_c *PasskeyStore_List_Call) Run(run func(ctx context.Context)) *PasskeyStore_List_Call {
270	_c.Call.Run(func(args mock.Arguments) {
271		var arg0 context.Context
272		if args[0] != nil {
273			arg0 = args[0].(context.Context)
274		}
275		run(
276			arg0,
277		)
278	})
279	return _c
280}
281
282func (_c *PasskeyStore_List_Call) Return(passkeys []domain.Passkey, err error) *PasskeyStore_List_Call {
283	_c.Call.Return(passkeys, err)
284	return _c
285}
286
287func (_c *PasskeyStore_List_Call) RunAndReturn(run func(ctx context.Context) ([]domain.Passkey, error)) *PasskeyStore_List_Call {
288	_c.Call.Return(run)
289	return _c
290}
291
292// Update provides a mock function for the type PasskeyStore
293func (_mock *PasskeyStore) Update(ctx context.Context, p domain.Passkey) error {
294	ret := _mock.Called(ctx, p)
295
296	if len(ret) == 0 {
297		panic("no return value specified for Update")
298	}
299
300	var r0 error
301	if returnFunc, ok := ret.Get(0).(func(context.Context, domain.Passkey) error); ok {
302		r0 = returnFunc(ctx, p)
303	} else {
304		r0 = ret.Error(0)
305	}
306	return r0
307}
308
309// PasskeyStore_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update'
310type PasskeyStore_Update_Call struct {
311	*mock.Call
312}
313
314// Update is a helper method to define mock.On call
315//   - ctx context.Context
316//   - p domain.Passkey
317func (_e *PasskeyStore_Expecter) Update(ctx any, p any) *PasskeyStore_Update_Call {
318	return &PasskeyStore_Update_Call{Call: _e.mock.On("Update", ctx, p)}
319}
320
321func (_c *PasskeyStore_Update_Call) Run(run func(ctx context.Context, p domain.Passkey)) *PasskeyStore_Update_Call {
322	_c.Call.Run(func(args mock.Arguments) {
323		var arg0 context.Context
324		if args[0] != nil {
325			arg0 = args[0].(context.Context)
326		}
327		var arg1 domain.Passkey
328		if args[1] != nil {
329			arg1 = args[1].(domain.Passkey)
330		}
331		run(
332			arg0,
333			arg1,
334		)
335	})
336	return _c
337}
338
339func (_c *PasskeyStore_Update_Call) Return(err error) *PasskeyStore_Update_Call {
340	_c.Call.Return(err)
341	return _c
342}
343
344func (_c *PasskeyStore_Update_Call) RunAndReturn(run func(ctx context.Context, p domain.Passkey) error) *PasskeyStore_Update_Call {
345	_c.Call.Return(run)
346	return _c
347}
348
349// UserHandle provides a mock function for the type PasskeyStore
350func (_mock *PasskeyStore) UserHandle(ctx context.Context) ([]byte, error) {
351	ret := _mock.Called(ctx)
352
353	if len(ret) == 0 {
354		panic("no return value specified for UserHandle")
355	}
356
357	var r0 []byte
358	var r1 error
359	if returnFunc, ok := ret.Get(0).(func(context.Context) ([]byte, error)); ok {
360		return returnFunc(ctx)
361	}
362	if returnFunc, ok := ret.Get(0).(func(context.Context) []byte); ok {
363		r0 = returnFunc(ctx)
364	} else {
365		if ret.Get(0) != nil {
366			r0 = ret.Get(0).([]byte)
367		}
368	}
369	if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
370		r1 = returnFunc(ctx)
371	} else {
372		r1 = ret.Error(1)
373	}
374	return r0, r1
375}
376
377// PasskeyStore_UserHandle_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UserHandle'
378type PasskeyStore_UserHandle_Call struct {
379	*mock.Call
380}
381
382// UserHandle is a helper method to define mock.On call
383//   - ctx context.Context
384func (_e *PasskeyStore_Expecter) UserHandle(ctx any) *PasskeyStore_UserHandle_Call {
385	return &PasskeyStore_UserHandle_Call{Call: _e.mock.On("UserHandle", ctx)}
386}
387
388func (_c *PasskeyStore_UserHandle_Call) Run(run func(ctx context.Context)) *PasskeyStore_UserHandle_Call {
389	_c.Call.Run(func(args mock.Arguments) {
390		var arg0 context.Context
391		if args[0] != nil {
392			arg0 = args[0].(context.Context)
393		}
394		run(
395			arg0,
396		)
397	})
398	return _c
399}
400
401func (_c *PasskeyStore_UserHandle_Call) Return(bytes []byte, err error) *PasskeyStore_UserHandle_Call {
402	_c.Call.Return(bytes, err)
403	return _c
404}
405
406func (_c *PasskeyStore_UserHandle_Call) RunAndReturn(run func(ctx context.Context) ([]byte, error)) *PasskeyStore_UserHandle_Call {
407	_c.Call.Return(run)
408	return _c
409}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 2

Tags 45

↑↓ moveenter openesc close