v0.2.0 80c61e3

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

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