remote_mock.go RawHistoryFolder

1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package portsmocks
6
7import (
8	"context"
9
10	"github.com/bnema/vev/internal/domain"
11	"github.com/bnema/vev/internal/ports"
12	"github.com/bnema/vev/internal/protocol/catalogue"
13	mock "github.com/stretchr/testify/mock"
14)
15
16// NewMockRemoteHostStore creates a new instance of MockRemoteHostStore. 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 NewMockRemoteHostStore(t interface {
19	mock.TestingT
20	Cleanup(func())
21}) *MockRemoteHostStore {
22	if helper, ok := t.(interface{ Helper() }); ok {
23		helper.Helper()
24	}
25
26	mock := &MockRemoteHostStore{}
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// MockRemoteHostStore is an autogenerated mock type for the RemoteHostStore type
40type MockRemoteHostStore struct {
41	mock.Mock
42}
43
44type MockRemoteHostStore_Expecter struct {
45	mock *mock.Mock
46}
47
48func (_m *MockRemoteHostStore) EXPECT() *MockRemoteHostStore_Expecter {
49	return &MockRemoteHostStore_Expecter{mock: &_m.Mock}
50}
51
52// AddPinned provides a mock function for the type MockRemoteHostStore
53func (_mock *MockRemoteHostStore) AddPinned(target string) error {
54	ret := _mock.Called(target)
55
56	if len(ret) == 0 {
57		panic("no return value specified for AddPinned")
58	}
59
60	var r0 error
61	if returnFunc, ok := ret.Get(0).(func(string) error); ok {
62		r0 = returnFunc(target)
63	} else {
64		r0 = ret.Error(0)
65	}
66	return r0
67}
68
69// MockRemoteHostStore_AddPinned_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddPinned'
70type MockRemoteHostStore_AddPinned_Call struct {
71	*mock.Call
72}
73
74// AddPinned is a helper method to define mock.On call
75//   - target string
76func (_e *MockRemoteHostStore_Expecter) AddPinned(target any) *MockRemoteHostStore_AddPinned_Call {
77	return &MockRemoteHostStore_AddPinned_Call{Call: _e.mock.On("AddPinned", target)}
78}
79
80func (_c *MockRemoteHostStore_AddPinned_Call) Run(run func(target string)) *MockRemoteHostStore_AddPinned_Call {
81	_c.Call.Run(func(args mock.Arguments) {
82		var arg0 string
83		if args[0] != nil {
84			arg0 = args[0].(string)
85		}
86		run(
87			arg0,
88		)
89	})
90	return _c
91}
92
93func (_c *MockRemoteHostStore_AddPinned_Call) Return(err error) *MockRemoteHostStore_AddPinned_Call {
94	_c.Call.Return(err)
95	return _c
96}
97
98func (_c *MockRemoteHostStore_AddPinned_Call) RunAndReturn(run func(target string) error) *MockRemoteHostStore_AddPinned_Call {
99	_c.Call.Return(run)
100	return _c
101}
102
103// Forget provides a mock function for the type MockRemoteHostStore
104func (_mock *MockRemoteHostStore) Forget(target string) error {
105	ret := _mock.Called(target)
106
107	if len(ret) == 0 {
108		panic("no return value specified for Forget")
109	}
110
111	var r0 error
112	if returnFunc, ok := ret.Get(0).(func(string) error); ok {
113		r0 = returnFunc(target)
114	} else {
115		r0 = ret.Error(0)
116	}
117	return r0
118}
119
120// MockRemoteHostStore_Forget_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Forget'
121type MockRemoteHostStore_Forget_Call struct {
122	*mock.Call
123}
124
125// Forget is a helper method to define mock.On call
126//   - target string
127func (_e *MockRemoteHostStore_Expecter) Forget(target any) *MockRemoteHostStore_Forget_Call {
128	return &MockRemoteHostStore_Forget_Call{Call: _e.mock.On("Forget", target)}
129}
130
131func (_c *MockRemoteHostStore_Forget_Call) Run(run func(target string)) *MockRemoteHostStore_Forget_Call {
132	_c.Call.Run(func(args mock.Arguments) {
133		var arg0 string
134		if args[0] != nil {
135			arg0 = args[0].(string)
136		}
137		run(
138			arg0,
139		)
140	})
141	return _c
142}
143
144func (_c *MockRemoteHostStore_Forget_Call) Return(err error) *MockRemoteHostStore_Forget_Call {
145	_c.Call.Return(err)
146	return _c
147}
148
149func (_c *MockRemoteHostStore_Forget_Call) RunAndReturn(run func(target string) error) *MockRemoteHostStore_Forget_Call {
150	_c.Call.Return(run)
151	return _c
152}
153
154// Hosts provides a mock function for the type MockRemoteHostStore
155func (_mock *MockRemoteHostStore) Hosts() ([]domain.RemoteRegistration, []domain.RemoteRegistration, error) {
156	ret := _mock.Called()
157
158	if len(ret) == 0 {
159		panic("no return value specified for Hosts")
160	}
161
162	var r0 []domain.RemoteRegistration
163	var r1 []domain.RemoteRegistration
164	var r2 error
165	if returnFunc, ok := ret.Get(0).(func() ([]domain.RemoteRegistration, []domain.RemoteRegistration, error)); ok {
166		return returnFunc()
167	}
168	if returnFunc, ok := ret.Get(0).(func() []domain.RemoteRegistration); ok {
169		r0 = returnFunc()
170	} else {
171		if ret.Get(0) != nil {
172			r0 = ret.Get(0).([]domain.RemoteRegistration)
173		}
174	}
175	if returnFunc, ok := ret.Get(1).(func() []domain.RemoteRegistration); ok {
176		r1 = returnFunc()
177	} else {
178		if ret.Get(1) != nil {
179			r1 = ret.Get(1).([]domain.RemoteRegistration)
180		}
181	}
182	if returnFunc, ok := ret.Get(2).(func() error); ok {
183		r2 = returnFunc()
184	} else {
185		r2 = ret.Error(2)
186	}
187	return r0, r1, r2
188}
189
190// MockRemoteHostStore_Hosts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Hosts'
191type MockRemoteHostStore_Hosts_Call struct {
192	*mock.Call
193}
194
195// Hosts is a helper method to define mock.On call
196func (_e *MockRemoteHostStore_Expecter) Hosts() *MockRemoteHostStore_Hosts_Call {
197	return &MockRemoteHostStore_Hosts_Call{Call: _e.mock.On("Hosts")}
198}
199
200func (_c *MockRemoteHostStore_Hosts_Call) Run(run func()) *MockRemoteHostStore_Hosts_Call {
201	_c.Call.Run(func(args mock.Arguments) {
202		run()
203	})
204	return _c
205}
206
207func (_c *MockRemoteHostStore_Hosts_Call) Return(pinned []domain.RemoteRegistration, learned []domain.RemoteRegistration, err error) *MockRemoteHostStore_Hosts_Call {
208	_c.Call.Return(pinned, learned, err)
209	return _c
210}
211
212func (_c *MockRemoteHostStore_Hosts_Call) RunAndReturn(run func() ([]domain.RemoteRegistration, []domain.RemoteRegistration, error)) *MockRemoteHostStore_Hosts_Call {
213	_c.Call.Return(run)
214	return _c
215}
216
217// Remember provides a mock function for the type MockRemoteHostStore
218func (_mock *MockRemoteHostStore) Remember(target string) error {
219	ret := _mock.Called(target)
220
221	if len(ret) == 0 {
222		panic("no return value specified for Remember")
223	}
224
225	var r0 error
226	if returnFunc, ok := ret.Get(0).(func(string) error); ok {
227		r0 = returnFunc(target)
228	} else {
229		r0 = ret.Error(0)
230	}
231	return r0
232}
233
234// MockRemoteHostStore_Remember_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Remember'
235type MockRemoteHostStore_Remember_Call struct {
236	*mock.Call
237}
238
239// Remember is a helper method to define mock.On call
240//   - target string
241func (_e *MockRemoteHostStore_Expecter) Remember(target any) *MockRemoteHostStore_Remember_Call {
242	return &MockRemoteHostStore_Remember_Call{Call: _e.mock.On("Remember", target)}
243}
244
245func (_c *MockRemoteHostStore_Remember_Call) Run(run func(target string)) *MockRemoteHostStore_Remember_Call {
246	_c.Call.Run(func(args mock.Arguments) {
247		var arg0 string
248		if args[0] != nil {
249			arg0 = args[0].(string)
250		}
251		run(
252			arg0,
253		)
254	})
255	return _c
256}
257
258func (_c *MockRemoteHostStore_Remember_Call) Return(err error) *MockRemoteHostStore_Remember_Call {
259	_c.Call.Return(err)
260	return _c
261}
262
263func (_c *MockRemoteHostStore_Remember_Call) RunAndReturn(run func(target string) error) *MockRemoteHostStore_Remember_Call {
264	_c.Call.Return(run)
265	return _c
266}
267
268// Remove provides a mock function for the type MockRemoteHostStore
269func (_mock *MockRemoteHostStore) Remove(target string) (bool, error) {
270	ret := _mock.Called(target)
271
272	if len(ret) == 0 {
273		panic("no return value specified for Remove")
274	}
275
276	var r0 bool
277	var r1 error
278	if returnFunc, ok := ret.Get(0).(func(string) (bool, error)); ok {
279		return returnFunc(target)
280	}
281	if returnFunc, ok := ret.Get(0).(func(string) bool); ok {
282		r0 = returnFunc(target)
283	} else {
284		r0 = ret.Get(0).(bool)
285	}
286	if returnFunc, ok := ret.Get(1).(func(string) error); ok {
287		r1 = returnFunc(target)
288	} else {
289		r1 = ret.Error(1)
290	}
291	return r0, r1
292}
293
294// MockRemoteHostStore_Remove_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Remove'
295type MockRemoteHostStore_Remove_Call struct {
296	*mock.Call
297}
298
299// Remove is a helper method to define mock.On call
300//   - target string
301func (_e *MockRemoteHostStore_Expecter) Remove(target any) *MockRemoteHostStore_Remove_Call {
302	return &MockRemoteHostStore_Remove_Call{Call: _e.mock.On("Remove", target)}
303}
304
305func (_c *MockRemoteHostStore_Remove_Call) Run(run func(target string)) *MockRemoteHostStore_Remove_Call {
306	_c.Call.Run(func(args mock.Arguments) {
307		var arg0 string
308		if args[0] != nil {
309			arg0 = args[0].(string)
310		}
311		run(
312			arg0,
313		)
314	})
315	return _c
316}
317
318func (_c *MockRemoteHostStore_Remove_Call) Return(deleted bool, err error) *MockRemoteHostStore_Remove_Call {
319	_c.Call.Return(deleted, err)
320	return _c
321}
322
323func (_c *MockRemoteHostStore_Remove_Call) RunAndReturn(run func(target string) (bool, error)) *MockRemoteHostStore_Remove_Call {
324	_c.Call.Return(run)
325	return _c
326}
327
328// RemovePinned provides a mock function for the type MockRemoteHostStore
329func (_mock *MockRemoteHostStore) RemovePinned(target string) error {
330	ret := _mock.Called(target)
331
332	if len(ret) == 0 {
333		panic("no return value specified for RemovePinned")
334	}
335
336	var r0 error
337	if returnFunc, ok := ret.Get(0).(func(string) error); ok {
338		r0 = returnFunc(target)
339	} else {
340		r0 = ret.Error(0)
341	}
342	return r0
343}
344
345// MockRemoteHostStore_RemovePinned_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemovePinned'
346type MockRemoteHostStore_RemovePinned_Call struct {
347	*mock.Call
348}
349
350// RemovePinned is a helper method to define mock.On call
351//   - target string
352func (_e *MockRemoteHostStore_Expecter) RemovePinned(target any) *MockRemoteHostStore_RemovePinned_Call {
353	return &MockRemoteHostStore_RemovePinned_Call{Call: _e.mock.On("RemovePinned", target)}
354}
355
356func (_c *MockRemoteHostStore_RemovePinned_Call) Run(run func(target string)) *MockRemoteHostStore_RemovePinned_Call {
357	_c.Call.Run(func(args mock.Arguments) {
358		var arg0 string
359		if args[0] != nil {
360			arg0 = args[0].(string)
361		}
362		run(
363			arg0,
364		)
365	})
366	return _c
367}
368
369func (_c *MockRemoteHostStore_RemovePinned_Call) Return(err error) *MockRemoteHostStore_RemovePinned_Call {
370	_c.Call.Return(err)
371	return _c
372}
373
374func (_c *MockRemoteHostStore_RemovePinned_Call) RunAndReturn(run func(target string) error) *MockRemoteHostStore_RemovePinned_Call {
375	_c.Call.Return(run)
376	return _c
377}
378
379// NewMockRemoteCatalogClient creates a new instance of MockRemoteCatalogClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
380// The first argument is typically a *testing.T value.
381func NewMockRemoteCatalogClient(t interface {
382	mock.TestingT
383	Cleanup(func())
384}) *MockRemoteCatalogClient {
385	if helper, ok := t.(interface{ Helper() }); ok {
386		helper.Helper()
387	}
388
389	mock := &MockRemoteCatalogClient{}
390	mock.Mock.Test(t)
391
392	t.Cleanup(func() {
393		if helper, ok := t.(interface{ Helper() }); ok {
394			helper.Helper()
395		}
396		mock.AssertExpectations(t)
397	})
398
399	return mock
400}
401
402// MockRemoteCatalogClient is an autogenerated mock type for the RemoteCatalogClient type
403type MockRemoteCatalogClient struct {
404	mock.Mock
405}
406
407type MockRemoteCatalogClient_Expecter struct {
408	mock *mock.Mock
409}
410
411func (_m *MockRemoteCatalogClient) EXPECT() *MockRemoteCatalogClient_Expecter {
412	return &MockRemoteCatalogClient_Expecter{mock: &_m.Mock}
413}
414
415// List provides a mock function for the type MockRemoteCatalogClient
416func (_mock *MockRemoteCatalogClient) List(ctx context.Context, target string) (catalogue.RemoteCatalog, error) {
417	ret := _mock.Called(ctx, target)
418
419	if len(ret) == 0 {
420		panic("no return value specified for List")
421	}
422
423	var r0 catalogue.RemoteCatalog
424	var r1 error
425	if returnFunc, ok := ret.Get(0).(func(context.Context, string) (catalogue.RemoteCatalog, error)); ok {
426		return returnFunc(ctx, target)
427	}
428	if returnFunc, ok := ret.Get(0).(func(context.Context, string) catalogue.RemoteCatalog); ok {
429		r0 = returnFunc(ctx, target)
430	} else {
431		r0 = ret.Get(0).(catalogue.RemoteCatalog)
432	}
433	if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
434		r1 = returnFunc(ctx, target)
435	} else {
436		r1 = ret.Error(1)
437	}
438	return r0, r1
439}
440
441// MockRemoteCatalogClient_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List'
442type MockRemoteCatalogClient_List_Call struct {
443	*mock.Call
444}
445
446// List is a helper method to define mock.On call
447//   - ctx context.Context
448//   - target string
449func (_e *MockRemoteCatalogClient_Expecter) List(ctx any, target any) *MockRemoteCatalogClient_List_Call {
450	return &MockRemoteCatalogClient_List_Call{Call: _e.mock.On("List", ctx, target)}
451}
452
453func (_c *MockRemoteCatalogClient_List_Call) Run(run func(ctx context.Context, target string)) *MockRemoteCatalogClient_List_Call {
454	_c.Call.Run(func(args mock.Arguments) {
455		var arg0 context.Context
456		if args[0] != nil {
457			arg0 = args[0].(context.Context)
458		}
459		var arg1 string
460		if args[1] != nil {
461			arg1 = args[1].(string)
462		}
463		run(
464			arg0,
465			arg1,
466		)
467	})
468	return _c
469}
470
471func (_c *MockRemoteCatalogClient_List_Call) Return(remoteCatalog catalogue.RemoteCatalog, err error) *MockRemoteCatalogClient_List_Call {
472	_c.Call.Return(remoteCatalog, err)
473	return _c
474}
475
476func (_c *MockRemoteCatalogClient_List_Call) RunAndReturn(run func(ctx context.Context, target string) (catalogue.RemoteCatalog, error)) *MockRemoteCatalogClient_List_Call {
477	_c.Call.Return(run)
478	return _c
479}
480
481// NewMockRemoteCatalogCache creates a new instance of MockRemoteCatalogCache. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
482// The first argument is typically a *testing.T value.
483func NewMockRemoteCatalogCache(t interface {
484	mock.TestingT
485	Cleanup(func())
486}) *MockRemoteCatalogCache {
487	if helper, ok := t.(interface{ Helper() }); ok {
488		helper.Helper()
489	}
490
491	mock := &MockRemoteCatalogCache{}
492	mock.Mock.Test(t)
493
494	t.Cleanup(func() {
495		if helper, ok := t.(interface{ Helper() }); ok {
496			helper.Helper()
497		}
498		mock.AssertExpectations(t)
499	})
500
501	return mock
502}
503
504// MockRemoteCatalogCache is an autogenerated mock type for the RemoteCatalogCache type
505type MockRemoteCatalogCache struct {
506	mock.Mock
507}
508
509type MockRemoteCatalogCache_Expecter struct {
510	mock *mock.Mock
511}
512
513func (_m *MockRemoteCatalogCache) EXPECT() *MockRemoteCatalogCache_Expecter {
514	return &MockRemoteCatalogCache_Expecter{mock: &_m.Mock}
515}
516
517// Load provides a mock function for the type MockRemoteCatalogCache
518func (_mock *MockRemoteCatalogCache) Load() ([]catalogue.RemoteCatalogCacheEntry, error) {
519	ret := _mock.Called()
520
521	if len(ret) == 0 {
522		panic("no return value specified for Load")
523	}
524
525	var r0 []catalogue.RemoteCatalogCacheEntry
526	var r1 error
527	if returnFunc, ok := ret.Get(0).(func() ([]catalogue.RemoteCatalogCacheEntry, error)); ok {
528		return returnFunc()
529	}
530	if returnFunc, ok := ret.Get(0).(func() []catalogue.RemoteCatalogCacheEntry); ok {
531		r0 = returnFunc()
532	} else {
533		if ret.Get(0) != nil {
534			r0 = ret.Get(0).([]catalogue.RemoteCatalogCacheEntry)
535		}
536	}
537	if returnFunc, ok := ret.Get(1).(func() error); ok {
538		r1 = returnFunc()
539	} else {
540		r1 = ret.Error(1)
541	}
542	return r0, r1
543}
544
545// MockRemoteCatalogCache_Load_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Load'
546type MockRemoteCatalogCache_Load_Call struct {
547	*mock.Call
548}
549
550// Load is a helper method to define mock.On call
551func (_e *MockRemoteCatalogCache_Expecter) Load() *MockRemoteCatalogCache_Load_Call {
552	return &MockRemoteCatalogCache_Load_Call{Call: _e.mock.On("Load")}
553}
554
555func (_c *MockRemoteCatalogCache_Load_Call) Run(run func()) *MockRemoteCatalogCache_Load_Call {
556	_c.Call.Run(func(args mock.Arguments) {
557		run()
558	})
559	return _c
560}
561
562func (_c *MockRemoteCatalogCache_Load_Call) Return(remoteCatalogCacheEntrys []catalogue.RemoteCatalogCacheEntry, err error) *MockRemoteCatalogCache_Load_Call {
563	_c.Call.Return(remoteCatalogCacheEntrys, err)
564	return _c
565}
566
567func (_c *MockRemoteCatalogCache_Load_Call) RunAndReturn(run func() ([]catalogue.RemoteCatalogCacheEntry, error)) *MockRemoteCatalogCache_Load_Call {
568	_c.Call.Return(run)
569	return _c
570}
571
572// Store provides a mock function for the type MockRemoteCatalogCache
573func (_mock *MockRemoteCatalogCache) Store(remoteCatalogCacheEntrys []catalogue.RemoteCatalogCacheEntry) error {
574	ret := _mock.Called(remoteCatalogCacheEntrys)
575
576	if len(ret) == 0 {
577		panic("no return value specified for Store")
578	}
579
580	var r0 error
581	if returnFunc, ok := ret.Get(0).(func([]catalogue.RemoteCatalogCacheEntry) error); ok {
582		r0 = returnFunc(remoteCatalogCacheEntrys)
583	} else {
584		r0 = ret.Error(0)
585	}
586	return r0
587}
588
589// MockRemoteCatalogCache_Store_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Store'
590type MockRemoteCatalogCache_Store_Call struct {
591	*mock.Call
592}
593
594// Store is a helper method to define mock.On call
595//   - remoteCatalogCacheEntrys []catalogue.RemoteCatalogCacheEntry
596func (_e *MockRemoteCatalogCache_Expecter) Store(remoteCatalogCacheEntrys any) *MockRemoteCatalogCache_Store_Call {
597	return &MockRemoteCatalogCache_Store_Call{Call: _e.mock.On("Store", remoteCatalogCacheEntrys)}
598}
599
600func (_c *MockRemoteCatalogCache_Store_Call) Run(run func(remoteCatalogCacheEntrys []catalogue.RemoteCatalogCacheEntry)) *MockRemoteCatalogCache_Store_Call {
601	_c.Call.Run(func(args mock.Arguments) {
602		var arg0 []catalogue.RemoteCatalogCacheEntry
603		if args[0] != nil {
604			arg0 = args[0].([]catalogue.RemoteCatalogCacheEntry)
605		}
606		run(
607			arg0,
608		)
609	})
610	return _c
611}
612
613func (_c *MockRemoteCatalogCache_Store_Call) Return(err error) *MockRemoteCatalogCache_Store_Call {
614	_c.Call.Return(err)
615	return _c
616}
617
618func (_c *MockRemoteCatalogCache_Store_Call) RunAndReturn(run func(remoteCatalogCacheEntrys []catalogue.RemoteCatalogCacheEntry) error) *MockRemoteCatalogCache_Store_Call {
619	_c.Call.Return(run)
620	return _c
621}
622
623// NewMockRemoteEndpointFactory creates a new instance of MockRemoteEndpointFactory. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
624// The first argument is typically a *testing.T value.
625func NewMockRemoteEndpointFactory(t interface {
626	mock.TestingT
627	Cleanup(func())
628}) *MockRemoteEndpointFactory {
629	if helper, ok := t.(interface{ Helper() }); ok {
630		helper.Helper()
631	}
632
633	mock := &MockRemoteEndpointFactory{}
634	mock.Mock.Test(t)
635
636	t.Cleanup(func() {
637		if helper, ok := t.(interface{ Helper() }); ok {
638			helper.Helper()
639		}
640		mock.AssertExpectations(t)
641	})
642
643	return mock
644}
645
646// MockRemoteEndpointFactory is an autogenerated mock type for the RemoteEndpointFactory type
647type MockRemoteEndpointFactory struct {
648	mock.Mock
649}
650
651type MockRemoteEndpointFactory_Expecter struct {
652	mock *mock.Mock
653}
654
655func (_m *MockRemoteEndpointFactory) EXPECT() *MockRemoteEndpointFactory_Expecter {
656	return &MockRemoteEndpointFactory_Expecter{mock: &_m.Mock}
657}
658
659// ResolveEndpoint provides a mock function for the type MockRemoteEndpointFactory
660func (_mock *MockRemoteEndpointFactory) ResolveEndpoint(ctx context.Context, endpoint string) (ports.RemoteEndpointBinding, error) {
661	ret := _mock.Called(ctx, endpoint)
662
663	if len(ret) == 0 {
664		panic("no return value specified for ResolveEndpoint")
665	}
666
667	var r0 ports.RemoteEndpointBinding
668	var r1 error
669	if returnFunc, ok := ret.Get(0).(func(context.Context, string) (ports.RemoteEndpointBinding, error)); ok {
670		return returnFunc(ctx, endpoint)
671	}
672	if returnFunc, ok := ret.Get(0).(func(context.Context, string) ports.RemoteEndpointBinding); ok {
673		r0 = returnFunc(ctx, endpoint)
674	} else {
675		r0 = ret.Get(0).(ports.RemoteEndpointBinding)
676	}
677	if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
678		r1 = returnFunc(ctx, endpoint)
679	} else {
680		r1 = ret.Error(1)
681	}
682	return r0, r1
683}
684
685// MockRemoteEndpointFactory_ResolveEndpoint_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResolveEndpoint'
686type MockRemoteEndpointFactory_ResolveEndpoint_Call struct {
687	*mock.Call
688}
689
690// ResolveEndpoint is a helper method to define mock.On call
691//   - ctx context.Context
692//   - endpoint string
693func (_e *MockRemoteEndpointFactory_Expecter) ResolveEndpoint(ctx any, endpoint any) *MockRemoteEndpointFactory_ResolveEndpoint_Call {
694	return &MockRemoteEndpointFactory_ResolveEndpoint_Call{Call: _e.mock.On("ResolveEndpoint", ctx, endpoint)}
695}
696
697func (_c *MockRemoteEndpointFactory_ResolveEndpoint_Call) Run(run func(ctx context.Context, endpoint string)) *MockRemoteEndpointFactory_ResolveEndpoint_Call {
698	_c.Call.Run(func(args mock.Arguments) {
699		var arg0 context.Context
700		if args[0] != nil {
701			arg0 = args[0].(context.Context)
702		}
703		var arg1 string
704		if args[1] != nil {
705			arg1 = args[1].(string)
706		}
707		run(
708			arg0,
709			arg1,
710		)
711	})
712	return _c
713}
714
715func (_c *MockRemoteEndpointFactory_ResolveEndpoint_Call) Return(remoteEndpointBinding ports.RemoteEndpointBinding, err error) *MockRemoteEndpointFactory_ResolveEndpoint_Call {
716	_c.Call.Return(remoteEndpointBinding, err)
717	return _c
718}
719
720func (_c *MockRemoteEndpointFactory_ResolveEndpoint_Call) RunAndReturn(run func(ctx context.Context, endpoint string) (ports.RemoteEndpointBinding, error)) *MockRemoteEndpointFactory_ResolveEndpoint_Call {
721	_c.Call.Return(run)
722	return _c
723}
724
725// NewMockClientHostRegistry creates a new instance of MockClientHostRegistry. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
726// The first argument is typically a *testing.T value.
727func NewMockClientHostRegistry(t interface {
728	mock.TestingT
729	Cleanup(func())
730}) *MockClientHostRegistry {
731	if helper, ok := t.(interface{ Helper() }); ok {
732		helper.Helper()
733	}
734
735	mock := &MockClientHostRegistry{}
736	mock.Mock.Test(t)
737
738	t.Cleanup(func() {
739		if helper, ok := t.(interface{ Helper() }); ok {
740			helper.Helper()
741		}
742		mock.AssertExpectations(t)
743	})
744
745	return mock
746}
747
748// MockClientHostRegistry is an autogenerated mock type for the ClientHostRegistry type
749type MockClientHostRegistry struct {
750	mock.Mock
751}
752
753type MockClientHostRegistry_Expecter struct {
754	mock *mock.Mock
755}
756
757func (_m *MockClientHostRegistry) EXPECT() *MockClientHostRegistry_Expecter {
758	return &MockClientHostRegistry_Expecter{mock: &_m.Mock}
759}
760
761// ResolveEndpoint provides a mock function for the type MockClientHostRegistry
762func (_mock *MockClientHostRegistry) ResolveEndpoint(ctx context.Context, endpoint string) (ports.RemoteEndpointBinding, error) {
763	ret := _mock.Called(ctx, endpoint)
764
765	if len(ret) == 0 {
766		panic("no return value specified for ResolveEndpoint")
767	}
768
769	var r0 ports.RemoteEndpointBinding
770	var r1 error
771	if returnFunc, ok := ret.Get(0).(func(context.Context, string) (ports.RemoteEndpointBinding, error)); ok {
772		return returnFunc(ctx, endpoint)
773	}
774	if returnFunc, ok := ret.Get(0).(func(context.Context, string) ports.RemoteEndpointBinding); ok {
775		r0 = returnFunc(ctx, endpoint)
776	} else {
777		r0 = ret.Get(0).(ports.RemoteEndpointBinding)
778	}
779	if returnFunc, ok := ret.Get(1).(func(context.Context, string) error); ok {
780		r1 = returnFunc(ctx, endpoint)
781	} else {
782		r1 = ret.Error(1)
783	}
784	return r0, r1
785}
786
787// MockClientHostRegistry_ResolveEndpoint_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResolveEndpoint'
788type MockClientHostRegistry_ResolveEndpoint_Call struct {
789	*mock.Call
790}
791
792// ResolveEndpoint is a helper method to define mock.On call
793//   - ctx context.Context
794//   - endpoint string
795func (_e *MockClientHostRegistry_Expecter) ResolveEndpoint(ctx any, endpoint any) *MockClientHostRegistry_ResolveEndpoint_Call {
796	return &MockClientHostRegistry_ResolveEndpoint_Call{Call: _e.mock.On("ResolveEndpoint", ctx, endpoint)}
797}
798
799func (_c *MockClientHostRegistry_ResolveEndpoint_Call) Run(run func(ctx context.Context, endpoint string)) *MockClientHostRegistry_ResolveEndpoint_Call {
800	_c.Call.Run(func(args mock.Arguments) {
801		var arg0 context.Context
802		if args[0] != nil {
803			arg0 = args[0].(context.Context)
804		}
805		var arg1 string
806		if args[1] != nil {
807			arg1 = args[1].(string)
808		}
809		run(
810			arg0,
811			arg1,
812		)
813	})
814	return _c
815}
816
817func (_c *MockClientHostRegistry_ResolveEndpoint_Call) Return(remoteEndpointBinding ports.RemoteEndpointBinding, err error) *MockClientHostRegistry_ResolveEndpoint_Call {
818	_c.Call.Return(remoteEndpointBinding, err)
819	return _c
820}
821
822func (_c *MockClientHostRegistry_ResolveEndpoint_Call) RunAndReturn(run func(ctx context.Context, endpoint string) (ports.RemoteEndpointBinding, error)) *MockClientHostRegistry_ResolveEndpoint_Call {
823	_c.Call.Return(run)
824	return _c
825}

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 12

Tags 11

↑↓ moveenter openesc close