v2.10.1 43db1bb

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

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