// Code generated by mockery; DO NOT EDIT. // github.com/vektra/mockery // template: testify package mocks import ( "context" mock "github.com/stretchr/testify/mock" ) // NewOIDCService creates a new instance of OIDCService. 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 NewOIDCService(t interface { mock.TestingT Cleanup(func()) }) *OIDCService { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock := &OIDCService{} mock.Mock.Test(t) t.Cleanup(func() { if helper, ok := t.(interface{ Helper() }); ok { helper.Helper() } mock.AssertExpectations(t) }) return mock } // OIDCService is an autogenerated mock type for the OIDCService type type OIDCService struct { mock.Mock } type OIDCService_Expecter struct { mock *mock.Mock } func (_m *OIDCService) EXPECT() *OIDCService_Expecter { return &OIDCService_Expecter{mock: &_m.Mock} } // IDToken provides a mock function for the type OIDCService func (_mock *OIDCService) IDToken(ctx context.Context, secret string, audience string) (string, error) { ret := _mock.Called(ctx, secret, audience) if len(ret) == 0 { panic("no return value specified for IDToken") } var r0 string var r1 error if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (string, error)); ok { return returnFunc(ctx, secret, audience) } if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) string); ok { r0 = returnFunc(ctx, secret, audience) } else { r0 = ret.Get(0).(string) } if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok { r1 = returnFunc(ctx, secret, audience) } else { r1 = ret.Error(1) } return r0, r1 } // OIDCService_IDToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IDToken' type OIDCService_IDToken_Call struct { *mock.Call } // IDToken is a helper method to define mock.On call // - ctx context.Context // - secret string // - audience string func (_e *OIDCService_Expecter) IDToken(ctx any, secret any, audience any) *OIDCService_IDToken_Call { return &OIDCService_IDToken_Call{Call: _e.mock.On("IDToken", ctx, secret, audience)} } func (_c *OIDCService_IDToken_Call) Run(run func(ctx context.Context, secret string, audience string)) *OIDCService_IDToken_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) } var arg2 string if args[2] != nil { arg2 = args[2].(string) } run( arg0, arg1, arg2, ) }) return _c } func (_c *OIDCService_IDToken_Call) Return(s string, err error) *OIDCService_IDToken_Call { _c.Call.Return(s, err) return _c } func (_c *OIDCService_IDToken_Call) RunAndReturn(run func(ctx context.Context, secret string, audience string) (string, error)) *OIDCService_IDToken_Call { _c.Call.Return(run) return _c } // OIDCDiscovery provides a mock function for the type OIDCService func (_mock *OIDCService) OIDCDiscovery() ([]byte, error) { ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for OIDCDiscovery") } var r0 []byte var r1 error if returnFunc, ok := ret.Get(0).(func() ([]byte, error)); ok { return returnFunc() } if returnFunc, ok := ret.Get(0).(func() []byte); ok { r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]byte) } } if returnFunc, ok := ret.Get(1).(func() error); ok { r1 = returnFunc() } else { r1 = ret.Error(1) } return r0, r1 } // OIDCService_OIDCDiscovery_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OIDCDiscovery' type OIDCService_OIDCDiscovery_Call struct { *mock.Call } // OIDCDiscovery is a helper method to define mock.On call func (_e *OIDCService_Expecter) OIDCDiscovery() *OIDCService_OIDCDiscovery_Call { return &OIDCService_OIDCDiscovery_Call{Call: _e.mock.On("OIDCDiscovery")} } func (_c *OIDCService_OIDCDiscovery_Call) Run(run func()) *OIDCService_OIDCDiscovery_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *OIDCService_OIDCDiscovery_Call) Return(bytes []byte, err error) *OIDCService_OIDCDiscovery_Call { _c.Call.Return(bytes, err) return _c } func (_c *OIDCService_OIDCDiscovery_Call) RunAndReturn(run func() ([]byte, error)) *OIDCService_OIDCDiscovery_Call { _c.Call.Return(run) return _c } // OIDCEnabled provides a mock function for the type OIDCService func (_mock *OIDCService) OIDCEnabled() bool { ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for OIDCEnabled") } var r0 bool if returnFunc, ok := ret.Get(0).(func() bool); ok { r0 = returnFunc() } else { r0 = ret.Get(0).(bool) } return r0 } // OIDCService_OIDCEnabled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OIDCEnabled' type OIDCService_OIDCEnabled_Call struct { *mock.Call } // OIDCEnabled is a helper method to define mock.On call func (_e *OIDCService_Expecter) OIDCEnabled() *OIDCService_OIDCEnabled_Call { return &OIDCService_OIDCEnabled_Call{Call: _e.mock.On("OIDCEnabled")} } func (_c *OIDCService_OIDCEnabled_Call) Run(run func()) *OIDCService_OIDCEnabled_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *OIDCService_OIDCEnabled_Call) Return(b bool) *OIDCService_OIDCEnabled_Call { _c.Call.Return(b) return _c } func (_c *OIDCService_OIDCEnabled_Call) RunAndReturn(run func() bool) *OIDCService_OIDCEnabled_Call { _c.Call.Return(run) return _c } // OIDCKeys provides a mock function for the type OIDCService func (_mock *OIDCService) OIDCKeys() ([]byte, error) { ret := _mock.Called() if len(ret) == 0 { panic("no return value specified for OIDCKeys") } var r0 []byte var r1 error if returnFunc, ok := ret.Get(0).(func() ([]byte, error)); ok { return returnFunc() } if returnFunc, ok := ret.Get(0).(func() []byte); ok { r0 = returnFunc() } else { if ret.Get(0) != nil { r0 = ret.Get(0).([]byte) } } if returnFunc, ok := ret.Get(1).(func() error); ok { r1 = returnFunc() } else { r1 = ret.Error(1) } return r0, r1 } // OIDCService_OIDCKeys_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OIDCKeys' type OIDCService_OIDCKeys_Call struct { *mock.Call } // OIDCKeys is a helper method to define mock.On call func (_e *OIDCService_Expecter) OIDCKeys() *OIDCService_OIDCKeys_Call { return &OIDCService_OIDCKeys_Call{Call: _e.mock.On("OIDCKeys")} } func (_c *OIDCService_OIDCKeys_Call) Run(run func()) *OIDCService_OIDCKeys_Call { _c.Call.Run(func(args mock.Arguments) { run() }) return _c } func (_c *OIDCService_OIDCKeys_Call) Return(bytes []byte, err error) *OIDCService_OIDCKeys_Call { _c.Call.Return(bytes, err) return _c } func (_c *OIDCService_OIDCKeys_Call) RunAndReturn(run func() ([]byte, error)) *OIDCService_OIDCKeys_Call { _c.Call.Return(run) return _c }