v0.30.0 eb3068f

zoom.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	"github.com/bnema/dumber/internal/domain/entity"
11	mock "github.com/stretchr/testify/mock"
12)
13
14// NewMockZoomRepository creates a new instance of MockZoomRepository. 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 NewMockZoomRepository(t interface {
17	mock.TestingT
18	Cleanup(func())
19}) *MockZoomRepository {
20	mock := &MockZoomRepository{}
21	mock.Mock.Test(t)
22
23	t.Cleanup(func() { mock.AssertExpectations(t) })
24
25	return mock
26}
27
28// MockZoomRepository is an autogenerated mock type for the ZoomRepository type
29type MockZoomRepository struct {
30	mock.Mock
31}
32
33type MockZoomRepository_Expecter struct {
34	mock *mock.Mock
35}
36
37func (_m *MockZoomRepository) EXPECT() *MockZoomRepository_Expecter {
38	return &MockZoomRepository_Expecter{mock: &_m.Mock}
39}
40
41// Delete provides a mock function for the type MockZoomRepository
42func (_mock *MockZoomRepository) Delete(ctx context.Context, domain string) error {
43	ret := _mock.Called(ctx, domain)
44
45	if len(ret) == 0 {
46		panic("no return value specified for Delete")
47	}
48
49	var r0 error
50	if returnFunc, ok := ret.Get(0).(func(context.Context, string) error); ok {
51		r0 = returnFunc(ctx, domain)
52	} else {
53		r0 = ret.Error(0)
54	}
55	return r0
56}
57
58// MockZoomRepository_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
59type MockZoomRepository_Delete_Call struct {
60	*mock.Call
61}
62
63// Delete is a helper method to define mock.On call
64//   - ctx context.Context
65//   - domain string
66func (_e *MockZoomRepository_Expecter) Delete(ctx any, domain any) *MockZoomRepository_Delete_Call {
67	return &MockZoomRepository_Delete_Call{Call: _e.mock.On("Delete", ctx, domain)}
68}
69
70func (_c *MockZoomRepository_Delete_Call) Run(run func(ctx context.Context, domain string)) *MockZoomRepository_Delete_Call {
71	_c.Call.Run(func(args mock.Arguments) {
72		var arg0 context.Context
73		if args[0] != nil {
74			arg0 = args[0].(context.Context)
75		}
76		var arg1 string
77		if args[1] != nil {
78			arg1 = args[1].(string)
79		}
80		run(
81			arg0,
82			arg1,
83		)
84	})
85	return _c
86}
87
88func (_c *MockZoomRepository_Delete_Call) Return(err error) *MockZoomRepository_Delete_Call {
89	_c.Call.Return(err)
90	return _c
91}
92
93func (_c *MockZoomRepository_Delete_Call) RunAndReturn(run func(ctx context.Context, domain string) error) *MockZoomRepository_Delete_Call {
94	_c.Call.Return(run)
95	return _c
96}
97
98// Get provides a mock function for the type MockZoomRepository
99func (_mock *MockZoomRepository) Get(ctx context.Context, domain string) (*entity.ZoomLevel, error) {
100	ret := _mock.Called(ctx, domain)
101
102	if len(ret) == 0 {
103		panic("no return value specified for Get")
104	}
105
106	var r0 *entity.ZoomLevel
107	var r1 error
108	if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*entity.ZoomLevel, error)); ok {
109		return returnFunc(ctx, domain)
110	}
111	if returnFunc, ok := ret.Get(0).(func(context.Context, string) *entity.ZoomLevel); ok {
112		r0 = returnFunc(ctx, domain)
113	} else {
114		if ret.Get(0) != nil {
115			r0 = ret.Get(0).(*entity.ZoomLevel)
116		}
117	}
118	if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
119		r1 = returnFunc(ctx, domain)
120	} else {
121		r1 = ret.Error(1)
122	}
123	return r0, r1
124}
125
126// MockZoomRepository_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'
127type MockZoomRepository_Get_Call struct {
128	*mock.Call
129}
130
131// Get is a helper method to define mock.On call
132//   - ctx context.Context
133//   - domain string
134func (_e *MockZoomRepository_Expecter) Get(ctx any, domain any) *MockZoomRepository_Get_Call {
135	return &MockZoomRepository_Get_Call{Call: _e.mock.On("Get", ctx, domain)}
136}
137
138func (_c *MockZoomRepository_Get_Call) Run(run func(ctx context.Context, domain string)) *MockZoomRepository_Get_Call {
139	_c.Call.Run(func(args mock.Arguments) {
140		var arg0 context.Context
141		if args[0] != nil {
142			arg0 = args[0].(context.Context)
143		}
144		var arg1 string
145		if args[1] != nil {
146			arg1 = args[1].(string)
147		}
148		run(
149			arg0,
150			arg1,
151		)
152	})
153	return _c
154}
155
156func (_c *MockZoomRepository_Get_Call) Return(zoomLevel *entity.ZoomLevel, err error) *MockZoomRepository_Get_Call {
157	_c.Call.Return(zoomLevel, err)
158	return _c
159}
160
161func (_c *MockZoomRepository_Get_Call) RunAndReturn(run func(ctx context.Context, domain string) (*entity.ZoomLevel, error)) *MockZoomRepository_Get_Call {
162	_c.Call.Return(run)
163	return _c
164}
165
166// GetAll provides a mock function for the type MockZoomRepository
167func (_mock *MockZoomRepository) GetAll(ctx context.Context) ([]*entity.ZoomLevel, error) {
168	ret := _mock.Called(ctx)
169
170	if len(ret) == 0 {
171		panic("no return value specified for GetAll")
172	}
173
174	var r0 []*entity.ZoomLevel
175	var r1 error
176	if returnFunc, ok := ret.Get(0).(func(context.Context) ([]*entity.ZoomLevel, error)); ok {
177		return returnFunc(ctx)
178	}
179	if returnFunc, ok := ret.Get(0).(func(context.Context) []*entity.ZoomLevel); ok {
180		r0 = returnFunc(ctx)
181	} else {
182		if ret.Get(0) != nil {
183			r0 = ret.Get(0).([]*entity.ZoomLevel)
184		}
185	}
186	if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
187		r1 = returnFunc(ctx)
188	} else {
189		r1 = ret.Error(1)
190	}
191	return r0, r1
192}
193
194// MockZoomRepository_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll'
195type MockZoomRepository_GetAll_Call struct {
196	*mock.Call
197}
198
199// GetAll is a helper method to define mock.On call
200//   - ctx context.Context
201func (_e *MockZoomRepository_Expecter) GetAll(ctx any) *MockZoomRepository_GetAll_Call {
202	return &MockZoomRepository_GetAll_Call{Call: _e.mock.On("GetAll", ctx)}
203}
204
205func (_c *MockZoomRepository_GetAll_Call) Run(run func(ctx context.Context)) *MockZoomRepository_GetAll_Call {
206	_c.Call.Run(func(args mock.Arguments) {
207		var arg0 context.Context
208		if args[0] != nil {
209			arg0 = args[0].(context.Context)
210		}
211		run(
212			arg0,
213		)
214	})
215	return _c
216}
217
218func (_c *MockZoomRepository_GetAll_Call) Return(zoomLevels []*entity.ZoomLevel, err error) *MockZoomRepository_GetAll_Call {
219	_c.Call.Return(zoomLevels, err)
220	return _c
221}
222
223func (_c *MockZoomRepository_GetAll_Call) RunAndReturn(run func(ctx context.Context) ([]*entity.ZoomLevel, error)) *MockZoomRepository_GetAll_Call {
224	_c.Call.Return(run)
225	return _c
226}
227
228// Set provides a mock function for the type MockZoomRepository
229func (_mock *MockZoomRepository) Set(ctx context.Context, level *entity.ZoomLevel) error {
230	ret := _mock.Called(ctx, level)
231
232	if len(ret) == 0 {
233		panic("no return value specified for Set")
234	}
235
236	var r0 error
237	if returnFunc, ok := ret.Get(0).(func(context.Context, *entity.ZoomLevel) error); ok {
238		r0 = returnFunc(ctx, level)
239	} else {
240		r0 = ret.Error(0)
241	}
242	return r0
243}
244
245// MockZoomRepository_Set_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Set'
246type MockZoomRepository_Set_Call struct {
247	*mock.Call
248}
249
250// Set is a helper method to define mock.On call
251//   - ctx context.Context
252//   - level *entity.ZoomLevel
253func (_e *MockZoomRepository_Expecter) Set(ctx any, level any) *MockZoomRepository_Set_Call {
254	return &MockZoomRepository_Set_Call{Call: _e.mock.On("Set", ctx, level)}
255}
256
257func (_c *MockZoomRepository_Set_Call) Run(run func(ctx context.Context, level *entity.ZoomLevel)) *MockZoomRepository_Set_Call {
258	_c.Call.Run(func(args mock.Arguments) {
259		var arg0 context.Context
260		if args[0] != nil {
261			arg0 = args[0].(context.Context)
262		}
263		var arg1 *entity.ZoomLevel
264		if args[1] != nil {
265			arg1 = args[1].(*entity.ZoomLevel)
266		}
267		run(
268			arg0,
269			arg1,
270		)
271	})
272	return _c
273}
274
275func (_c *MockZoomRepository_Set_Call) Return(err error) *MockZoomRepository_Set_Call {
276	_c.Call.Return(err)
277	return _c
278}
279
280func (_c *MockZoomRepository_Set_Call) RunAndReturn(run func(ctx context.Context, level *entity.ZoomLevel) error) *MockZoomRepository_Set_Call {
281	_c.Call.Return(run)
282	return _c
283}

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 8

Tags 42

↑↓ moveenter openesc close