main ece7682

store_mock.go RawHistoryFolder

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

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 12

Tags 11

↑↓ moveenter openesc close