v3.4.0 593c1c3

mock_certificate_store.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
10	"github.com/bnema/gordon/internal/boundaries/out"
11	mock "github.com/stretchr/testify/mock"
12)
13
14// NewMockCertificateStore creates a new instance of MockCertificateStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
15// The first argument is typically a *testing.T value.
16func NewMockCertificateStore(t interface {
17	mock.TestingT
18	Cleanup(func())
19}) *MockCertificateStore {
20	if helper, ok := t.(interface{ Helper() }); ok {
21		helper.Helper()
22	}
23
24	mock := &MockCertificateStore{}
25	mock.Mock.Test(t)
26
27	t.Cleanup(func() {
28		if helper, ok := t.(interface{ Helper() }); ok {
29			helper.Helper()
30		}
31		mock.AssertExpectations(t)
32	})
33
34	return mock
35}
36
37// MockCertificateStore is an autogenerated mock type for the CertificateStore type
38type MockCertificateStore struct {
39	mock.Mock
40}
41
42type MockCertificateStore_Expecter struct {
43	mock *mock.Mock
44}
45
46func (_m *MockCertificateStore) EXPECT() *MockCertificateStore_Expecter {
47	return &MockCertificateStore_Expecter{mock: &_m.Mock}
48}
49
50// LoadAccount provides a mock function for the type MockCertificateStore
51func (_mock *MockCertificateStore) LoadAccount(ctx context.Context) (*out.ACMEAccount, error) {
52	ret := _mock.Called(ctx)
53
54	if len(ret) == 0 {
55		panic("no return value specified for LoadAccount")
56	}
57
58	var r0 *out.ACMEAccount
59	var r1 error
60	if returnFunc, ok := ret.Get(0).(func(context.Context) (*out.ACMEAccount, error)); ok {
61		return returnFunc(ctx)
62	}
63	if returnFunc, ok := ret.Get(0).(func(context.Context) *out.ACMEAccount); ok {
64		r0 = returnFunc(ctx)
65	} else {
66		if ret.Get(0) != nil {
67			r0 = ret.Get(0).(*out.ACMEAccount)
68		}
69	}
70	if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
71		r1 = returnFunc(ctx)
72	} else {
73		r1 = ret.Error(1)
74	}
75	return r0, r1
76}
77
78// MockCertificateStore_LoadAccount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadAccount'
79type MockCertificateStore_LoadAccount_Call struct {
80	*mock.Call
81}
82
83// LoadAccount is a helper method to define mock.On call
84//   - ctx context.Context
85func (_e *MockCertificateStore_Expecter) LoadAccount(ctx any) *MockCertificateStore_LoadAccount_Call {
86	return &MockCertificateStore_LoadAccount_Call{Call: _e.mock.On("LoadAccount", ctx)}
87}
88
89func (_c *MockCertificateStore_LoadAccount_Call) Run(run func(ctx context.Context)) *MockCertificateStore_LoadAccount_Call {
90	_c.Call.Run(func(args mock.Arguments) {
91		var arg0 context.Context
92		if args[0] != nil {
93			arg0 = args[0].(context.Context)
94		}
95		run(
96			arg0,
97		)
98	})
99	return _c
100}
101
102func (_c *MockCertificateStore_LoadAccount_Call) Return(aCMEAccount *out.ACMEAccount, err error) *MockCertificateStore_LoadAccount_Call {
103	_c.Call.Return(aCMEAccount, err)
104	return _c
105}
106
107func (_c *MockCertificateStore_LoadAccount_Call) RunAndReturn(run func(ctx context.Context) (*out.ACMEAccount, error)) *MockCertificateStore_LoadAccount_Call {
108	_c.Call.Return(run)
109	return _c
110}
111
112// LoadAll provides a mock function for the type MockCertificateStore
113func (_mock *MockCertificateStore) LoadAll(ctx context.Context) ([]out.StoredCertificate, error) {
114	ret := _mock.Called(ctx)
115
116	if len(ret) == 0 {
117		panic("no return value specified for LoadAll")
118	}
119
120	var r0 []out.StoredCertificate
121	var r1 error
122	if returnFunc, ok := ret.Get(0).(func(context.Context) ([]out.StoredCertificate, error)); ok {
123		return returnFunc(ctx)
124	}
125	if returnFunc, ok := ret.Get(0).(func(context.Context) []out.StoredCertificate); ok {
126		r0 = returnFunc(ctx)
127	} else {
128		if ret.Get(0) != nil {
129			r0 = ret.Get(0).([]out.StoredCertificate)
130		}
131	}
132	if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
133		r1 = returnFunc(ctx)
134	} else {
135		r1 = ret.Error(1)
136	}
137	return r0, r1
138}
139
140// MockCertificateStore_LoadAll_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadAll'
141type MockCertificateStore_LoadAll_Call struct {
142	*mock.Call
143}
144
145// LoadAll is a helper method to define mock.On call
146//   - ctx context.Context
147func (_e *MockCertificateStore_Expecter) LoadAll(ctx any) *MockCertificateStore_LoadAll_Call {
148	return &MockCertificateStore_LoadAll_Call{Call: _e.mock.On("LoadAll", ctx)}
149}
150
151func (_c *MockCertificateStore_LoadAll_Call) Run(run func(ctx context.Context)) *MockCertificateStore_LoadAll_Call {
152	_c.Call.Run(func(args mock.Arguments) {
153		var arg0 context.Context
154		if args[0] != nil {
155			arg0 = args[0].(context.Context)
156		}
157		run(
158			arg0,
159		)
160	})
161	return _c
162}
163
164func (_c *MockCertificateStore_LoadAll_Call) Return(storedCertificates []out.StoredCertificate, err error) *MockCertificateStore_LoadAll_Call {
165	_c.Call.Return(storedCertificates, err)
166	return _c
167}
168
169func (_c *MockCertificateStore_LoadAll_Call) RunAndReturn(run func(ctx context.Context) ([]out.StoredCertificate, error)) *MockCertificateStore_LoadAll_Call {
170	_c.Call.Return(run)
171	return _c
172}
173
174// LoadState provides a mock function for the type MockCertificateStore
175func (_mock *MockCertificateStore) LoadState(ctx context.Context) (out.CertificateStoreState, error) {
176	ret := _mock.Called(ctx)
177
178	if len(ret) == 0 {
179		panic("no return value specified for LoadState")
180	}
181
182	var r0 out.CertificateStoreState
183	var r1 error
184	if returnFunc, ok := ret.Get(0).(func(context.Context) (out.CertificateStoreState, error)); ok {
185		return returnFunc(ctx)
186	}
187	if returnFunc, ok := ret.Get(0).(func(context.Context) out.CertificateStoreState); ok {
188		r0 = returnFunc(ctx)
189	} else {
190		r0 = ret.Get(0).(out.CertificateStoreState)
191	}
192	if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
193		r1 = returnFunc(ctx)
194	} else {
195		r1 = ret.Error(1)
196	}
197	return r0, r1
198}
199
200// MockCertificateStore_LoadState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LoadState'
201type MockCertificateStore_LoadState_Call struct {
202	*mock.Call
203}
204
205// LoadState is a helper method to define mock.On call
206//   - ctx context.Context
207func (_e *MockCertificateStore_Expecter) LoadState(ctx any) *MockCertificateStore_LoadState_Call {
208	return &MockCertificateStore_LoadState_Call{Call: _e.mock.On("LoadState", ctx)}
209}
210
211func (_c *MockCertificateStore_LoadState_Call) Run(run func(ctx context.Context)) *MockCertificateStore_LoadState_Call {
212	_c.Call.Run(func(args mock.Arguments) {
213		var arg0 context.Context
214		if args[0] != nil {
215			arg0 = args[0].(context.Context)
216		}
217		run(
218			arg0,
219		)
220	})
221	return _c
222}
223
224func (_c *MockCertificateStore_LoadState_Call) Return(certificateStoreState out.CertificateStoreState, err error) *MockCertificateStore_LoadState_Call {
225	_c.Call.Return(certificateStoreState, err)
226	return _c
227}
228
229func (_c *MockCertificateStore_LoadState_Call) RunAndReturn(run func(ctx context.Context) (out.CertificateStoreState, error)) *MockCertificateStore_LoadState_Call {
230	_c.Call.Return(run)
231	return _c
232}
233
234// Lock provides a mock function for the type MockCertificateStore
235func (_mock *MockCertificateStore) Lock(ctx context.Context) (func() error, error) {
236	ret := _mock.Called(ctx)
237
238	if len(ret) == 0 {
239		panic("no return value specified for Lock")
240	}
241
242	var r0 func() error
243	var r1 error
244	if returnFunc, ok := ret.Get(0).(func(context.Context) (func() error, error)); ok {
245		return returnFunc(ctx)
246	}
247	if returnFunc, ok := ret.Get(0).(func(context.Context) func() error); ok {
248		r0 = returnFunc(ctx)
249	} else {
250		if ret.Get(0) != nil {
251			r0 = ret.Get(0).(func() error)
252		}
253	}
254	if returnFunc, ok := ret.Get(1).(func(context.Context) error); ok {
255		r1 = returnFunc(ctx)
256	} else {
257		r1 = ret.Error(1)
258	}
259	return r0, r1
260}
261
262// MockCertificateStore_Lock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Lock'
263type MockCertificateStore_Lock_Call struct {
264	*mock.Call
265}
266
267// Lock is a helper method to define mock.On call
268//   - ctx context.Context
269func (_e *MockCertificateStore_Expecter) Lock(ctx any) *MockCertificateStore_Lock_Call {
270	return &MockCertificateStore_Lock_Call{Call: _e.mock.On("Lock", ctx)}
271}
272
273func (_c *MockCertificateStore_Lock_Call) Run(run func(ctx context.Context)) *MockCertificateStore_Lock_Call {
274	_c.Call.Run(func(args mock.Arguments) {
275		var arg0 context.Context
276		if args[0] != nil {
277			arg0 = args[0].(context.Context)
278		}
279		run(
280			arg0,
281		)
282	})
283	return _c
284}
285
286func (_c *MockCertificateStore_Lock_Call) Return(unlock func() error, err error) *MockCertificateStore_Lock_Call {
287	_c.Call.Return(unlock, err)
288	return _c
289}
290
291func (_c *MockCertificateStore_Lock_Call) RunAndReturn(run func(ctx context.Context) (func() error, error)) *MockCertificateStore_Lock_Call {
292	_c.Call.Return(run)
293	return _c
294}
295
296// Save provides a mock function for the type MockCertificateStore
297func (_mock *MockCertificateStore) Save(ctx context.Context, cert out.StoredCertificate) error {
298	ret := _mock.Called(ctx, cert)
299
300	if len(ret) == 0 {
301		panic("no return value specified for Save")
302	}
303
304	var r0 error
305	if returnFunc, ok := ret.Get(0).(func(context.Context, out.StoredCertificate) error); ok {
306		r0 = returnFunc(ctx, cert)
307	} else {
308		r0 = ret.Error(0)
309	}
310	return r0
311}
312
313// MockCertificateStore_Save_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Save'
314type MockCertificateStore_Save_Call struct {
315	*mock.Call
316}
317
318// Save is a helper method to define mock.On call
319//   - ctx context.Context
320//   - cert out.StoredCertificate
321func (_e *MockCertificateStore_Expecter) Save(ctx any, cert any) *MockCertificateStore_Save_Call {
322	return &MockCertificateStore_Save_Call{Call: _e.mock.On("Save", ctx, cert)}
323}
324
325func (_c *MockCertificateStore_Save_Call) Run(run func(ctx context.Context, cert out.StoredCertificate)) *MockCertificateStore_Save_Call {
326	_c.Call.Run(func(args mock.Arguments) {
327		var arg0 context.Context
328		if args[0] != nil {
329			arg0 = args[0].(context.Context)
330		}
331		var arg1 out.StoredCertificate
332		if args[1] != nil {
333			arg1 = args[1].(out.StoredCertificate)
334		}
335		run(
336			arg0,
337			arg1,
338		)
339	})
340	return _c
341}
342
343func (_c *MockCertificateStore_Save_Call) Return(err error) *MockCertificateStore_Save_Call {
344	_c.Call.Return(err)
345	return _c
346}
347
348func (_c *MockCertificateStore_Save_Call) RunAndReturn(run func(ctx context.Context, cert out.StoredCertificate) error) *MockCertificateStore_Save_Call {
349	_c.Call.Return(run)
350	return _c
351}
352
353// SaveAccount provides a mock function for the type MockCertificateStore
354func (_mock *MockCertificateStore) SaveAccount(ctx context.Context, account out.ACMEAccount) error {
355	ret := _mock.Called(ctx, account)
356
357	if len(ret) == 0 {
358		panic("no return value specified for SaveAccount")
359	}
360
361	var r0 error
362	if returnFunc, ok := ret.Get(0).(func(context.Context, out.ACMEAccount) error); ok {
363		r0 = returnFunc(ctx, account)
364	} else {
365		r0 = ret.Error(0)
366	}
367	return r0
368}
369
370// MockCertificateStore_SaveAccount_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveAccount'
371type MockCertificateStore_SaveAccount_Call struct {
372	*mock.Call
373}
374
375// SaveAccount is a helper method to define mock.On call
376//   - ctx context.Context
377//   - account out.ACMEAccount
378func (_e *MockCertificateStore_Expecter) SaveAccount(ctx any, account any) *MockCertificateStore_SaveAccount_Call {
379	return &MockCertificateStore_SaveAccount_Call{Call: _e.mock.On("SaveAccount", ctx, account)}
380}
381
382func (_c *MockCertificateStore_SaveAccount_Call) Run(run func(ctx context.Context, account out.ACMEAccount)) *MockCertificateStore_SaveAccount_Call {
383	_c.Call.Run(func(args mock.Arguments) {
384		var arg0 context.Context
385		if args[0] != nil {
386			arg0 = args[0].(context.Context)
387		}
388		var arg1 out.ACMEAccount
389		if args[1] != nil {
390			arg1 = args[1].(out.ACMEAccount)
391		}
392		run(
393			arg0,
394			arg1,
395		)
396	})
397	return _c
398}
399
400func (_c *MockCertificateStore_SaveAccount_Call) Return(err error) *MockCertificateStore_SaveAccount_Call {
401	_c.Call.Return(err)
402	return _c
403}
404
405func (_c *MockCertificateStore_SaveAccount_Call) RunAndReturn(run func(ctx context.Context, account out.ACMEAccount) error) *MockCertificateStore_SaveAccount_Call {
406	_c.Call.Return(run)
407	return _c
408}
409
410// SaveState provides a mock function for the type MockCertificateStore
411func (_mock *MockCertificateStore) SaveState(ctx context.Context, state out.CertificateStoreState) error {
412	ret := _mock.Called(ctx, state)
413
414	if len(ret) == 0 {
415		panic("no return value specified for SaveState")
416	}
417
418	var r0 error
419	if returnFunc, ok := ret.Get(0).(func(context.Context, out.CertificateStoreState) error); ok {
420		r0 = returnFunc(ctx, state)
421	} else {
422		r0 = ret.Error(0)
423	}
424	return r0
425}
426
427// MockCertificateStore_SaveState_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SaveState'
428type MockCertificateStore_SaveState_Call struct {
429	*mock.Call
430}
431
432// SaveState is a helper method to define mock.On call
433//   - ctx context.Context
434//   - state out.CertificateStoreState
435func (_e *MockCertificateStore_Expecter) SaveState(ctx any, state any) *MockCertificateStore_SaveState_Call {
436	return &MockCertificateStore_SaveState_Call{Call: _e.mock.On("SaveState", ctx, state)}
437}
438
439func (_c *MockCertificateStore_SaveState_Call) Run(run func(ctx context.Context, state out.CertificateStoreState)) *MockCertificateStore_SaveState_Call {
440	_c.Call.Run(func(args mock.Arguments) {
441		var arg0 context.Context
442		if args[0] != nil {
443			arg0 = args[0].(context.Context)
444		}
445		var arg1 out.CertificateStoreState
446		if args[1] != nil {
447			arg1 = args[1].(out.CertificateStoreState)
448		}
449		run(
450			arg0,
451			arg1,
452		)
453	})
454	return _c
455}
456
457func (_c *MockCertificateStore_SaveState_Call) Return(err error) *MockCertificateStore_SaveState_Call {
458	_c.Call.Return(err)
459	return _c
460}
461
462func (_c *MockCertificateStore_SaveState_Call) RunAndReturn(run func(ctx context.Context, state out.CertificateStoreState) error) *MockCertificateStore_SaveState_Call {
463	_c.Call.Return(run)
464	return _c
465}

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 7

Tags 106

↑↓ moveenter openesc close