v2.31.1 f37fe67

mock_public_tls_service.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	"crypto/tls"
10
11	"github.com/bnema/gordon/internal/domain"
12	mock "github.com/stretchr/testify/mock"
13)
14
15// NewMockPublicTLSService creates a new instance of MockPublicTLSService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
16// The first argument is typically a *testing.T value.
17func NewMockPublicTLSService(t interface {
18	mock.TestingT
19	Cleanup(func())
20}) *MockPublicTLSService {
21	mock := &MockPublicTLSService{}
22	mock.Mock.Test(t)
23
24	t.Cleanup(func() { mock.AssertExpectations(t) })
25
26	return mock
27}
28
29// MockPublicTLSService is an autogenerated mock type for the PublicTLSService type
30type MockPublicTLSService struct {
31	mock.Mock
32}
33
34type MockPublicTLSService_Expecter struct {
35	mock *mock.Mock
36}
37
38func (_m *MockPublicTLSService) EXPECT() *MockPublicTLSService_Expecter {
39	return &MockPublicTLSService_Expecter{mock: &_m.Mock}
40}
41
42// GetCertificateForHost provides a mock function for the type MockPublicTLSService
43func (_mock *MockPublicTLSService) GetCertificateForHost(host string) (*tls.Certificate, error) {
44	ret := _mock.Called(host)
45
46	if len(ret) == 0 {
47		panic("no return value specified for GetCertificateForHost")
48	}
49
50	var r0 *tls.Certificate
51	var r1 error
52	if returnFunc, ok := ret.Get(0).(func(string) (*tls.Certificate, error)); ok {
53		return returnFunc(host)
54	}
55	if returnFunc, ok := ret.Get(0).(func(string) *tls.Certificate); ok {
56		r0 = returnFunc(host)
57	} else {
58		if ret.Get(0) != nil {
59			r0 = ret.Get(0).(*tls.Certificate)
60		}
61	}
62	if returnFunc, ok := ret.Get(1).(func(string) error); ok {
63		r1 = returnFunc(host)
64	} else {
65		r1 = ret.Error(1)
66	}
67	return r0, r1
68}
69
70// MockPublicTLSService_GetCertificateForHost_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCertificateForHost'
71type MockPublicTLSService_GetCertificateForHost_Call struct {
72	*mock.Call
73}
74
75// GetCertificateForHost is a helper method to define mock.On call
76//   - host string
77func (_e *MockPublicTLSService_Expecter) GetCertificateForHost(host any) *MockPublicTLSService_GetCertificateForHost_Call {
78	return &MockPublicTLSService_GetCertificateForHost_Call{Call: _e.mock.On("GetCertificateForHost", host)}
79}
80
81func (_c *MockPublicTLSService_GetCertificateForHost_Call) Run(run func(host string)) *MockPublicTLSService_GetCertificateForHost_Call {
82	_c.Call.Run(func(args mock.Arguments) {
83		var arg0 string
84		if args[0] != nil {
85			arg0 = args[0].(string)
86		}
87		run(
88			arg0,
89		)
90	})
91	return _c
92}
93
94func (_c *MockPublicTLSService_GetCertificateForHost_Call) Return(certificate *tls.Certificate, err error) *MockPublicTLSService_GetCertificateForHost_Call {
95	_c.Call.Return(certificate, err)
96	return _c
97}
98
99func (_c *MockPublicTLSService_GetCertificateForHost_Call) RunAndReturn(run func(host string) (*tls.Certificate, error)) *MockPublicTLSService_GetCertificateForHost_Call {
100	_c.Call.Return(run)
101	return _c
102}
103
104// GetHTTP01Challenge provides a mock function for the type MockPublicTLSService
105func (_mock *MockPublicTLSService) GetHTTP01Challenge(ctx context.Context, token string) (string, bool) {
106	ret := _mock.Called(ctx, token)
107
108	if len(ret) == 0 {
109		panic("no return value specified for GetHTTP01Challenge")
110	}
111
112	var r0 string
113	var r1 bool
114	if returnFunc, ok := ret.Get(0).(func(context.Context, string) (string, bool)); ok {
115		return returnFunc(ctx, token)
116	}
117	if returnFunc, ok := ret.Get(0).(func(context.Context, string) string); ok {
118		r0 = returnFunc(ctx, token)
119	} else {
120		r0 = ret.Get(0).(string)
121	}
122	if returnFunc, ok := ret.Get(1).(func(context.Context, string) bool); ok {
123		r1 = returnFunc(ctx, token)
124	} else {
125		r1 = ret.Get(1).(bool)
126	}
127	return r0, r1
128}
129
130// MockPublicTLSService_GetHTTP01Challenge_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetHTTP01Challenge'
131type MockPublicTLSService_GetHTTP01Challenge_Call struct {
132	*mock.Call
133}
134
135// GetHTTP01Challenge is a helper method to define mock.On call
136//   - ctx context.Context
137//   - token string
138func (_e *MockPublicTLSService_Expecter) GetHTTP01Challenge(ctx any, token any) *MockPublicTLSService_GetHTTP01Challenge_Call {
139	return &MockPublicTLSService_GetHTTP01Challenge_Call{Call: _e.mock.On("GetHTTP01Challenge", ctx, token)}
140}
141
142func (_c *MockPublicTLSService_GetHTTP01Challenge_Call) Run(run func(ctx context.Context, token string)) *MockPublicTLSService_GetHTTP01Challenge_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		var arg1 string
149		if args[1] != nil {
150			arg1 = args[1].(string)
151		}
152		run(
153			arg0,
154			arg1,
155		)
156	})
157	return _c
158}
159
160func (_c *MockPublicTLSService_GetHTTP01Challenge_Call) Return(keyAuth string, ok bool) *MockPublicTLSService_GetHTTP01Challenge_Call {
161	_c.Call.Return(keyAuth, ok)
162	return _c
163}
164
165func (_c *MockPublicTLSService_GetHTTP01Challenge_Call) RunAndReturn(run func(ctx context.Context, token string) (string, bool)) *MockPublicTLSService_GetHTTP01Challenge_Call {
166	_c.Call.Return(run)
167	return _c
168}
169
170// Reconcile provides a mock function for the type MockPublicTLSService
171func (_mock *MockPublicTLSService) Reconcile(ctx context.Context) error {
172	ret := _mock.Called(ctx)
173
174	if len(ret) == 0 {
175		panic("no return value specified for Reconcile")
176	}
177
178	var r0 error
179	if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
180		r0 = returnFunc(ctx)
181	} else {
182		r0 = ret.Error(0)
183	}
184	return r0
185}
186
187// MockPublicTLSService_Reconcile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Reconcile'
188type MockPublicTLSService_Reconcile_Call struct {
189	*mock.Call
190}
191
192// Reconcile is a helper method to define mock.On call
193//   - ctx context.Context
194func (_e *MockPublicTLSService_Expecter) Reconcile(ctx any) *MockPublicTLSService_Reconcile_Call {
195	return &MockPublicTLSService_Reconcile_Call{Call: _e.mock.On("Reconcile", ctx)}
196}
197
198func (_c *MockPublicTLSService_Reconcile_Call) Run(run func(ctx context.Context)) *MockPublicTLSService_Reconcile_Call {
199	_c.Call.Run(func(args mock.Arguments) {
200		var arg0 context.Context
201		if args[0] != nil {
202			arg0 = args[0].(context.Context)
203		}
204		run(
205			arg0,
206		)
207	})
208	return _c
209}
210
211func (_c *MockPublicTLSService_Reconcile_Call) Return(err error) *MockPublicTLSService_Reconcile_Call {
212	_c.Call.Return(err)
213	return _c
214}
215
216func (_c *MockPublicTLSService_Reconcile_Call) RunAndReturn(run func(ctx context.Context) error) *MockPublicTLSService_Reconcile_Call {
217	_c.Call.Return(run)
218	return _c
219}
220
221// SetAdditionalHosts provides a mock function for the type MockPublicTLSService
222func (_mock *MockPublicTLSService) SetAdditionalHosts(ctx context.Context, hosts []string) {
223	_mock.Called(ctx, hosts)
224	return
225}
226
227// MockPublicTLSService_SetAdditionalHosts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetAdditionalHosts'
228type MockPublicTLSService_SetAdditionalHosts_Call struct {
229	*mock.Call
230}
231
232// SetAdditionalHosts is a helper method to define mock.On call
233//   - ctx context.Context
234//   - hosts []string
235func (_e *MockPublicTLSService_Expecter) SetAdditionalHosts(ctx any, hosts any) *MockPublicTLSService_SetAdditionalHosts_Call {
236	return &MockPublicTLSService_SetAdditionalHosts_Call{Call: _e.mock.On("SetAdditionalHosts", ctx, hosts)}
237}
238
239func (_c *MockPublicTLSService_SetAdditionalHosts_Call) Run(run func(ctx context.Context, hosts []string)) *MockPublicTLSService_SetAdditionalHosts_Call {
240	_c.Call.Run(func(args mock.Arguments) {
241		var arg0 context.Context
242		if args[0] != nil {
243			arg0 = args[0].(context.Context)
244		}
245		var arg1 []string
246		if args[1] != nil {
247			arg1 = args[1].([]string)
248		}
249		run(
250			arg0,
251			arg1,
252		)
253	})
254	return _c
255}
256
257func (_c *MockPublicTLSService_SetAdditionalHosts_Call) Return() *MockPublicTLSService_SetAdditionalHosts_Call {
258	_c.Call.Return()
259	return _c
260}
261
262func (_c *MockPublicTLSService_SetAdditionalHosts_Call) RunAndReturn(run func(ctx context.Context, hosts []string)) *MockPublicTLSService_SetAdditionalHosts_Call {
263	_c.Run(run)
264	return _c
265}
266
267// Status provides a mock function for the type MockPublicTLSService
268func (_mock *MockPublicTLSService) Status(ctx context.Context) domain.PublicTLSStatus {
269	ret := _mock.Called(ctx)
270
271	if len(ret) == 0 {
272		panic("no return value specified for Status")
273	}
274
275	var r0 domain.PublicTLSStatus
276	if returnFunc, ok := ret.Get(0).(func(context.Context) domain.PublicTLSStatus); ok {
277		r0 = returnFunc(ctx)
278	} else {
279		r0 = ret.Get(0).(domain.PublicTLSStatus)
280	}
281	return r0
282}
283
284// MockPublicTLSService_Status_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Status'
285type MockPublicTLSService_Status_Call struct {
286	*mock.Call
287}
288
289// Status is a helper method to define mock.On call
290//   - ctx context.Context
291func (_e *MockPublicTLSService_Expecter) Status(ctx any) *MockPublicTLSService_Status_Call {
292	return &MockPublicTLSService_Status_Call{Call: _e.mock.On("Status", ctx)}
293}
294
295func (_c *MockPublicTLSService_Status_Call) Run(run func(ctx context.Context)) *MockPublicTLSService_Status_Call {
296	_c.Call.Run(func(args mock.Arguments) {
297		var arg0 context.Context
298		if args[0] != nil {
299			arg0 = args[0].(context.Context)
300		}
301		run(
302			arg0,
303		)
304	})
305	return _c
306}
307
308func (_c *MockPublicTLSService_Status_Call) Return(publicTLSStatus domain.PublicTLSStatus) *MockPublicTLSService_Status_Call {
309	_c.Call.Return(publicTLSStatus)
310	return _c
311}
312
313func (_c *MockPublicTLSService_Status_Call) RunAndReturn(run func(ctx context.Context) domain.PublicTLSStatus) *MockPublicTLSService_Status_Call {
314	_c.Call.Return(run)
315	return _c
316}
317
318// Stop provides a mock function for the type MockPublicTLSService
319func (_mock *MockPublicTLSService) Stop(ctx context.Context) error {
320	ret := _mock.Called(ctx)
321
322	if len(ret) == 0 {
323		panic("no return value specified for Stop")
324	}
325
326	var r0 error
327	if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
328		r0 = returnFunc(ctx)
329	} else {
330		r0 = ret.Error(0)
331	}
332	return r0
333}
334
335// MockPublicTLSService_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop'
336type MockPublicTLSService_Stop_Call struct {
337	*mock.Call
338}
339
340// Stop is a helper method to define mock.On call
341//   - ctx context.Context
342func (_e *MockPublicTLSService_Expecter) Stop(ctx any) *MockPublicTLSService_Stop_Call {
343	return &MockPublicTLSService_Stop_Call{Call: _e.mock.On("Stop", ctx)}
344}
345
346func (_c *MockPublicTLSService_Stop_Call) Run(run func(ctx context.Context)) *MockPublicTLSService_Stop_Call {
347	_c.Call.Run(func(args mock.Arguments) {
348		var arg0 context.Context
349		if args[0] != nil {
350			arg0 = args[0].(context.Context)
351		}
352		run(
353			arg0,
354		)
355	})
356	return _c
357}
358
359func (_c *MockPublicTLSService_Stop_Call) Return(err error) *MockPublicTLSService_Stop_Call {
360	_c.Call.Return(err)
361	return _c
362}
363
364func (_c *MockPublicTLSService_Stop_Call) RunAndReturn(run func(ctx context.Context) error) *MockPublicTLSService_Stop_Call {
365	_c.Call.Return(run)
366	return _c
367}

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