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