// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" "crypto/tls" "github.com/bnema/gordon/internal/domain" mock "github.com/stretchr/testify/mock" ) // 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. // The first argument is typically a *testing.T value. func NewMockPublicTLSService(t interface { mock.TestingT Cleanup(func()) }) *MockPublicTLSService { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &MockPublicTLSService{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // MockPublicTLSService is an autogenerated mock type for the PublicTLSService type type MockPublicTLSService struct { mock.Mock } type MockPublicTLSService_Expecter struct { mock *mock.Mock } func (_m *MockPublicTLSService) EXPECT() *MockPublicTLSService_Expecter { return &MockPublicTLSService_Expecter{mock: &_m.Mock} } // GetCertificateForHost provides a mock function for the type MockPublicTLSService func (_mock *MockPublicTLSService) GetCertificateForHost(host string) (*tls.Certificate, error) { ret := _mock.Called(host) if len(ret) == 0 { panic("no return value specified for GetCertificateForHost") } var r0 *tls.Certificate var r1 error if returnFunc, ok := ret.Get(0).(func(string) (*tls.Certificate, error)); ok { return returnFunc(host) } if returnFunc, ok := ret.Get(0).(func(string) *tls.Certificate); ok { r0 = returnFunc(host) } else { if ret.Get(0) != nil { r0 = ret.Get(0).(*tls.Certificate) } } if returnFunc, ok := ret.Get(1).(func(string) error); ok { r1 = returnFunc(host) } else { r1 = ret.Error(1) } return r0, r1 } // MockPublicTLSService_GetCertificateForHost_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetCertificateForHost' type MockPublicTLSService_GetCertificateForHost_Call struct { *mock.Call } // GetCertificateForHost is a helper method to define mock.On call // - host string func (_e *MockPublicTLSService_Expecter) GetCertificateForHost(host any) *MockPublicTLSService_GetCertificateForHost_Call { return &MockPublicTLSService_GetCertificateForHost_Call{Call: _e.mock.On("GetCertificateForHost", host)} } func (_c *MockPublicTLSService_GetCertificateForHost_Call) Run(run func(host string)) *MockPublicTLSService_GetCertificateForHost_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 string if args[0] != nil { arg0 = args[0].(string) } run( arg0, ) }) return _c } func (_c *MockPublicTLSService_GetCertificateForHost_Call) Return(certificate *tls.Certificate, err error) *MockPublicTLSService_GetCertificateForHost_Call { _c.Call.Return(certificate, err) return _c } func (_c *MockPublicTLSService_GetCertificateForHost_Call) RunAndReturn(run func(host string) (*tls.Certificate, error)) *MockPublicTLSService_GetCertificateForHost_Call { _c.Call.Return(run) return _c } // GetHTTP01Challenge provides a mock function for the type MockPublicTLSService func (_mock *MockPublicTLSService) GetHTTP01Challenge(ctx context.Context, token string) (string, bool) { ret := _mock.Called(ctx, token) if len(ret) == 0 { panic("no return value specified for GetHTTP01Challenge") } var r0 string var r1 bool if returnFunc, ok := ret.Get(0).(func(context.Context, string) (string, bool)); ok { return returnFunc(ctx, token) } if returnFunc, ok := ret.Get(0).(func(context.Context, string) string); ok { r0 = returnFunc(ctx, token) } else { r0 = ret.Get(0).(string) } if returnFunc, ok := ret.Get(1).(func(context.Context, string) bool); ok { r1 = returnFunc(ctx, token) } else { r1 = ret.Get(1).(bool) } return r0, r1 } // MockPublicTLSService_GetHTTP01Challenge_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetHTTP01Challenge' type MockPublicTLSService_GetHTTP01Challenge_Call struct { *mock.Call } // GetHTTP01Challenge is a helper method to define mock.On call // - ctx context.Context // - token string func (_e *MockPublicTLSService_Expecter) GetHTTP01Challenge(ctx any, token any) *MockPublicTLSService_GetHTTP01Challenge_Call { return &MockPublicTLSService_GetHTTP01Challenge_Call{Call: _e.mock.On("GetHTTP01Challenge", ctx, token)} } func (_c *MockPublicTLSService_GetHTTP01Challenge_Call) Run(run func(ctx context.Context, token string)) *MockPublicTLSService_GetHTTP01Challenge_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 string if args[1] != nil { arg1 = args[1].(string) } run( arg0, arg1, ) }) return _c } func (_c *MockPublicTLSService_GetHTTP01Challenge_Call) Return(keyAuth string, ok bool) *MockPublicTLSService_GetHTTP01Challenge_Call { _c.Call.Return(keyAuth, ok) return _c } func (_c *MockPublicTLSService_GetHTTP01Challenge_Call) RunAndReturn(run func(ctx context.Context, token string) (string, bool)) *MockPublicTLSService_GetHTTP01Challenge_Call { _c.Call.Return(run) return _c } // Reconcile provides a mock function for the type MockPublicTLSService func (_mock *MockPublicTLSService) Reconcile(ctx context.Context) error { ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for Reconcile") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok { r0 = returnFunc(ctx) } else { r0 = ret.Error(0) } return r0 } // MockPublicTLSService_Reconcile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Reconcile' type MockPublicTLSService_Reconcile_Call struct { *mock.Call } // Reconcile is a helper method to define mock.On call // - ctx context.Context func (_e *MockPublicTLSService_Expecter) Reconcile(ctx any) *MockPublicTLSService_Reconcile_Call { return &MockPublicTLSService_Reconcile_Call{Call: _e.mock.On("Reconcile", ctx)} } func (_c *MockPublicTLSService_Reconcile_Call) Run(run func(ctx context.Context)) *MockPublicTLSService_Reconcile_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } run( arg0, ) }) return _c } func (_c *MockPublicTLSService_Reconcile_Call) Return(err error) *MockPublicTLSService_Reconcile_Call { _c.Call.Return(err) return _c } func (_c *MockPublicTLSService_Reconcile_Call) RunAndReturn(run func(ctx context.Context) error) *MockPublicTLSService_Reconcile_Call { _c.Call.Return(run) return _c } // SetAdditionalHosts provides a mock function for the type MockPublicTLSService func (_mock *MockPublicTLSService) SetAdditionalHosts(ctx context.Context, hosts []string) { _mock.Called(ctx, hosts) return } // MockPublicTLSService_SetAdditionalHosts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetAdditionalHosts' type MockPublicTLSService_SetAdditionalHosts_Call struct { *mock.Call } // SetAdditionalHosts is a helper method to define mock.On call // - ctx context.Context // - hosts []string func (_e *MockPublicTLSService_Expecter) SetAdditionalHosts(ctx any, hosts any) *MockPublicTLSService_SetAdditionalHosts_Call { return &MockPublicTLSService_SetAdditionalHosts_Call{Call: _e.mock.On("SetAdditionalHosts", ctx, hosts)} } func (_c *MockPublicTLSService_SetAdditionalHosts_Call) Run(run func(ctx context.Context, hosts []string)) *MockPublicTLSService_SetAdditionalHosts_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } var arg1 []string if args[1] != nil { arg1 = args[1].([]string) } run( arg0, arg1, ) }) return _c } func (_c *MockPublicTLSService_SetAdditionalHosts_Call) Return() *MockPublicTLSService_SetAdditionalHosts_Call { _c.Call.Return() return _c } func (_c *MockPublicTLSService_SetAdditionalHosts_Call) RunAndReturn(run func(ctx context.Context, hosts []string)) *MockPublicTLSService_SetAdditionalHosts_Call { _c.Run(run) return _c } // Status provides a mock function for the type MockPublicTLSService func (_mock *MockPublicTLSService) Status(ctx context.Context) domain.PublicTLSStatus { ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for Status") } var r0 domain.PublicTLSStatus if returnFunc, ok := ret.Get(0).(func(context.Context) domain.PublicTLSStatus); ok { r0 = returnFunc(ctx) } else { r0 = ret.Get(0).(domain.PublicTLSStatus) } return r0 } // MockPublicTLSService_Status_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Status' type MockPublicTLSService_Status_Call struct { *mock.Call } // Status is a helper method to define mock.On call // - ctx context.Context func (_e *MockPublicTLSService_Expecter) Status(ctx any) *MockPublicTLSService_Status_Call { return &MockPublicTLSService_Status_Call{Call: _e.mock.On("Status", ctx)} } func (_c *MockPublicTLSService_Status_Call) Run(run func(ctx context.Context)) *MockPublicTLSService_Status_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } run( arg0, ) }) return _c } func (_c *MockPublicTLSService_Status_Call) Return(publicTLSStatus domain.PublicTLSStatus) *MockPublicTLSService_Status_Call { _c.Call.Return(publicTLSStatus) return _c } func (_c *MockPublicTLSService_Status_Call) RunAndReturn(run func(ctx context.Context) domain.PublicTLSStatus) *MockPublicTLSService_Status_Call { _c.Call.Return(run) return _c } // Stop provides a mock function for the type MockPublicTLSService func (_mock *MockPublicTLSService) Stop(ctx context.Context) error { ret := _mock.Called(ctx) if len(ret) == 0 { panic("no return value specified for Stop") } var r0 error if returnFunc, ok := ret.Get(0).(func(context.Context) error); ok { r0 = returnFunc(ctx) } else { r0 = ret.Error(0) } return r0 } // MockPublicTLSService_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop' type MockPublicTLSService_Stop_Call struct { *mock.Call } // Stop is a helper method to define mock.On call // - ctx context.Context func (_e *MockPublicTLSService_Expecter) Stop(ctx any) *MockPublicTLSService_Stop_Call { return &MockPublicTLSService_Stop_Call{Call: _e.mock.On("Stop", ctx)} } func (_c *MockPublicTLSService_Stop_Call) Run(run func(ctx context.Context)) *MockPublicTLSService_Stop_Call { _c.Call.Run(func(args mock.Arguments) { var arg0 context.Context if args[0] != nil { arg0 = args[0].(context.Context) } run( arg0, ) }) return _c } func (_c *MockPublicTLSService_Stop_Call) Return(err error) *MockPublicTLSService_Stop_Call { _c.Call.Return(err) return _c } func (_c *MockPublicTLSService_Stop_Call) RunAndReturn(run func(ctx context.Context) error) *MockPublicTLSService_Stop_Call { _c.Call.Return(run) return _c }