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// DeleteAttachment provides a mock function for the type MockSecretService
105func (_mock *MockSecretService) DeleteAttachment(ctx context.Context, domain string, service string, key string) error {
106 ret := _mock.Called(ctx, domain, service, key)
107
108 if len(ret) == 0 {
109 panic("no return value specified for DeleteAttachment")
110 }
111
112 var r0 error
113 if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string) error); ok {
114 r0 = returnFunc(ctx, domain, service, key)
115 } else {
116 r0 = ret.Error(0)
117 }
118 return r0
119}
120
121// MockSecretService_DeleteAttachment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteAttachment'
122type MockSecretService_DeleteAttachment_Call struct {
123 *mock.Call
124}
125
126// DeleteAttachment is a helper method to define mock.On call
127// - ctx context.Context
128// - domain string
129// - service string
130// - key string
131func (_e *MockSecretService_Expecter) DeleteAttachment(ctx interface{}, domain interface{}, service interface{}, key interface{}) *MockSecretService_DeleteAttachment_Call {
132 return &MockSecretService_DeleteAttachment_Call{Call: _e.mock.On("DeleteAttachment", ctx, domain, service, key)}
133}
134
135func (_c *MockSecretService_DeleteAttachment_Call) Run(run func(ctx context.Context, domain string, service string, key string)) *MockSecretService_DeleteAttachment_Call {
136 _c.Call.Run(func(args mock.Arguments) {
137 var arg0 context.Context
138 if args[0] != nil {
139 arg0 = args[0].(context.Context)
140 }
141 var arg1 string
142 if args[1] != nil {
143 arg1 = args[1].(string)
144 }
145 var arg2 string
146 if args[2] != nil {
147 arg2 = args[2].(string)
148 }
149 var arg3 string
150 if args[3] != nil {
151 arg3 = args[3].(string)
152 }
153 run(
154 arg0,
155 arg1,
156 arg2,
157 arg3,
158 )
159 })
160 return _c
161}
162
163func (_c *MockSecretService_DeleteAttachment_Call) Return(err error) *MockSecretService_DeleteAttachment_Call {
164 _c.Call.Return(err)
165 return _c
166}
167
168func (_c *MockSecretService_DeleteAttachment_Call) RunAndReturn(run func(ctx context.Context, domain string, service string, key string) error) *MockSecretService_DeleteAttachment_Call {
169 _c.Call.Return(run)
170 return _c
171}
172
173// GetAll provides a mock function for the type MockSecretService
174func (_mock *MockSecretService) GetAll(ctx context.Context, domain string) (map[string]string, error) {
175 ret := _mock.Called(ctx, domain)
176
177 if len(ret) == 0 {
178 panic("no return value specified for GetAll")
179 }
180
181 var r0 map[string]string
182 var r1 error
183 if returnFunc, ok := ret.Get(0).(func(context.Context, string) (map[string]string, error)); ok {
184 return returnFunc(ctx, domain)
185 }
186 if returnFunc, ok := ret.Get(0).(func(context.Context, string) map[string]string); ok {
187 r0 = returnFunc(ctx, domain)
188 } else {
189 if ret.Get(0) != nil {
190 r0 = ret.Get(0).(map[string]string)
191 }
192 }
193 if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
194 r1 = returnFunc(ctx, domain)
195 } else {
196 r1 = ret.Error(1)
197 }
198 return r0, r1
199}
200
201// MockSecretService_GetAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetAll'
202type MockSecretService_GetAll_Call struct {
203 *mock.Call
204}
205
206// GetAll is a helper method to define mock.On call
207// - ctx context.Context
208// - domain string
209func (_e *MockSecretService_Expecter) GetAll(ctx interface{}, domain interface{}) *MockSecretService_GetAll_Call {
210 return &MockSecretService_GetAll_Call{Call: _e.mock.On("GetAll", ctx, domain)}
211}
212
213func (_c *MockSecretService_GetAll_Call) Run(run func(ctx context.Context, domain string)) *MockSecretService_GetAll_Call {
214 _c.Call.Run(func(args mock.Arguments) {
215 var arg0 context.Context
216 if args[0] != nil {
217 arg0 = args[0].(context.Context)
218 }
219 var arg1 string
220 if args[1] != nil {
221 arg1 = args[1].(string)
222 }
223 run(
224 arg0,
225 arg1,
226 )
227 })
228 return _c
229}
230
231func (_c *MockSecretService_GetAll_Call) Return(stringToString map[string]string, err error) *MockSecretService_GetAll_Call {
232 _c.Call.Return(stringToString, err)
233 return _c
234}
235
236func (_c *MockSecretService_GetAll_Call) RunAndReturn(run func(ctx context.Context, domain string) (map[string]string, error)) *MockSecretService_GetAll_Call {
237 _c.Call.Return(run)
238 return _c
239}
240
241// ListKeys provides a mock function for the type MockSecretService
242func (_mock *MockSecretService) ListKeys(ctx context.Context, domain string) ([]string, error) {
243 ret := _mock.Called(ctx, domain)
244
245 if len(ret) == 0 {
246 panic("no return value specified for ListKeys")
247 }
248
249 var r0 []string
250 var r1 error
251 if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]string, 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) error); ok {
262 r1 = returnFunc(ctx, domain)
263 } else {
264 r1 = ret.Error(1)
265 }
266 return r0, r1
267}
268
269// MockSecretService_ListKeys_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListKeys'
270type MockSecretService_ListKeys_Call struct {
271 *mock.Call
272}
273
274// ListKeys is a helper method to define mock.On call
275// - ctx context.Context
276// - domain string
277func (_e *MockSecretService_Expecter) ListKeys(ctx interface{}, domain interface{}) *MockSecretService_ListKeys_Call {
278 return &MockSecretService_ListKeys_Call{Call: _e.mock.On("ListKeys", ctx, domain)}
279}
280
281func (_c *MockSecretService_ListKeys_Call) Run(run func(ctx context.Context, domain string)) *MockSecretService_ListKeys_Call {
282 _c.Call.Run(func(args mock.Arguments) {
283 var arg0 context.Context
284 if args[0] != nil {
285 arg0 = args[0].(context.Context)
286 }
287 var arg1 string
288 if args[1] != nil {
289 arg1 = args[1].(string)
290 }
291 run(
292 arg0,
293 arg1,
294 )
295 })
296 return _c
297}
298
299func (_c *MockSecretService_ListKeys_Call) Return(strings []string, err error) *MockSecretService_ListKeys_Call {
300 _c.Call.Return(strings, err)
301 return _c
302}
303
304func (_c *MockSecretService_ListKeys_Call) RunAndReturn(run func(ctx context.Context, domain string) ([]string, error)) *MockSecretService_ListKeys_Call {
305 _c.Call.Return(run)
306 return _c
307}
308
309// ListKeysWithAttachments provides a mock function for the type MockSecretService
310func (_mock *MockSecretService) ListKeysWithAttachments(ctx context.Context, domain string) ([]string, []out.AttachmentSecrets, error) {
311 ret := _mock.Called(ctx, domain)
312
313 if len(ret) == 0 {
314 panic("no return value specified for ListKeysWithAttachments")
315 }
316
317 var r0 []string
318 var r1 []out.AttachmentSecrets
319 var r2 error
320 if returnFunc, ok := ret.Get(0).(func(context.Context, string) ([]string, []out.AttachmentSecrets, error)); ok {
321 return returnFunc(ctx, domain)
322 }
323 if returnFunc, ok := ret.Get(0).(func(context.Context, string) []string); ok {
324 r0 = returnFunc(ctx, domain)
325 } else {
326 if ret.Get(0) != nil {
327 r0 = ret.Get(0).([]string)
328 }
329 }
330 if returnFunc, ok := ret.Get(1).(func(context.Context, string) []out.AttachmentSecrets); ok {
331 r1 = returnFunc(ctx, domain)
332 } else {
333 if ret.Get(1) != nil {
334 r1 = ret.Get(1).([]out.AttachmentSecrets)
335 }
336 }
337 if returnFunc, ok := ret.Get(2).(func(context.Context, string) error); ok {
338 r2 = returnFunc(ctx, domain)
339 } else {
340 r2 = ret.Error(2)
341 }
342 return r0, r1, r2
343}
344
345// MockSecretService_ListKeysWithAttachments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListKeysWithAttachments'
346type MockSecretService_ListKeysWithAttachments_Call struct {
347 *mock.Call
348}
349
350// ListKeysWithAttachments is a helper method to define mock.On call
351// - ctx context.Context
352// - domain string
353func (_e *MockSecretService_Expecter) ListKeysWithAttachments(ctx interface{}, domain interface{}) *MockSecretService_ListKeysWithAttachments_Call {
354 return &MockSecretService_ListKeysWithAttachments_Call{Call: _e.mock.On("ListKeysWithAttachments", ctx, domain)}
355}
356
357func (_c *MockSecretService_ListKeysWithAttachments_Call) Run(run func(ctx context.Context, domain string)) *MockSecretService_ListKeysWithAttachments_Call {
358 _c.Call.Run(func(args mock.Arguments) {
359 var arg0 context.Context
360 if args[0] != nil {
361 arg0 = args[0].(context.Context)
362 }
363 var arg1 string
364 if args[1] != nil {
365 arg1 = args[1].(string)
366 }
367 run(
368 arg0,
369 arg1,
370 )
371 })
372 return _c
373}
374
375func (_c *MockSecretService_ListKeysWithAttachments_Call) Return(strings []string, attachmentSecretss []out.AttachmentSecrets, err error) *MockSecretService_ListKeysWithAttachments_Call {
376 _c.Call.Return(strings, attachmentSecretss, err)
377 return _c
378}
379
380func (_c *MockSecretService_ListKeysWithAttachments_Call) RunAndReturn(run func(ctx context.Context, domain string) ([]string, []out.AttachmentSecrets, error)) *MockSecretService_ListKeysWithAttachments_Call {
381 _c.Call.Return(run)
382 return _c
383}
384
385// Set provides a mock function for the type MockSecretService
386func (_mock *MockSecretService) Set(ctx context.Context, domain string, secrets map[string]string) error {
387 ret := _mock.Called(ctx, domain, secrets)
388
389 if len(ret) == 0 {
390 panic("no return value specified for Set")
391 }
392
393 var r0 error
394 if returnFunc, ok := ret.Get(0).(func(context.Context, string, map[string]string) error); ok {
395 r0 = returnFunc(ctx, domain, secrets)
396 } else {
397 r0 = ret.Error(0)
398 }
399 return r0
400}
401
402// MockSecretService_Set_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Set'
403type MockSecretService_Set_Call struct {
404 *mock.Call
405}
406
407// Set is a helper method to define mock.On call
408// - ctx context.Context
409// - domain string
410// - secrets map[string]string
411func (_e *MockSecretService_Expecter) Set(ctx interface{}, domain interface{}, secrets interface{}) *MockSecretService_Set_Call {
412 return &MockSecretService_Set_Call{Call: _e.mock.On("Set", ctx, domain, secrets)}
413}
414
415func (_c *MockSecretService_Set_Call) Run(run func(ctx context.Context, domain string, secrets map[string]string)) *MockSecretService_Set_Call {
416 _c.Call.Run(func(args mock.Arguments) {
417 var arg0 context.Context
418 if args[0] != nil {
419 arg0 = args[0].(context.Context)
420 }
421 var arg1 string
422 if args[1] != nil {
423 arg1 = args[1].(string)
424 }
425 var arg2 map[string]string
426 if args[2] != nil {
427 arg2 = args[2].(map[string]string)
428 }
429 run(
430 arg0,
431 arg1,
432 arg2,
433 )
434 })
435 return _c
436}
437
438func (_c *MockSecretService_Set_Call) Return(err error) *MockSecretService_Set_Call {
439 _c.Call.Return(err)
440 return _c
441}
442
443func (_c *MockSecretService_Set_Call) RunAndReturn(run func(ctx context.Context, domain string, secrets map[string]string) error) *MockSecretService_Set_Call {
444 _c.Call.Return(run)
445 return _c
446}
447
448// SetAttachment provides a mock function for the type MockSecretService
449func (_mock *MockSecretService) SetAttachment(ctx context.Context, domain string, service string, secrets map[string]string) error {
450 ret := _mock.Called(ctx, domain, service, secrets)
451
452 if len(ret) == 0 {
453 panic("no return value specified for SetAttachment")
454 }
455
456 var r0 error
457 if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, map[string]string) error); ok {
458 r0 = returnFunc(ctx, domain, service, secrets)
459 } else {
460 r0 = ret.Error(0)
461 }
462 return r0
463}
464
465// MockSecretService_SetAttachment_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetAttachment'
466type MockSecretService_SetAttachment_Call struct {
467 *mock.Call
468}
469
470// SetAttachment is a helper method to define mock.On call
471// - ctx context.Context
472// - domain string
473// - service string
474// - secrets map[string]string
475func (_e *MockSecretService_Expecter) SetAttachment(ctx interface{}, domain interface{}, service interface{}, secrets interface{}) *MockSecretService_SetAttachment_Call {
476 return &MockSecretService_SetAttachment_Call{Call: _e.mock.On("SetAttachment", ctx, domain, service, secrets)}
477}
478
479func (_c *MockSecretService_SetAttachment_Call) Run(run func(ctx context.Context, domain string, service string, secrets map[string]string)) *MockSecretService_SetAttachment_Call {
480 _c.Call.Run(func(args mock.Arguments) {
481 var arg0 context.Context
482 if args[0] != nil {
483 arg0 = args[0].(context.Context)
484 }
485 var arg1 string
486 if args[1] != nil {
487 arg1 = args[1].(string)
488 }
489 var arg2 string
490 if args[2] != nil {
491 arg2 = args[2].(string)
492 }
493 var arg3 map[string]string
494 if args[3] != nil {
495 arg3 = args[3].(map[string]string)
496 }
497 run(
498 arg0,
499 arg1,
500 arg2,
501 arg3,
502 )
503 })
504 return _c
505}
506
507func (_c *MockSecretService_SetAttachment_Call) Return(err error) *MockSecretService_SetAttachment_Call {
508 _c.Call.Return(err)
509 return _c
510}
511
512func (_c *MockSecretService_SetAttachment_Call) RunAndReturn(run func(ctx context.Context, domain string, service string, secrets map[string]string) error) *MockSecretService_SetAttachment_Call {
513 _c.Call.Return(run)
514 return _c
515}