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