v0.31.0 d5e0505

CISettingsStore.go RawHistoryFolder

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

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 2

Tags 45

↑↓ moveenter openesc close