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/in"
11 "github.com/bnema/gordon/internal/domain"
12 mock "github.com/stretchr/testify/mock"
13)
14
15// NewMockAppService creates a new instance of MockAppService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
16// The first argument is typically a *testing.T value.
17func NewMockAppService(t interface {
18 mock.TestingT
19 Cleanup(func())
20}) *MockAppService {
21 if helper, ok := t.(interface{ Helper() }); ok {
22 helper.Helper()
23 }
24
25 mock := &MockAppService{}
26 mock.Mock.Test(t)
27
28 t.Cleanup(func() {
29 if helper, ok := t.(interface{ Helper() }); ok {
30 helper.Helper()
31 }
32 mock.AssertExpectations(t)
33 })
34
35 return mock
36}
37
38// MockAppService is an autogenerated mock type for the AppService type
39type MockAppService struct {
40 mock.Mock
41}
42
43type MockAppService_Expecter struct {
44 mock *mock.Mock
45}
46
47func (_m *MockAppService) EXPECT() *MockAppService_Expecter {
48 return &MockAppService_Expecter{mock: &_m.Mock}
49}
50
51// Apply provides a mock function for the type MockAppService
52func (_mock *MockAppService) Apply(ctx context.Context, spec domain.AppSpec, source []byte, dryRun bool) (*in.AppApplyResult, *in.AppDryRunResult, error) {
53 ret := _mock.Called(ctx, spec, source, dryRun)
54
55 if len(ret) == 0 {
56 panic("no return value specified for Apply")
57 }
58
59 var r0 *in.AppApplyResult
60 var r1 *in.AppDryRunResult
61 var r2 error
62 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.AppSpec, []byte, bool) (*in.AppApplyResult, *in.AppDryRunResult, error)); ok {
63 return returnFunc(ctx, spec, source, dryRun)
64 }
65 if returnFunc, ok := ret.Get(0).(func(context.Context, domain.AppSpec, []byte, bool) *in.AppApplyResult); ok {
66 r0 = returnFunc(ctx, spec, source, dryRun)
67 } else {
68 if ret.Get(0) != nil {
69 r0 = ret.Get(0).(*in.AppApplyResult)
70 }
71 }
72 if returnFunc, ok := ret.Get(1).(func(context.Context, domain.AppSpec, []byte, bool) *in.AppDryRunResult); ok {
73 r1 = returnFunc(ctx, spec, source, dryRun)
74 } else {
75 if ret.Get(1) != nil {
76 r1 = ret.Get(1).(*in.AppDryRunResult)
77 }
78 }
79 if returnFunc, ok := ret.Get(2).(func(context.Context, domain.AppSpec, []byte, bool) error); ok {
80 r2 = returnFunc(ctx, spec, source, dryRun)
81 } else {
82 r2 = ret.Error(2)
83 }
84 return r0, r1, r2
85}
86
87// MockAppService_Apply_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Apply'
88type MockAppService_Apply_Call struct {
89 *mock.Call
90}
91
92// Apply is a helper method to define mock.On call
93// - ctx context.Context
94// - spec domain.AppSpec
95// - source []byte
96// - dryRun bool
97func (_e *MockAppService_Expecter) Apply(ctx any, spec any, source any, dryRun any) *MockAppService_Apply_Call {
98 return &MockAppService_Apply_Call{Call: _e.mock.On("Apply", ctx, spec, source, dryRun)}
99}
100
101func (_c *MockAppService_Apply_Call) Run(run func(ctx context.Context, spec domain.AppSpec, source []byte, dryRun bool)) *MockAppService_Apply_Call {
102 _c.Call.Run(func(args mock.Arguments) {
103 var arg0 context.Context
104 if args[0] != nil {
105 arg0 = args[0].(context.Context)
106 }
107 var arg1 domain.AppSpec
108 if args[1] != nil {
109 arg1 = args[1].(domain.AppSpec)
110 }
111 var arg2 []byte
112 if args[2] != nil {
113 arg2 = args[2].([]byte)
114 }
115 var arg3 bool
116 if args[3] != nil {
117 arg3 = args[3].(bool)
118 }
119 run(
120 arg0,
121 arg1,
122 arg2,
123 arg3,
124 )
125 })
126 return _c
127}
128
129func (_c *MockAppService_Apply_Call) Return(appApplyResult *in.AppApplyResult, appDryRunResult *in.AppDryRunResult, err error) *MockAppService_Apply_Call {
130 _c.Call.Return(appApplyResult, appDryRunResult, err)
131 return _c
132}
133
134func (_c *MockAppService_Apply_Call) RunAndReturn(run func(ctx context.Context, spec domain.AppSpec, source []byte, dryRun bool) (*in.AppApplyResult, *in.AppDryRunResult, error)) *MockAppService_Apply_Call {
135 _c.Call.Return(run)
136 return _c
137}
138
139// DeleteSecret provides a mock function for the type MockAppService
140func (_mock *MockAppService) DeleteSecret(ctx context.Context, app string, service string, key string) error {
141 ret := _mock.Called(ctx, app, service, key)
142
143 if len(ret) == 0 {
144 panic("no return value specified for DeleteSecret")
145 }
146
147 var r0 error
148 if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string) error); ok {
149 r0 = returnFunc(ctx, app, service, key)
150 } else {
151 r0 = ret.Error(0)
152 }
153 return r0
154}
155
156// MockAppService_DeleteSecret_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteSecret'
157type MockAppService_DeleteSecret_Call struct {
158 *mock.Call
159}
160
161// DeleteSecret is a helper method to define mock.On call
162// - ctx context.Context
163// - app string
164// - service string
165// - key string
166func (_e *MockAppService_Expecter) DeleteSecret(ctx any, app any, service any, key any) *MockAppService_DeleteSecret_Call {
167 return &MockAppService_DeleteSecret_Call{Call: _e.mock.On("DeleteSecret", ctx, app, service, key)}
168}
169
170func (_c *MockAppService_DeleteSecret_Call) Run(run func(ctx context.Context, app string, service string, key string)) *MockAppService_DeleteSecret_Call {
171 _c.Call.Run(func(args mock.Arguments) {
172 var arg0 context.Context
173 if args[0] != nil {
174 arg0 = args[0].(context.Context)
175 }
176 var arg1 string
177 if args[1] != nil {
178 arg1 = args[1].(string)
179 }
180 var arg2 string
181 if args[2] != nil {
182 arg2 = args[2].(string)
183 }
184 var arg3 string
185 if args[3] != nil {
186 arg3 = args[3].(string)
187 }
188 run(
189 arg0,
190 arg1,
191 arg2,
192 arg3,
193 )
194 })
195 return _c
196}
197
198func (_c *MockAppService_DeleteSecret_Call) Return(err error) *MockAppService_DeleteSecret_Call {
199 _c.Call.Return(err)
200 return _c
201}
202
203func (_c *MockAppService_DeleteSecret_Call) RunAndReturn(run func(ctx context.Context, app string, service string, key string) error) *MockAppService_DeleteSecret_Call {
204 _c.Call.Return(run)
205 return _c
206}
207
208// Deploy provides a mock function for the type MockAppService
209func (_mock *MockAppService) Deploy(ctx context.Context, app string, revision string, service string, all bool, idempotencyKey string) (*domain.AppOperation, error) {
210 ret := _mock.Called(ctx, app, revision, service, all, idempotencyKey)
211
212 if len(ret) == 0 {
213 panic("no return value specified for Deploy")
214 }
215
216 var r0 *domain.AppOperation
217 var r1 error
218 if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string, bool, string) (*domain.AppOperation, error)); ok {
219 return returnFunc(ctx, app, revision, service, all, idempotencyKey)
220 }
221 if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, string, bool, string) *domain.AppOperation); ok {
222 r0 = returnFunc(ctx, app, revision, service, all, idempotencyKey)
223 } else {
224 if ret.Get(0) != nil {
225 r0 = ret.Get(0).(*domain.AppOperation)
226 }
227 }
228 if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, string, bool, string) error); ok {
229 r1 = returnFunc(ctx, app, revision, service, all, idempotencyKey)
230 } else {
231 r1 = ret.Error(1)
232 }
233 return r0, r1
234}
235
236// MockAppService_Deploy_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Deploy'
237type MockAppService_Deploy_Call struct {
238 *mock.Call
239}
240
241// Deploy is a helper method to define mock.On call
242// - ctx context.Context
243// - app string
244// - revision string
245// - service string
246// - all bool
247// - idempotencyKey string
248func (_e *MockAppService_Expecter) Deploy(ctx any, app any, revision any, service any, all any, idempotencyKey any) *MockAppService_Deploy_Call {
249 return &MockAppService_Deploy_Call{Call: _e.mock.On("Deploy", ctx, app, revision, service, all, idempotencyKey)}
250}
251
252func (_c *MockAppService_Deploy_Call) Run(run func(ctx context.Context, app string, revision string, service string, all bool, idempotencyKey string)) *MockAppService_Deploy_Call {
253 _c.Call.Run(func(args mock.Arguments) {
254 var arg0 context.Context
255 if args[0] != nil {
256 arg0 = args[0].(context.Context)
257 }
258 var arg1 string
259 if args[1] != nil {
260 arg1 = args[1].(string)
261 }
262 var arg2 string
263 if args[2] != nil {
264 arg2 = args[2].(string)
265 }
266 var arg3 string
267 if args[3] != nil {
268 arg3 = args[3].(string)
269 }
270 var arg4 bool
271 if args[4] != nil {
272 arg4 = args[4].(bool)
273 }
274 var arg5 string
275 if args[5] != nil {
276 arg5 = args[5].(string)
277 }
278 run(
279 arg0,
280 arg1,
281 arg2,
282 arg3,
283 arg4,
284 arg5,
285 )
286 })
287 return _c
288}
289
290func (_c *MockAppService_Deploy_Call) Return(appOperation *domain.AppOperation, err error) *MockAppService_Deploy_Call {
291 _c.Call.Return(appOperation, err)
292 return _c
293}
294
295func (_c *MockAppService_Deploy_Call) RunAndReturn(run func(ctx context.Context, app string, revision string, service string, all bool, idempotencyKey string) (*domain.AppOperation, error)) *MockAppService_Deploy_Call {
296 _c.Call.Return(run)
297 return _c
298}
299
300// Diff provides a mock function for the type MockAppService
301func (_mock *MockAppService) Diff(ctx context.Context, app string) (domain.AppDiff, error) {
302 ret := _mock.Called(ctx, app)
303
304 if len(ret) == 0 {
305 panic("no return value specified for Diff")
306 }
307
308 var r0 domain.AppDiff
309 var r1 error
310 if returnFunc, ok := ret.Get(0).(func(context.Context, string) (domain.AppDiff, error)); ok {
311 return returnFunc(ctx, app)
312 }
313 if returnFunc, ok := ret.Get(0).(func(context.Context, string) domain.AppDiff); ok {
314 r0 = returnFunc(ctx, app)
315 } else {
316 r0 = ret.Get(0).(domain.AppDiff)
317 }
318 if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
319 r1 = returnFunc(ctx, app)
320 } else {
321 r1 = ret.Error(1)
322 }
323 return r0, r1
324}
325
326// MockAppService_Diff_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Diff'
327type MockAppService_Diff_Call struct {
328 *mock.Call
329}
330
331// Diff is a helper method to define mock.On call
332// - ctx context.Context
333// - app string
334func (_e *MockAppService_Expecter) Diff(ctx any, app any) *MockAppService_Diff_Call {
335 return &MockAppService_Diff_Call{Call: _e.mock.On("Diff", ctx, app)}
336}
337
338func (_c *MockAppService_Diff_Call) Run(run func(ctx context.Context, app string)) *MockAppService_Diff_Call {
339 _c.Call.Run(func(args mock.Arguments) {
340 var arg0 context.Context
341 if args[0] != nil {
342 arg0 = args[0].(context.Context)
343 }
344 var arg1 string
345 if args[1] != nil {
346 arg1 = args[1].(string)
347 }
348 run(
349 arg0,
350 arg1,
351 )
352 })
353 return _c
354}
355
356func (_c *MockAppService_Diff_Call) Return(appDiff domain.AppDiff, err error) *MockAppService_Diff_Call {
357 _c.Call.Return(appDiff, err)
358 return _c
359}
360
361func (_c *MockAppService_Diff_Call) RunAndReturn(run func(ctx context.Context, app string) (domain.AppDiff, error)) *MockAppService_Diff_Call {
362 _c.Call.Return(run)
363 return _c
364}
365
366// List provides a mock function for the type MockAppService
367func (_mock *MockAppService) List(ctx context.Context) ([]in.AppSummary, error) {
368 ret := _mock.Called(ctx)
369
370 if len(ret) == 0 {
371 panic("no return value specified for List")
372 }
373
374 var r0 []in.AppSummary
375 var r1 error
376 if returnFunc, ok := ret.Get(0).(func(context.Context) ([]in.AppSummary, error)); ok {
377 return returnFunc(ctx)
378 }
379 if returnFunc, ok := ret.Get(0).(func(context.Context) []in.AppSummary); ok {
380 r0 = returnFunc(ctx)
381 } else {
382 if ret.Get(0) != nil {
383 r0 = ret.Get(0).([]in.AppSummary)
384 }
385 }
386 if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
387 r1 = returnFunc(ctx)
388 } else {
389 r1 = ret.Error(1)
390 }
391 return r0, r1
392}
393
394// MockAppService_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List'
395type MockAppService_List_Call struct {
396 *mock.Call
397}
398
399// List is a helper method to define mock.On call
400// - ctx context.Context
401func (_e *MockAppService_Expecter) List(ctx any) *MockAppService_List_Call {
402 return &MockAppService_List_Call{Call: _e.mock.On("List", ctx)}
403}
404
405func (_c *MockAppService_List_Call) Run(run func(ctx context.Context)) *MockAppService_List_Call {
406 _c.Call.Run(func(args mock.Arguments) {
407 var arg0 context.Context
408 if args[0] != nil {
409 arg0 = args[0].(context.Context)
410 }
411 run(
412 arg0,
413 )
414 })
415 return _c
416}
417
418func (_c *MockAppService_List_Call) Return(appSummarys []in.AppSummary, err error) *MockAppService_List_Call {
419 _c.Call.Return(appSummarys, err)
420 return _c
421}
422
423func (_c *MockAppService_List_Call) RunAndReturn(run func(ctx context.Context) ([]in.AppSummary, error)) *MockAppService_List_Call {
424 _c.Call.Return(run)
425 return _c
426}
427
428// ListSecrets provides a mock function for the type MockAppService
429func (_mock *MockAppService) ListSecrets(ctx context.Context, app string, service string) ([]in.AppSecretMetadata, error) {
430 ret := _mock.Called(ctx, app, service)
431
432 if len(ret) == 0 {
433 panic("no return value specified for ListSecrets")
434 }
435
436 var r0 []in.AppSecretMetadata
437 var r1 error
438 if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) ([]in.AppSecretMetadata, error)); ok {
439 return returnFunc(ctx, app, service)
440 }
441 if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) []in.AppSecretMetadata); ok {
442 r0 = returnFunc(ctx, app, service)
443 } else {
444 if ret.Get(0) != nil {
445 r0 = ret.Get(0).([]in.AppSecretMetadata)
446 }
447 }
448 if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
449 r1 = returnFunc(ctx, app, service)
450 } else {
451 r1 = ret.Error(1)
452 }
453 return r0, r1
454}
455
456// MockAppService_ListSecrets_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListSecrets'
457type MockAppService_ListSecrets_Call struct {
458 *mock.Call
459}
460
461// ListSecrets is a helper method to define mock.On call
462// - ctx context.Context
463// - app string
464// - service string
465func (_e *MockAppService_Expecter) ListSecrets(ctx any, app any, service any) *MockAppService_ListSecrets_Call {
466 return &MockAppService_ListSecrets_Call{Call: _e.mock.On("ListSecrets", ctx, app, service)}
467}
468
469func (_c *MockAppService_ListSecrets_Call) Run(run func(ctx context.Context, app string, service string)) *MockAppService_ListSecrets_Call {
470 _c.Call.Run(func(args mock.Arguments) {
471 var arg0 context.Context
472 if args[0] != nil {
473 arg0 = args[0].(context.Context)
474 }
475 var arg1 string
476 if args[1] != nil {
477 arg1 = args[1].(string)
478 }
479 var arg2 string
480 if args[2] != nil {
481 arg2 = args[2].(string)
482 }
483 run(
484 arg0,
485 arg1,
486 arg2,
487 )
488 })
489 return _c
490}
491
492func (_c *MockAppService_ListSecrets_Call) Return(appSecretMetadatas []in.AppSecretMetadata, err error) *MockAppService_ListSecrets_Call {
493 _c.Call.Return(appSecretMetadatas, err)
494 return _c
495}
496
497func (_c *MockAppService_ListSecrets_Call) RunAndReturn(run func(ctx context.Context, app string, service string) ([]in.AppSecretMetadata, error)) *MockAppService_ListSecrets_Call {
498 _c.Call.Return(run)
499 return _c
500}
501
502// OperationByKey provides a mock function for the type MockAppService
503func (_mock *MockAppService) OperationByKey(ctx context.Context, app string, key string) (*domain.AppOperation, error) {
504 ret := _mock.Called(ctx, app, key)
505
506 if len(ret) == 0 {
507 panic("no return value specified for OperationByKey")
508 }
509
510 var r0 *domain.AppOperation
511 var r1 error
512 if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (*domain.AppOperation, error)); ok {
513 return returnFunc(ctx, app, key)
514 }
515 if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) *domain.AppOperation); ok {
516 r0 = returnFunc(ctx, app, key)
517 } else {
518 if ret.Get(0) != nil {
519 r0 = ret.Get(0).(*domain.AppOperation)
520 }
521 }
522 if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
523 r1 = returnFunc(ctx, app, key)
524 } else {
525 r1 = ret.Error(1)
526 }
527 return r0, r1
528}
529
530// MockAppService_OperationByKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OperationByKey'
531type MockAppService_OperationByKey_Call struct {
532 *mock.Call
533}
534
535// OperationByKey is a helper method to define mock.On call
536// - ctx context.Context
537// - app string
538// - key string
539func (_e *MockAppService_Expecter) OperationByKey(ctx any, app any, key any) *MockAppService_OperationByKey_Call {
540 return &MockAppService_OperationByKey_Call{Call: _e.mock.On("OperationByKey", ctx, app, key)}
541}
542
543func (_c *MockAppService_OperationByKey_Call) Run(run func(ctx context.Context, app string, key string)) *MockAppService_OperationByKey_Call {
544 _c.Call.Run(func(args mock.Arguments) {
545 var arg0 context.Context
546 if args[0] != nil {
547 arg0 = args[0].(context.Context)
548 }
549 var arg1 string
550 if args[1] != nil {
551 arg1 = args[1].(string)
552 }
553 var arg2 string
554 if args[2] != nil {
555 arg2 = args[2].(string)
556 }
557 run(
558 arg0,
559 arg1,
560 arg2,
561 )
562 })
563 return _c
564}
565
566func (_c *MockAppService_OperationByKey_Call) Return(appOperation *domain.AppOperation, err error) *MockAppService_OperationByKey_Call {
567 _c.Call.Return(appOperation, err)
568 return _c
569}
570
571func (_c *MockAppService_OperationByKey_Call) RunAndReturn(run func(ctx context.Context, app string, key string) (*domain.AppOperation, error)) *MockAppService_OperationByKey_Call {
572 _c.Call.Return(run)
573 return _c
574}
575
576// Remove provides a mock function for the type MockAppService
577func (_mock *MockAppService) Remove(ctx context.Context, app string, idempotencyKey string) (*domain.AppOperation, error) {
578 ret := _mock.Called(ctx, app, idempotencyKey)
579
580 if len(ret) == 0 {
581 panic("no return value specified for Remove")
582 }
583
584 var r0 *domain.AppOperation
585 var r1 error
586 if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (*domain.AppOperation, error)); ok {
587 return returnFunc(ctx, app, idempotencyKey)
588 }
589 if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) *domain.AppOperation); ok {
590 r0 = returnFunc(ctx, app, idempotencyKey)
591 } else {
592 if ret.Get(0) != nil {
593 r0 = ret.Get(0).(*domain.AppOperation)
594 }
595 }
596 if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
597 r1 = returnFunc(ctx, app, idempotencyKey)
598 } else {
599 r1 = ret.Error(1)
600 }
601 return r0, r1
602}
603
604// MockAppService_Remove_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Remove'
605type MockAppService_Remove_Call struct {
606 *mock.Call
607}
608
609// Remove is a helper method to define mock.On call
610// - ctx context.Context
611// - app string
612// - idempotencyKey string
613func (_e *MockAppService_Expecter) Remove(ctx any, app any, idempotencyKey any) *MockAppService_Remove_Call {
614 return &MockAppService_Remove_Call{Call: _e.mock.On("Remove", ctx, app, idempotencyKey)}
615}
616
617func (_c *MockAppService_Remove_Call) Run(run func(ctx context.Context, app string, idempotencyKey string)) *MockAppService_Remove_Call {
618 _c.Call.Run(func(args mock.Arguments) {
619 var arg0 context.Context
620 if args[0] != nil {
621 arg0 = args[0].(context.Context)
622 }
623 var arg1 string
624 if args[1] != nil {
625 arg1 = args[1].(string)
626 }
627 var arg2 string
628 if args[2] != nil {
629 arg2 = args[2].(string)
630 }
631 run(
632 arg0,
633 arg1,
634 arg2,
635 )
636 })
637 return _c
638}
639
640func (_c *MockAppService_Remove_Call) Return(appOperation *domain.AppOperation, err error) *MockAppService_Remove_Call {
641 _c.Call.Return(appOperation, err)
642 return _c
643}
644
645func (_c *MockAppService_Remove_Call) RunAndReturn(run func(ctx context.Context, app string, idempotencyKey string) (*domain.AppOperation, error)) *MockAppService_Remove_Call {
646 _c.Call.Return(run)
647 return _c
648}
649
650// Restart provides a mock function for the type MockAppService
651func (_mock *MockAppService) Restart(ctx context.Context, app string, service string, all bool, idempotencyKey string) (*domain.AppOperation, error) {
652 ret := _mock.Called(ctx, app, service, all, idempotencyKey)
653
654 if len(ret) == 0 {
655 panic("no return value specified for Restart")
656 }
657
658 var r0 *domain.AppOperation
659 var r1 error
660 if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, bool, string) (*domain.AppOperation, error)); ok {
661 return returnFunc(ctx, app, service, all, idempotencyKey)
662 }
663 if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, bool, string) *domain.AppOperation); ok {
664 r0 = returnFunc(ctx, app, service, all, idempotencyKey)
665 } else {
666 if ret.Get(0) != nil {
667 r0 = ret.Get(0).(*domain.AppOperation)
668 }
669 }
670 if returnFunc, ok := ret.Get(1).(func(context.Context, string, string, bool, string) error); ok {
671 r1 = returnFunc(ctx, app, service, all, idempotencyKey)
672 } else {
673 r1 = ret.Error(1)
674 }
675 return r0, r1
676}
677
678// MockAppService_Restart_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Restart'
679type MockAppService_Restart_Call struct {
680 *mock.Call
681}
682
683// Restart is a helper method to define mock.On call
684// - ctx context.Context
685// - app string
686// - service string
687// - all bool
688// - idempotencyKey string
689func (_e *MockAppService_Expecter) Restart(ctx any, app any, service any, all any, idempotencyKey any) *MockAppService_Restart_Call {
690 return &MockAppService_Restart_Call{Call: _e.mock.On("Restart", ctx, app, service, all, idempotencyKey)}
691}
692
693func (_c *MockAppService_Restart_Call) Run(run func(ctx context.Context, app string, service string, all bool, idempotencyKey string)) *MockAppService_Restart_Call {
694 _c.Call.Run(func(args mock.Arguments) {
695 var arg0 context.Context
696 if args[0] != nil {
697 arg0 = args[0].(context.Context)
698 }
699 var arg1 string
700 if args[1] != nil {
701 arg1 = args[1].(string)
702 }
703 var arg2 string
704 if args[2] != nil {
705 arg2 = args[2].(string)
706 }
707 var arg3 bool
708 if args[3] != nil {
709 arg3 = args[3].(bool)
710 }
711 var arg4 string
712 if args[4] != nil {
713 arg4 = args[4].(string)
714 }
715 run(
716 arg0,
717 arg1,
718 arg2,
719 arg3,
720 arg4,
721 )
722 })
723 return _c
724}
725
726func (_c *MockAppService_Restart_Call) Return(appOperation *domain.AppOperation, err error) *MockAppService_Restart_Call {
727 _c.Call.Return(appOperation, err)
728 return _c
729}
730
731func (_c *MockAppService_Restart_Call) RunAndReturn(run func(ctx context.Context, app string, service string, all bool, idempotencyKey string) (*domain.AppOperation, error)) *MockAppService_Restart_Call {
732 _c.Call.Return(run)
733 return _c
734}
735
736// SetSecrets provides a mock function for the type MockAppService
737func (_mock *MockAppService) SetSecrets(ctx context.Context, app string, service string, values map[string]string) error {
738 ret := _mock.Called(ctx, app, service, values)
739
740 if len(ret) == 0 {
741 panic("no return value specified for SetSecrets")
742 }
743
744 var r0 error
745 if returnFunc, ok := ret.Get(0).(func(context.Context, string, string, map[string]string) error); ok {
746 r0 = returnFunc(ctx, app, service, values)
747 } else {
748 r0 = ret.Error(0)
749 }
750 return r0
751}
752
753// MockAppService_SetSecrets_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetSecrets'
754type MockAppService_SetSecrets_Call struct {
755 *mock.Call
756}
757
758// SetSecrets is a helper method to define mock.On call
759// - ctx context.Context
760// - app string
761// - service string
762// - values map[string]string
763func (_e *MockAppService_Expecter) SetSecrets(ctx any, app any, service any, values any) *MockAppService_SetSecrets_Call {
764 return &MockAppService_SetSecrets_Call{Call: _e.mock.On("SetSecrets", ctx, app, service, values)}
765}
766
767func (_c *MockAppService_SetSecrets_Call) Run(run func(ctx context.Context, app string, service string, values map[string]string)) *MockAppService_SetSecrets_Call {
768 _c.Call.Run(func(args mock.Arguments) {
769 var arg0 context.Context
770 if args[0] != nil {
771 arg0 = args[0].(context.Context)
772 }
773 var arg1 string
774 if args[1] != nil {
775 arg1 = args[1].(string)
776 }
777 var arg2 string
778 if args[2] != nil {
779 arg2 = args[2].(string)
780 }
781 var arg3 map[string]string
782 if args[3] != nil {
783 arg3 = args[3].(map[string]string)
784 }
785 run(
786 arg0,
787 arg1,
788 arg2,
789 arg3,
790 )
791 })
792 return _c
793}
794
795func (_c *MockAppService_SetSecrets_Call) Return(err error) *MockAppService_SetSecrets_Call {
796 _c.Call.Return(err)
797 return _c
798}
799
800func (_c *MockAppService_SetSecrets_Call) RunAndReturn(run func(ctx context.Context, app string, service string, values map[string]string) error) *MockAppService_SetSecrets_Call {
801 _c.Call.Return(run)
802 return _c
803}
804
805// Show provides a mock function for the type MockAppService
806func (_mock *MockAppService) Show(ctx context.Context, app string) (*in.AppDetail, error) {
807 ret := _mock.Called(ctx, app)
808
809 if len(ret) == 0 {
810 panic("no return value specified for Show")
811 }
812
813 var r0 *in.AppDetail
814 var r1 error
815 if returnFunc, ok := ret.Get(0).(func(context.Context, string) (*in.AppDetail, error)); ok {
816 return returnFunc(ctx, app)
817 }
818 if returnFunc, ok := ret.Get(0).(func(context.Context, string) *in.AppDetail); ok {
819 r0 = returnFunc(ctx, app)
820 } else {
821 if ret.Get(0) != nil {
822 r0 = ret.Get(0).(*in.AppDetail)
823 }
824 }
825 if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
826 r1 = returnFunc(ctx, app)
827 } else {
828 r1 = ret.Error(1)
829 }
830 return r0, r1
831}
832
833// MockAppService_Show_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Show'
834type MockAppService_Show_Call struct {
835 *mock.Call
836}
837
838// Show is a helper method to define mock.On call
839// - ctx context.Context
840// - app string
841func (_e *MockAppService_Expecter) Show(ctx any, app any) *MockAppService_Show_Call {
842 return &MockAppService_Show_Call{Call: _e.mock.On("Show", ctx, app)}
843}
844
845func (_c *MockAppService_Show_Call) Run(run func(ctx context.Context, app string)) *MockAppService_Show_Call {
846 _c.Call.Run(func(args mock.Arguments) {
847 var arg0 context.Context
848 if args[0] != nil {
849 arg0 = args[0].(context.Context)
850 }
851 var arg1 string
852 if args[1] != nil {
853 arg1 = args[1].(string)
854 }
855 run(
856 arg0,
857 arg1,
858 )
859 })
860 return _c
861}
862
863func (_c *MockAppService_Show_Call) Return(appDetail *in.AppDetail, err error) *MockAppService_Show_Call {
864 _c.Call.Return(appDetail, err)
865 return _c
866}
867
868func (_c *MockAppService_Show_Call) RunAndReturn(run func(ctx context.Context, app string) (*in.AppDetail, error)) *MockAppService_Show_Call {
869 _c.Call.Return(run)
870 return _c
871}
872
873// Start provides a mock function for the type MockAppService
874func (_mock *MockAppService) Start(ctx context.Context, app string, idempotencyKey string) (*domain.AppOperation, error) {
875 ret := _mock.Called(ctx, app, idempotencyKey)
876
877 if len(ret) == 0 {
878 panic("no return value specified for Start")
879 }
880
881 var r0 *domain.AppOperation
882 var r1 error
883 if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (*domain.AppOperation, error)); ok {
884 return returnFunc(ctx, app, idempotencyKey)
885 }
886 if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) *domain.AppOperation); ok {
887 r0 = returnFunc(ctx, app, idempotencyKey)
888 } else {
889 if ret.Get(0) != nil {
890 r0 = ret.Get(0).(*domain.AppOperation)
891 }
892 }
893 if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
894 r1 = returnFunc(ctx, app, idempotencyKey)
895 } else {
896 r1 = ret.Error(1)
897 }
898 return r0, r1
899}
900
901// MockAppService_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start'
902type MockAppService_Start_Call struct {
903 *mock.Call
904}
905
906// Start is a helper method to define mock.On call
907// - ctx context.Context
908// - app string
909// - idempotencyKey string
910func (_e *MockAppService_Expecter) Start(ctx any, app any, idempotencyKey any) *MockAppService_Start_Call {
911 return &MockAppService_Start_Call{Call: _e.mock.On("Start", ctx, app, idempotencyKey)}
912}
913
914func (_c *MockAppService_Start_Call) Run(run func(ctx context.Context, app string, idempotencyKey string)) *MockAppService_Start_Call {
915 _c.Call.Run(func(args mock.Arguments) {
916 var arg0 context.Context
917 if args[0] != nil {
918 arg0 = args[0].(context.Context)
919 }
920 var arg1 string
921 if args[1] != nil {
922 arg1 = args[1].(string)
923 }
924 var arg2 string
925 if args[2] != nil {
926 arg2 = args[2].(string)
927 }
928 run(
929 arg0,
930 arg1,
931 arg2,
932 )
933 })
934 return _c
935}
936
937func (_c *MockAppService_Start_Call) Return(appOperation *domain.AppOperation, err error) *MockAppService_Start_Call {
938 _c.Call.Return(appOperation, err)
939 return _c
940}
941
942func (_c *MockAppService_Start_Call) RunAndReturn(run func(ctx context.Context, app string, idempotencyKey string) (*domain.AppOperation, error)) *MockAppService_Start_Call {
943 _c.Call.Return(run)
944 return _c
945}
946
947// Stop provides a mock function for the type MockAppService
948func (_mock *MockAppService) Stop(ctx context.Context, app string, idempotencyKey string) (*domain.AppOperation, error) {
949 ret := _mock.Called(ctx, app, idempotencyKey)
950
951 if len(ret) == 0 {
952 panic("no return value specified for Stop")
953 }
954
955 var r0 *domain.AppOperation
956 var r1 error
957 if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (*domain.AppOperation, error)); ok {
958 return returnFunc(ctx, app, idempotencyKey)
959 }
960 if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) *domain.AppOperation); ok {
961 r0 = returnFunc(ctx, app, idempotencyKey)
962 } else {
963 if ret.Get(0) != nil {
964 r0 = ret.Get(0).(*domain.AppOperation)
965 }
966 }
967 if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
968 r1 = returnFunc(ctx, app, idempotencyKey)
969 } else {
970 r1 = ret.Error(1)
971 }
972 return r0, r1
973}
974
975// MockAppService_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop'
976type MockAppService_Stop_Call struct {
977 *mock.Call
978}
979
980// Stop is a helper method to define mock.On call
981// - ctx context.Context
982// - app string
983// - idempotencyKey string
984func (_e *MockAppService_Expecter) Stop(ctx any, app any, idempotencyKey any) *MockAppService_Stop_Call {
985 return &MockAppService_Stop_Call{Call: _e.mock.On("Stop", ctx, app, idempotencyKey)}
986}
987
988func (_c *MockAppService_Stop_Call) Run(run func(ctx context.Context, app string, idempotencyKey string)) *MockAppService_Stop_Call {
989 _c.Call.Run(func(args mock.Arguments) {
990 var arg0 context.Context
991 if args[0] != nil {
992 arg0 = args[0].(context.Context)
993 }
994 var arg1 string
995 if args[1] != nil {
996 arg1 = args[1].(string)
997 }
998 var arg2 string
999 if args[2] != nil {
1000 arg2 = args[2].(string)
1001 }
1002 run(
1003 arg0,
1004 arg1,
1005 arg2,
1006 )
1007 })
1008 return _c
1009}
1010
1011func (_c *MockAppService_Stop_Call) Return(appOperation *domain.AppOperation, err error) *MockAppService_Stop_Call {
1012 _c.Call.Return(appOperation, err)
1013 return _c
1014}
1015
1016func (_c *MockAppService_Stop_Call) RunAndReturn(run func(ctx context.Context, app string, idempotencyKey string) (*domain.AppOperation, error)) *MockAppService_Stop_Call {
1017 _c.Call.Return(run)
1018 return _c
1019}