v2.31.0-dev22 8d342c4

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

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