v2.31.0-dev21 b59533b

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// Status provides a mock function for the type MockPublicTLSService
222func (_mock *MockPublicTLSService) Status(ctx context.Context) domain.PublicTLSStatus {
223	ret := _mock.Called(ctx)
224
225	if len(ret) == 0 {
226		panic("no return value specified for Status")
227	}
228
229	var r0 domain.PublicTLSStatus
230	if returnFunc, ok := ret.Get(0).(func(context.Context) domain.PublicTLSStatus); ok {
231		r0 = returnFunc(ctx)
232	} else {
233		r0 = ret.Get(0).(domain.PublicTLSStatus)
234	}
235	return r0
236}
237
238// MockPublicTLSService_Status_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Status'
239type MockPublicTLSService_Status_Call struct {
240	*mock.Call
241}
242
243// Status is a helper method to define mock.On call
244//   - ctx context.Context
245func (_e *MockPublicTLSService_Expecter) Status(ctx any) *MockPublicTLSService_Status_Call {
246	return &MockPublicTLSService_Status_Call{Call: _e.mock.On("Status", ctx)}
247}
248
249func (_c *MockPublicTLSService_Status_Call) Run(run func(ctx context.Context)) *MockPublicTLSService_Status_Call {
250	_c.Call.Run(func(args mock.Arguments) {
251		var arg0 context.Context
252		if args[0] != nil {
253			arg0 = args[0].(context.Context)
254		}
255		run(
256			arg0,
257		)
258	})
259	return _c
260}
261
262func (_c *MockPublicTLSService_Status_Call) Return(publicTLSStatus domain.PublicTLSStatus) *MockPublicTLSService_Status_Call {
263	_c.Call.Return(publicTLSStatus)
264	return _c
265}
266
267func (_c *MockPublicTLSService_Status_Call) RunAndReturn(run func(ctx context.Context) domain.PublicTLSStatus) *MockPublicTLSService_Status_Call {
268	_c.Call.Return(run)
269	return _c
270}
271
272// Stop provides a mock function for the type MockPublicTLSService
273func (_mock *MockPublicTLSService) Stop(ctx context.Context) error {
274	ret := _mock.Called(ctx)
275
276	if len(ret) == 0 {
277		panic("no return value specified for Stop")
278	}
279
280	var r0 error
281	if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok {
282		r0 = returnFunc(ctx)
283	} else {
284		r0 = ret.Error(0)
285	}
286	return r0
287}
288
289// MockPublicTLSService_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop'
290type MockPublicTLSService_Stop_Call struct {
291	*mock.Call
292}
293
294// Stop is a helper method to define mock.On call
295//   - ctx context.Context
296func (_e *MockPublicTLSService_Expecter) Stop(ctx any) *MockPublicTLSService_Stop_Call {
297	return &MockPublicTLSService_Stop_Call{Call: _e.mock.On("Stop", ctx)}
298}
299
300func (_c *MockPublicTLSService_Stop_Call) Run(run func(ctx context.Context)) *MockPublicTLSService_Stop_Call {
301	_c.Call.Run(func(args mock.Arguments) {
302		var arg0 context.Context
303		if args[0] != nil {
304			arg0 = args[0].(context.Context)
305		}
306		run(
307			arg0,
308		)
309	})
310	return _c
311}
312
313func (_c *MockPublicTLSService_Stop_Call) Return(err error) *MockPublicTLSService_Stop_Call {
314	_c.Call.Return(err)
315	return _c
316}
317
318func (_c *MockPublicTLSService_Stop_Call) RunAndReturn(run func(ctx context.Context) error) *MockPublicTLSService_Stop_Call {
319	_c.Call.Return(run)
320	return _c
321}

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