-
Notifications
You must be signed in to change notification settings - Fork 335
/
rbac.gen.go
347 lines (289 loc) · 8.87 KB
/
rbac.gen.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
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
package types
// This file is auto-generated.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
import (
"fmt"
"strconv"
)
type (
// Component struct serves as a virtual resource type for the system component
//
// This struct is auto-generated
Component struct{}
)
var (
_ = fmt.Printf
_ = strconv.FormatUint
)
// RbacResource returns string representation of RBAC resource for Application by calling ApplicationRbacResource fn
//
// RBAC resource is in the corteza::system:application/... format
//
// This function is auto-generated
func (r Application) RbacResource() string {
return ApplicationRbacResource(r.ID)
}
// ApplicationRbacResource returns string representation of RBAC resource for Application
//
// RBAC resource is in the corteza::system:application/... format
//
// This function is auto-generated
func ApplicationRbacResource(id uint64) string {
cpts := []interface{}{ApplicationResourceType}
if id != 0 {
cpts = append(cpts, strconv.FormatUint(id, 10))
} else {
cpts = append(cpts, "*")
}
return fmt.Sprintf(ApplicationRbacResourceTpl(), cpts...)
}
func ApplicationRbacResourceTpl() string {
return "%s/%s"
}
// RbacResource returns string representation of RBAC resource for ApigwRoute by calling ApigwRouteRbacResource fn
//
// RBAC resource is in the corteza::system:apigw-route/... format
//
// This function is auto-generated
func (r ApigwRoute) RbacResource() string {
return ApigwRouteRbacResource(r.ID)
}
// ApigwRouteRbacResource returns string representation of RBAC resource for ApigwRoute
//
// RBAC resource is in the corteza::system:apigw-route/... format
//
// This function is auto-generated
func ApigwRouteRbacResource(id uint64) string {
cpts := []interface{}{ApigwRouteResourceType}
if id != 0 {
cpts = append(cpts, strconv.FormatUint(id, 10))
} else {
cpts = append(cpts, "*")
}
return fmt.Sprintf(ApigwRouteRbacResourceTpl(), cpts...)
}
func ApigwRouteRbacResourceTpl() string {
return "%s/%s"
}
// RbacResource returns string representation of RBAC resource for AuthClient by calling AuthClientRbacResource fn
//
// RBAC resource is in the corteza::system:auth-client/... format
//
// This function is auto-generated
func (r AuthClient) RbacResource() string {
return AuthClientRbacResource(r.ID)
}
// AuthClientRbacResource returns string representation of RBAC resource for AuthClient
//
// RBAC resource is in the corteza::system:auth-client/... format
//
// This function is auto-generated
func AuthClientRbacResource(id uint64) string {
cpts := []interface{}{AuthClientResourceType}
if id != 0 {
cpts = append(cpts, strconv.FormatUint(id, 10))
} else {
cpts = append(cpts, "*")
}
return fmt.Sprintf(AuthClientRbacResourceTpl(), cpts...)
}
func AuthClientRbacResourceTpl() string {
return "%s/%s"
}
// RbacResource returns string representation of RBAC resource for DataPrivacyRequest by calling DataPrivacyRequestRbacResource fn
//
// RBAC resource is in the corteza::system:data-privacy-request/... format
//
// This function is auto-generated
func (r DataPrivacyRequest) RbacResource() string {
return DataPrivacyRequestRbacResource(r.ID)
}
// DataPrivacyRequestRbacResource returns string representation of RBAC resource for DataPrivacyRequest
//
// RBAC resource is in the corteza::system:data-privacy-request/... format
//
// This function is auto-generated
func DataPrivacyRequestRbacResource(id uint64) string {
cpts := []interface{}{DataPrivacyRequestResourceType}
if id != 0 {
cpts = append(cpts, strconv.FormatUint(id, 10))
} else {
cpts = append(cpts, "*")
}
return fmt.Sprintf(DataPrivacyRequestRbacResourceTpl(), cpts...)
}
func DataPrivacyRequestRbacResourceTpl() string {
return "%s/%s"
}
// RbacResource returns string representation of RBAC resource for Queue by calling QueueRbacResource fn
//
// RBAC resource is in the corteza::system:queue/... format
//
// This function is auto-generated
func (r Queue) RbacResource() string {
return QueueRbacResource(r.ID)
}
// QueueRbacResource returns string representation of RBAC resource for Queue
//
// RBAC resource is in the corteza::system:queue/... format
//
// This function is auto-generated
func QueueRbacResource(id uint64) string {
cpts := []interface{}{QueueResourceType}
if id != 0 {
cpts = append(cpts, strconv.FormatUint(id, 10))
} else {
cpts = append(cpts, "*")
}
return fmt.Sprintf(QueueRbacResourceTpl(), cpts...)
}
func QueueRbacResourceTpl() string {
return "%s/%s"
}
// RbacResource returns string representation of RBAC resource for Report by calling ReportRbacResource fn
//
// RBAC resource is in the corteza::system:report/... format
//
// This function is auto-generated
func (r Report) RbacResource() string {
return ReportRbacResource(r.ID)
}
// ReportRbacResource returns string representation of RBAC resource for Report
//
// RBAC resource is in the corteza::system:report/... format
//
// This function is auto-generated
func ReportRbacResource(id uint64) string {
cpts := []interface{}{ReportResourceType}
if id != 0 {
cpts = append(cpts, strconv.FormatUint(id, 10))
} else {
cpts = append(cpts, "*")
}
return fmt.Sprintf(ReportRbacResourceTpl(), cpts...)
}
func ReportRbacResourceTpl() string {
return "%s/%s"
}
// RbacResource returns string representation of RBAC resource for Role by calling RoleRbacResource fn
//
// RBAC resource is in the corteza::system:role/... format
//
// This function is auto-generated
func (r Role) RbacResource() string {
return RoleRbacResource(r.ID)
}
// RoleRbacResource returns string representation of RBAC resource for Role
//
// RBAC resource is in the corteza::system:role/... format
//
// This function is auto-generated
func RoleRbacResource(id uint64) string {
cpts := []interface{}{RoleResourceType}
if id != 0 {
cpts = append(cpts, strconv.FormatUint(id, 10))
} else {
cpts = append(cpts, "*")
}
return fmt.Sprintf(RoleRbacResourceTpl(), cpts...)
}
func RoleRbacResourceTpl() string {
return "%s/%s"
}
// RbacResource returns string representation of RBAC resource for Template by calling TemplateRbacResource fn
//
// RBAC resource is in the corteza::system:template/... format
//
// This function is auto-generated
func (r Template) RbacResource() string {
return TemplateRbacResource(r.ID)
}
// TemplateRbacResource returns string representation of RBAC resource for Template
//
// RBAC resource is in the corteza::system:template/... format
//
// This function is auto-generated
func TemplateRbacResource(id uint64) string {
cpts := []interface{}{TemplateResourceType}
if id != 0 {
cpts = append(cpts, strconv.FormatUint(id, 10))
} else {
cpts = append(cpts, "*")
}
return fmt.Sprintf(TemplateRbacResourceTpl(), cpts...)
}
func TemplateRbacResourceTpl() string {
return "%s/%s"
}
// RbacResource returns string representation of RBAC resource for User by calling UserRbacResource fn
//
// RBAC resource is in the corteza::system:user/... format
//
// This function is auto-generated
func (r User) RbacResource() string {
return UserRbacResource(r.ID)
}
// UserRbacResource returns string representation of RBAC resource for User
//
// RBAC resource is in the corteza::system:user/... format
//
// This function is auto-generated
func UserRbacResource(id uint64) string {
cpts := []interface{}{UserResourceType}
if id != 0 {
cpts = append(cpts, strconv.FormatUint(id, 10))
} else {
cpts = append(cpts, "*")
}
return fmt.Sprintf(UserRbacResourceTpl(), cpts...)
}
func UserRbacResourceTpl() string {
return "%s/%s"
}
// RbacResource returns string representation of RBAC resource for DalConnection by calling DalConnectionRbacResource fn
//
// RBAC resource is in the corteza::system:dal-connection/... format
//
// This function is auto-generated
func (r DalConnection) RbacResource() string {
return DalConnectionRbacResource(r.ID)
}
// DalConnectionRbacResource returns string representation of RBAC resource for DalConnection
//
// RBAC resource is in the corteza::system:dal-connection/... format
//
// This function is auto-generated
func DalConnectionRbacResource(id uint64) string {
cpts := []interface{}{DalConnectionResourceType}
if id != 0 {
cpts = append(cpts, strconv.FormatUint(id, 10))
} else {
cpts = append(cpts, "*")
}
return fmt.Sprintf(DalConnectionRbacResourceTpl(), cpts...)
}
func DalConnectionRbacResourceTpl() string {
return "%s/%s"
}
// RbacResource returns string representation of RBAC resource for Component by calling ComponentRbacResource fn
//
// RBAC resource is in the corteza::system/... format
//
// This function is auto-generated
func (r Component) RbacResource() string {
return ComponentRbacResource()
}
// ComponentRbacResource returns string representation of RBAC resource for Component
//
// RBAC resource is in the corteza::system/ format
//
// This function is auto-generated
func ComponentRbacResource() string {
return ComponentResourceType + "/"
}
func ComponentRbacResourceTpl() string {
return "%s"
}