v3.4.0 593c1c3

mock_secret_file_store.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/gordon/internal/boundaries/out"
11	mock "github.com/stretchr/testify/mock"
12)
13
14// NewMockSecretFileStore creates a new instance of MockSecretFileStore. 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 NewMockSecretFileStore(t interface {
17	mock.TestingT
18	Cleanup(func())
19}) *MockSecretFileStore {
20	if helper, ok := t.(interface{ Helper() }); ok {
21		helper.Helper()
22	}
23
24	mock := &MockSecretFileStore{}
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// MockSecretFileStore is an autogenerated mock type for the SecretFileStore type
38type MockSecretFileStore struct {
39	mock.Mock
40}
41
42type MockSecretFileStore_Expecter struct {
43	mock *mock.Mock
44}
45
46func (_m *MockSecretFileStore) EXPECT() *MockSecretFileStore_Expecter {
47	return &MockSecretFileStore_Expecter{mock: &_m.Mock}
48}
49
50// List provides a mock function for the type MockSecretFileStore
51func (_mock *MockSecretFileStore) List(ctx context.Context) ([]out.SecretFileSet, error) {
52	ret := _mock.Called(ctx)
53
54	if len(ret) == 0 {
55		panic("no return value specified for List")
56	}
57
58	var r0 []out.SecretFileSet
59	var r1 error
60	if returnFunc, ok := ret.Get(0).(func(context.Context) ([]out.SecretFileSet, error)); ok {
61		return returnFunc(ctx)
62	}
63	if returnFunc, ok := ret.Get(0).(func(context.Context) []out.SecretFileSet); ok {
64		r0 = returnFunc(ctx)
65	} else {
66		if ret.Get(0) != nil {
67			r0 = ret.Get(0).([]out.SecretFileSet)
68		}
69	}
70	if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
71		r1 = returnFunc(ctx)
72	} else {
73		r1 = ret.Error(1)
74	}
75	return r0, r1
76}
77
78// MockSecretFileStore_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List'
79type MockSecretFileStore_List_Call struct {
80	*mock.Call
81}
82
83// List is a helper method to define mock.On call
84//   - ctx context.Context
85func (_e *MockSecretFileStore_Expecter) List(ctx any) *MockSecretFileStore_List_Call {
86	return &MockSecretFileStore_List_Call{Call: _e.mock.On("List", ctx)}
87}
88
89func (_c *MockSecretFileStore_List_Call) Run(run func(ctx context.Context)) *MockSecretFileStore_List_Call {
90	_c.Call.Run(func(args mock.Arguments) {
91		var arg0 context.Context
92		if args[0] != nil {
93			arg0 = args[0].(context.Context)
94		}
95		run(
96			arg0,
97		)
98	})
99	return _c
100}
101
102func (_c *MockSecretFileStore_List_Call) Return(secretFileSets []out.SecretFileSet, err error) *MockSecretFileStore_List_Call {
103	_c.Call.Return(secretFileSets, err)
104	return _c
105}
106
107func (_c *MockSecretFileStore_List_Call) RunAndReturn(run func(ctx context.Context) ([]out.SecretFileSet, error)) *MockSecretFileStore_List_Call {
108	_c.Call.Return(run)
109	return _c
110}
111
112// Read provides a mock function for the type MockSecretFileStore
113func (_mock *MockSecretFileStore) Read(ctx context.Context, app string, container string, key string) (string, error) {
114	ret := _mock.Called(ctx, app, container, key)
115
116	if len(ret) == 0 {
117		panic("no return value specified for Read")
118	}
119
120	var r0 string
121	var r1 error
122	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string) (string, error)); ok {
123		return returnFunc(ctx, app, container, key)
124	}
125	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string) string); ok {
126		r0 = returnFunc(ctx, app, container, key)
127	} else {
128		r0 = ret.Get(0).(string)
129	}
130	if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, string) error); ok {
131		r1 = returnFunc(ctx, app, container, key)
132	} else {
133		r1 = ret.Error(1)
134	}
135	return r0, r1
136}
137
138// MockSecretFileStore_Read_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Read'
139type MockSecretFileStore_Read_Call struct {
140	*mock.Call
141}
142
143// Read is a helper method to define mock.On call
144//   - ctx context.Context
145//   - app string
146//   - container string
147//   - key string
148func (_e *MockSecretFileStore_Expecter) Read(ctx any, app any, container any, key any) *MockSecretFileStore_Read_Call {
149	return &MockSecretFileStore_Read_Call{Call: _e.mock.On("Read", ctx, app, container, key)}
150}
151
152func (_c *MockSecretFileStore_Read_Call) Run(run func(ctx context.Context, app string, container string, key string)) *MockSecretFileStore_Read_Call {
153	_c.Call.Run(func(args mock.Arguments) {
154		var arg0 context.Context
155		if args[0] != nil {
156			arg0 = args[0].(context.Context)
157		}
158		var arg1 string
159		if args[1] != nil {
160			arg1 = args[1].(string)
161		}
162		var arg2 string
163		if args[2] != nil {
164			arg2 = args[2].(string)
165		}
166		var arg3 string
167		if args[3] != nil {
168			arg3 = args[3].(string)
169		}
170		run(
171			arg0,
172			arg1,
173			arg2,
174			arg3,
175		)
176	})
177	return _c
178}
179
180func (_c *MockSecretFileStore_Read_Call) Return(s string, err error) *MockSecretFileStore_Read_Call {
181	_c.Call.Return(s, err)
182	return _c
183}
184
185func (_c *MockSecretFileStore_Read_Call) RunAndReturn(run func(ctx context.Context, app string, container string, key string) (string, error)) *MockSecretFileStore_Read_Call {
186	_c.Call.Return(run)
187	return _c
188}
189
190// Remove provides a mock function for the type MockSecretFileStore
191func (_mock *MockSecretFileStore) Remove(ctx context.Context, app string, container string) error {
192	ret := _mock.Called(ctx, app, container)
193
194	if len(ret) == 0 {
195		panic("no return value specified for Remove")
196	}
197
198	var r0 error
199	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) error); ok {
200		r0 = returnFunc(ctx, app, container)
201	} else {
202		r0 = ret.Error(0)
203	}
204	return r0
205}
206
207// MockSecretFileStore_Remove_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Remove'
208type MockSecretFileStore_Remove_Call struct {
209	*mock.Call
210}
211
212// Remove is a helper method to define mock.On call
213//   - ctx context.Context
214//   - app string
215//   - container string
216func (_e *MockSecretFileStore_Expecter) Remove(ctx any, app any, container any) *MockSecretFileStore_Remove_Call {
217	return &MockSecretFileStore_Remove_Call{Call: _e.mock.On("Remove", ctx, app, container)}
218}
219
220func (_c *MockSecretFileStore_Remove_Call) Run(run func(ctx context.Context, app string, container string)) *MockSecretFileStore_Remove_Call {
221	_c.Call.Run(func(args mock.Arguments) {
222		var arg0 context.Context
223		if args[0] != nil {
224			arg0 = args[0].(context.Context)
225		}
226		var arg1 string
227		if args[1] != nil {
228			arg1 = args[1].(string)
229		}
230		var arg2 string
231		if args[2] != nil {
232			arg2 = args[2].(string)
233		}
234		run(
235			arg0,
236			arg1,
237			arg2,
238		)
239	})
240	return _c
241}
242
243func (_c *MockSecretFileStore_Remove_Call) Return(err error) *MockSecretFileStore_Remove_Call {
244	_c.Call.Return(err)
245	return _c
246}
247
248func (_c *MockSecretFileStore_Remove_Call) RunAndReturn(run func(ctx context.Context, app string, container string) error) *MockSecretFileStore_Remove_Call {
249	_c.Call.Return(run)
250	return _c
251}
252
253// Write provides a mock function for the type MockSecretFileStore
254func (_mock *MockSecretFileStore) Write(ctx context.Context, app string, container string, values map[string]string) (map[string]string, error) {
255	ret := _mock.Called(ctx, app, container, values)
256
257	if len(ret) == 0 {
258		panic("no return value specified for Write")
259	}
260
261	var r0 map[string]string
262	var r1 error
263	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, map[string]string) (map[string]string, error)); ok {
264		return returnFunc(ctx, app, container, values)
265	}
266	if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, map[string]string) map[string]string); ok {
267		r0 = returnFunc(ctx, app, container, values)
268	} else {
269		if ret.Get(0) != nil {
270			r0 = ret.Get(0).(map[string]string)
271		}
272	}
273	if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, map[string]string) error); ok {
274		r1 = returnFunc(ctx, app, container, values)
275	} else {
276		r1 = ret.Error(1)
277	}
278	return r0, r1
279}
280
281// MockSecretFileStore_Write_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Write'
282type MockSecretFileStore_Write_Call struct {
283	*mock.Call
284}
285
286// Write is a helper method to define mock.On call
287//   - ctx context.Context
288//   - app string
289//   - container string
290//   - values map[string]string
291func (_e *MockSecretFileStore_Expecter) Write(ctx any, app any, container any, values any) *MockSecretFileStore_Write_Call {
292	return &MockSecretFileStore_Write_Call{Call: _e.mock.On("Write", ctx, app, container, values)}
293}
294
295func (_c *MockSecretFileStore_Write_Call) Run(run func(ctx context.Context, app string, container string, values map[string]string)) *MockSecretFileStore_Write_Call {
296	_c.Call.Run(func(args mock.Arguments) {
297		var arg0 context.Context
298		if args[0] != nil {
299			arg0 = args[0].(context.Context)
300		}
301		var arg1 string
302		if args[1] != nil {
303			arg1 = args[1].(string)
304		}
305		var arg2 string
306		if args[2] != nil {
307			arg2 = args[2].(string)
308		}
309		var arg3 map[string]string
310		if args[3] != nil {
311			arg3 = args[3].(map[string]string)
312		}
313		run(
314			arg0,
315			arg1,
316			arg2,
317			arg3,
318		)
319	})
320	return _c
321}
322
323func (_c *MockSecretFileStore_Write_Call) Return(stringToString map[string]string, err error) *MockSecretFileStore_Write_Call {
324	_c.Call.Return(stringToString, err)
325	return _c
326}
327
328func (_c *MockSecretFileStore_Write_Call) RunAndReturn(run func(ctx context.Context, app string, container string, values map[string]string) (map[string]string, error)) *MockSecretFileStore_Write_Call {
329	_c.Call.Return(run)
330	return _c
331}

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 7

Tags 106

↑↓ moveenter openesc close