1// Code generated by mockery; DO NOT EDIT.
2// github.com/vektra/mockery
3// template: testify
4
5package mocks
6
7import (
8 "context"
9
10 mock "github.com/stretchr/testify/mock"
11)
12
13// 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.
14// The first argument is typically a *testing.T value.
15func NewOIDCService(t interface {
16 mock.TestingT
17 Cleanup(func())
18}) *OIDCService {
19 if helper, ok := t.(interface{ Helper() }); ok {
20 helper.Helper()
21 }
22
23 mock := &OIDCService{}
24 mock.Mock.Test(t)
25
26 t.Cleanup(func() {
27 if helper, ok := t.(interface{ Helper() }); ok {
28 helper.Helper()
29 }
30 mock.AssertExpectations(t)
31 })
32
33 return mock
34}
35
36// OIDCService is an autogenerated mock type for the OIDCService type
37type OIDCService struct {
38 mock.Mock
39}
40
41type OIDCService_Expecter struct {
42 mock *mock.Mock
43}
44
45func (_m *OIDCService) EXPECT() *OIDCService_Expecter {
46 return &OIDCService_Expecter{mock: &_m.Mock}
47}
48
49// IDToken provides a mock function for the type OIDCService
50func (_mock *OIDCService) IDToken(ctx context.Context, secret string, audience string) (string, error) {
51 ret := _mock.Called(ctx, secret, audience)
52
53 if len(ret) == 0 {
54 panic("no return value specified for IDToken")
55 }
56
57 var r0 string
58 var r1 error
59 if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) (string, error)); ok {
60 return returnFunc(ctx, secret, audience)
61 }
62 if returnFunc, ok := ret.Get(0).(func(context.Context, string, string) string); ok {
63 r0 = returnFunc(ctx, secret, audience)
64 } else {
65 r0 = ret.Get(0).(string)
66 }
67 if returnFunc, ok := ret.Get(1).(func(context.Context, string, string) error); ok {
68 r1 = returnFunc(ctx, secret, audience)
69 } else {
70 r1 = ret.Error(1)
71 }
72 return r0, r1
73}
74
75// OIDCService_IDToken_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IDToken'
76type OIDCService_IDToken_Call struct {
77 *mock.Call
78}
79
80// IDToken is a helper method to define mock.On call
81// - ctx context.Context
82// - secret string
83// - audience string
84func (_e *OIDCService_Expecter) IDToken(ctx any, secret any, audience any) *OIDCService_IDToken_Call {
85 return &OIDCService_IDToken_Call{Call: _e.mock.On("IDToken", ctx, secret, audience)}
86}
87
88func (_c *OIDCService_IDToken_Call) Run(run func(ctx context.Context, secret string, audience string)) *OIDCService_IDToken_Call {
89 _c.Call.Run(func(args mock.Arguments) {
90 var arg0 context.Context
91 if args[0] != nil {
92 arg0 = args[0].(context.Context)
93 }
94 var arg1 string
95 if args[1] != nil {
96 arg1 = args[1].(string)
97 }
98 var arg2 string
99 if args[2] != nil {
100 arg2 = args[2].(string)
101 }
102 run(
103 arg0,
104 arg1,
105 arg2,
106 )
107 })
108 return _c
109}
110
111func (_c *OIDCService_IDToken_Call) Return(s string, err error) *OIDCService_IDToken_Call {
112 _c.Call.Return(s, err)
113 return _c
114}
115
116func (_c *OIDCService_IDToken_Call) RunAndReturn(run func(ctx context.Context, secret string, audience string) (string, error)) *OIDCService_IDToken_Call {
117 _c.Call.Return(run)
118 return _c
119}
120
121// OIDCDiscovery provides a mock function for the type OIDCService
122func (_mock *OIDCService) OIDCDiscovery() ([]byte, error) {
123 ret := _mock.Called()
124
125 if len(ret) == 0 {
126 panic("no return value specified for OIDCDiscovery")
127 }
128
129 var r0 []byte
130 var r1 error
131 if returnFunc, ok := ret.Get(0).(func() ([]byte, error)); ok {
132 return returnFunc()
133 }
134 if returnFunc, ok := ret.Get(0).(func() []byte); ok {
135 r0 = returnFunc()
136 } else {
137 if ret.Get(0) != nil {
138 r0 = ret.Get(0).([]byte)
139 }
140 }
141 if returnFunc, ok := ret.Get(1).(func() error); ok {
142 r1 = returnFunc()
143 } else {
144 r1 = ret.Error(1)
145 }
146 return r0, r1
147}
148
149// OIDCService_OIDCDiscovery_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OIDCDiscovery'
150type OIDCService_OIDCDiscovery_Call struct {
151 *mock.Call
152}
153
154// OIDCDiscovery is a helper method to define mock.On call
155func (_e *OIDCService_Expecter) OIDCDiscovery() *OIDCService_OIDCDiscovery_Call {
156 return &OIDCService_OIDCDiscovery_Call{Call: _e.mock.On("OIDCDiscovery")}
157}
158
159func (_c *OIDCService_OIDCDiscovery_Call) Run(run func()) *OIDCService_OIDCDiscovery_Call {
160 _c.Call.Run(func(args mock.Arguments) {
161 run()
162 })
163 return _c
164}
165
166func (_c *OIDCService_OIDCDiscovery_Call) Return(bytes []byte, err error) *OIDCService_OIDCDiscovery_Call {
167 _c.Call.Return(bytes, err)
168 return _c
169}
170
171func (_c *OIDCService_OIDCDiscovery_Call) RunAndReturn(run func() ([]byte, error)) *OIDCService_OIDCDiscovery_Call {
172 _c.Call.Return(run)
173 return _c
174}
175
176// OIDCEnabled provides a mock function for the type OIDCService
177func (_mock *OIDCService) OIDCEnabled() bool {
178 ret := _mock.Called()
179
180 if len(ret) == 0 {
181 panic("no return value specified for OIDCEnabled")
182 }
183
184 var r0 bool
185 if returnFunc, ok := ret.Get(0).(func() bool); ok {
186 r0 = returnFunc()
187 } else {
188 r0 = ret.Get(0).(bool)
189 }
190 return r0
191}
192
193// OIDCService_OIDCEnabled_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OIDCEnabled'
194type OIDCService_OIDCEnabled_Call struct {
195 *mock.Call
196}
197
198// OIDCEnabled is a helper method to define mock.On call
199func (_e *OIDCService_Expecter) OIDCEnabled() *OIDCService_OIDCEnabled_Call {
200 return &OIDCService_OIDCEnabled_Call{Call: _e.mock.On("OIDCEnabled")}
201}
202
203func (_c *OIDCService_OIDCEnabled_Call) Run(run func()) *OIDCService_OIDCEnabled_Call {
204 _c.Call.Run(func(args mock.Arguments) {
205 run()
206 })
207 return _c
208}
209
210func (_c *OIDCService_OIDCEnabled_Call) Return(b bool) *OIDCService_OIDCEnabled_Call {
211 _c.Call.Return(b)
212 return _c
213}
214
215func (_c *OIDCService_OIDCEnabled_Call) RunAndReturn(run func() bool) *OIDCService_OIDCEnabled_Call {
216 _c.Call.Return(run)
217 return _c
218}
219
220// OIDCKeys provides a mock function for the type OIDCService
221func (_mock *OIDCService) OIDCKeys() ([]byte, error) {
222 ret := _mock.Called()
223
224 if len(ret) == 0 {
225 panic("no return value specified for OIDCKeys")
226 }
227
228 var r0 []byte
229 var r1 error
230 if returnFunc, ok := ret.Get(0).(func() ([]byte, error)); ok {
231 return returnFunc()
232 }
233 if returnFunc, ok := ret.Get(0).(func() []byte); ok {
234 r0 = returnFunc()
235 } else {
236 if ret.Get(0) != nil {
237 r0 = ret.Get(0).([]byte)
238 }
239 }
240 if returnFunc, ok := ret.Get(1).(func() error); ok {
241 r1 = returnFunc()
242 } else {
243 r1 = ret.Error(1)
244 }
245 return r0, r1
246}
247
248// OIDCService_OIDCKeys_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OIDCKeys'
249type OIDCService_OIDCKeys_Call struct {
250 *mock.Call
251}
252
253// OIDCKeys is a helper method to define mock.On call
254func (_e *OIDCService_Expecter) OIDCKeys() *OIDCService_OIDCKeys_Call {
255 return &OIDCService_OIDCKeys_Call{Call: _e.mock.On("OIDCKeys")}
256}
257
258func (_c *OIDCService_OIDCKeys_Call) Run(run func()) *OIDCService_OIDCKeys_Call {
259 _c.Call.Run(func(args mock.Arguments) {
260 run()
261 })
262 return _c
263}
264
265func (_c *OIDCService_OIDCKeys_Call) Return(bytes []byte, err error) *OIDCService_OIDCKeys_Call {
266 _c.Call.Return(bytes, err)
267 return _c
268}
269
270func (_c *OIDCService_OIDCKeys_Call) RunAndReturn(run func() ([]byte, error)) *OIDCService_OIDCKeys_Call {
271 _c.Call.Return(run)
272 return _c
273}