v2.4.2 7da87b2

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

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