This repository has been archived by the owner on Dec 20, 2023. It is now read-only.
/
identity_context.go
316 lines (246 loc) · 7.75 KB
/
identity_context.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
// Code generated by mockery v1.0.1. DO NOT EDIT.
package mocks
import (
context "context"
mock "github.com/stretchr/testify/mock"
service "github.com/flyteorg/flyteidl/gen/pb-go/flyteidl/service"
sets "k8s.io/apimachinery/pkg/util/sets"
time "time"
)
// IdentityContext is an autogenerated mock type for the IdentityContext type
type IdentityContext struct {
mock.Mock
}
type IdentityContext_AppID struct {
*mock.Call
}
func (_m IdentityContext_AppID) Return(_a0 string) *IdentityContext_AppID {
return &IdentityContext_AppID{Call: _m.Call.Return(_a0)}
}
func (_m *IdentityContext) OnAppID() *IdentityContext_AppID {
c_call := _m.On("AppID")
return &IdentityContext_AppID{Call: c_call}
}
func (_m *IdentityContext) OnAppIDMatch(matchers ...interface{}) *IdentityContext_AppID {
c_call := _m.On("AppID", matchers...)
return &IdentityContext_AppID{Call: c_call}
}
// AppID provides a mock function with given fields:
func (_m *IdentityContext) AppID() string {
ret := _m.Called()
var r0 string
if rf, ok := ret.Get(0).(func() string); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(string)
}
return r0
}
type IdentityContext_Audience struct {
*mock.Call
}
func (_m IdentityContext_Audience) Return(_a0 string) *IdentityContext_Audience {
return &IdentityContext_Audience{Call: _m.Call.Return(_a0)}
}
func (_m *IdentityContext) OnAudience() *IdentityContext_Audience {
c_call := _m.On("Audience")
return &IdentityContext_Audience{Call: c_call}
}
func (_m *IdentityContext) OnAudienceMatch(matchers ...interface{}) *IdentityContext_Audience {
c_call := _m.On("Audience", matchers...)
return &IdentityContext_Audience{Call: c_call}
}
// Audience provides a mock function with given fields:
func (_m *IdentityContext) Audience() string {
ret := _m.Called()
var r0 string
if rf, ok := ret.Get(0).(func() string); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(string)
}
return r0
}
type IdentityContext_AuthenticatedAt struct {
*mock.Call
}
func (_m IdentityContext_AuthenticatedAt) Return(_a0 time.Time) *IdentityContext_AuthenticatedAt {
return &IdentityContext_AuthenticatedAt{Call: _m.Call.Return(_a0)}
}
func (_m *IdentityContext) OnAuthenticatedAt() *IdentityContext_AuthenticatedAt {
c_call := _m.On("AuthenticatedAt")
return &IdentityContext_AuthenticatedAt{Call: c_call}
}
func (_m *IdentityContext) OnAuthenticatedAtMatch(matchers ...interface{}) *IdentityContext_AuthenticatedAt {
c_call := _m.On("AuthenticatedAt", matchers...)
return &IdentityContext_AuthenticatedAt{Call: c_call}
}
// AuthenticatedAt provides a mock function with given fields:
func (_m *IdentityContext) AuthenticatedAt() time.Time {
ret := _m.Called()
var r0 time.Time
if rf, ok := ret.Get(0).(func() time.Time); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(time.Time)
}
return r0
}
type IdentityContext_Claims struct {
*mock.Call
}
func (_m IdentityContext_Claims) Return(_a0 map[string]interface{}) *IdentityContext_Claims {
return &IdentityContext_Claims{Call: _m.Call.Return(_a0)}
}
func (_m *IdentityContext) OnClaims() *IdentityContext_Claims {
c_call := _m.On("Claims")
return &IdentityContext_Claims{Call: c_call}
}
func (_m *IdentityContext) OnClaimsMatch(matchers ...interface{}) *IdentityContext_Claims {
c_call := _m.On("Claims", matchers...)
return &IdentityContext_Claims{Call: c_call}
}
// Claims provides a mock function with given fields:
func (_m *IdentityContext) Claims() map[string]interface{} {
ret := _m.Called()
var r0 map[string]interface{}
if rf, ok := ret.Get(0).(func() map[string]interface{}); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(map[string]interface{})
}
}
return r0
}
type IdentityContext_IsEmpty struct {
*mock.Call
}
func (_m IdentityContext_IsEmpty) Return(_a0 bool) *IdentityContext_IsEmpty {
return &IdentityContext_IsEmpty{Call: _m.Call.Return(_a0)}
}
func (_m *IdentityContext) OnIsEmpty() *IdentityContext_IsEmpty {
c_call := _m.On("IsEmpty")
return &IdentityContext_IsEmpty{Call: c_call}
}
func (_m *IdentityContext) OnIsEmptyMatch(matchers ...interface{}) *IdentityContext_IsEmpty {
c_call := _m.On("IsEmpty", matchers...)
return &IdentityContext_IsEmpty{Call: c_call}
}
// IsEmpty provides a mock function with given fields:
func (_m *IdentityContext) IsEmpty() bool {
ret := _m.Called()
var r0 bool
if rf, ok := ret.Get(0).(func() bool); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(bool)
}
return r0
}
type IdentityContext_Scopes struct {
*mock.Call
}
func (_m IdentityContext_Scopes) Return(_a0 sets.String) *IdentityContext_Scopes {
return &IdentityContext_Scopes{Call: _m.Call.Return(_a0)}
}
func (_m *IdentityContext) OnScopes() *IdentityContext_Scopes {
c_call := _m.On("Scopes")
return &IdentityContext_Scopes{Call: c_call}
}
func (_m *IdentityContext) OnScopesMatch(matchers ...interface{}) *IdentityContext_Scopes {
c_call := _m.On("Scopes", matchers...)
return &IdentityContext_Scopes{Call: c_call}
}
// Scopes provides a mock function with given fields:
func (_m *IdentityContext) Scopes() sets.String {
ret := _m.Called()
var r0 sets.String
if rf, ok := ret.Get(0).(func() sets.String); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(sets.String)
}
}
return r0
}
type IdentityContext_UserID struct {
*mock.Call
}
func (_m IdentityContext_UserID) Return(_a0 string) *IdentityContext_UserID {
return &IdentityContext_UserID{Call: _m.Call.Return(_a0)}
}
func (_m *IdentityContext) OnUserID() *IdentityContext_UserID {
c_call := _m.On("UserID")
return &IdentityContext_UserID{Call: c_call}
}
func (_m *IdentityContext) OnUserIDMatch(matchers ...interface{}) *IdentityContext_UserID {
c_call := _m.On("UserID", matchers...)
return &IdentityContext_UserID{Call: c_call}
}
// UserID provides a mock function with given fields:
func (_m *IdentityContext) UserID() string {
ret := _m.Called()
var r0 string
if rf, ok := ret.Get(0).(func() string); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(string)
}
return r0
}
type IdentityContext_UserInfo struct {
*mock.Call
}
func (_m IdentityContext_UserInfo) Return(_a0 *service.UserInfoResponse) *IdentityContext_UserInfo {
return &IdentityContext_UserInfo{Call: _m.Call.Return(_a0)}
}
func (_m *IdentityContext) OnUserInfo() *IdentityContext_UserInfo {
c_call := _m.On("UserInfo")
return &IdentityContext_UserInfo{Call: c_call}
}
func (_m *IdentityContext) OnUserInfoMatch(matchers ...interface{}) *IdentityContext_UserInfo {
c_call := _m.On("UserInfo", matchers...)
return &IdentityContext_UserInfo{Call: c_call}
}
// UserInfo provides a mock function with given fields:
func (_m *IdentityContext) UserInfo() *service.UserInfoResponse {
ret := _m.Called()
var r0 *service.UserInfoResponse
if rf, ok := ret.Get(0).(func() *service.UserInfoResponse); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*service.UserInfoResponse)
}
}
return r0
}
type IdentityContext_WithContext struct {
*mock.Call
}
func (_m IdentityContext_WithContext) Return(_a0 context.Context) *IdentityContext_WithContext {
return &IdentityContext_WithContext{Call: _m.Call.Return(_a0)}
}
func (_m *IdentityContext) OnWithContext(ctx context.Context) *IdentityContext_WithContext {
c_call := _m.On("WithContext", ctx)
return &IdentityContext_WithContext{Call: c_call}
}
func (_m *IdentityContext) OnWithContextMatch(matchers ...interface{}) *IdentityContext_WithContext {
c_call := _m.On("WithContext", matchers...)
return &IdentityContext_WithContext{Call: c_call}
}
// WithContext provides a mock function with given fields: ctx
func (_m *IdentityContext) WithContext(ctx context.Context) context.Context {
ret := _m.Called(ctx)
var r0 context.Context
if rf, ok := ret.Get(0).(func(context.Context) context.Context); ok {
r0 = rf(ctx)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(context.Context)
}
}
return r0
}