1
|
|
|
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. |
2
|
|
|
// source: base/v1/service.proto |
3
|
|
|
|
4
|
|
|
/* |
5
|
|
|
Package basev1 is a reverse proxy. |
6
|
|
|
|
7
|
|
|
It translates gRPC into RESTful JSON APIs. |
8
|
|
|
*/ |
9
|
|
|
package basev1 |
10
|
|
|
|
11
|
|
|
import ( |
12
|
|
|
"context" |
13
|
|
|
"io" |
14
|
|
|
"net/http" |
15
|
|
|
|
16
|
|
|
"github.com/grpc-ecosystem/grpc-gateway/v2/runtime" |
17
|
|
|
"github.com/grpc-ecosystem/grpc-gateway/v2/utilities" |
18
|
|
|
"google.golang.org/grpc" |
19
|
|
|
"google.golang.org/grpc/codes" |
20
|
|
|
"google.golang.org/grpc/grpclog" |
21
|
|
|
"google.golang.org/grpc/metadata" |
22
|
|
|
"google.golang.org/grpc/status" |
23
|
|
|
"google.golang.org/protobuf/proto" |
24
|
|
|
) |
25
|
|
|
|
26
|
|
|
// Suppress "imported and not used" errors |
27
|
|
|
var _ codes.Code |
28
|
|
|
var _ io.Reader |
29
|
|
|
var _ status.Status |
30
|
|
|
var _ = runtime.String |
31
|
|
|
var _ = utilities.NewDoubleArray |
32
|
|
|
var _ = metadata.Join |
33
|
|
|
|
34
|
|
|
func request_Permission_Check_0(ctx context.Context, marshaler runtime.Marshaler, client PermissionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
35
|
|
|
var protoReq PermissionCheckRequest |
36
|
|
|
var metadata runtime.ServerMetadata |
37
|
|
|
|
38
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { |
39
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
40
|
|
|
} |
41
|
|
|
|
42
|
|
|
var ( |
43
|
|
|
val string |
44
|
|
|
ok bool |
45
|
|
|
err error |
46
|
|
|
_ = err |
47
|
|
|
) |
48
|
|
|
|
49
|
|
|
val, ok = pathParams["tenant_id"] |
50
|
|
|
if !ok { |
51
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") |
52
|
|
|
} |
53
|
|
|
|
54
|
|
|
protoReq.TenantId, err = runtime.String(val) |
55
|
|
|
if err != nil { |
56
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) |
57
|
|
|
} |
58
|
|
|
|
59
|
|
|
msg, err := client.Check(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
60
|
|
|
return msg, metadata, err |
61
|
|
|
|
62
|
|
|
} |
63
|
|
|
|
64
|
|
|
func local_request_Permission_Check_0(ctx context.Context, marshaler runtime.Marshaler, server PermissionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
65
|
|
|
var protoReq PermissionCheckRequest |
66
|
|
|
var metadata runtime.ServerMetadata |
67
|
|
|
|
68
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { |
69
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
70
|
|
|
} |
71
|
|
|
|
72
|
|
|
var ( |
73
|
|
|
val string |
74
|
|
|
ok bool |
75
|
|
|
err error |
76
|
|
|
_ = err |
77
|
|
|
) |
78
|
|
|
|
79
|
|
|
val, ok = pathParams["tenant_id"] |
80
|
|
|
if !ok { |
81
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") |
82
|
|
|
} |
83
|
|
|
|
84
|
|
|
protoReq.TenantId, err = runtime.String(val) |
85
|
|
|
if err != nil { |
86
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) |
87
|
|
|
} |
88
|
|
|
|
89
|
|
|
msg, err := server.Check(ctx, &protoReq) |
90
|
|
|
return msg, metadata, err |
91
|
|
|
|
92
|
|
|
} |
93
|
|
|
|
94
|
|
|
func request_Permission_Expand_0(ctx context.Context, marshaler runtime.Marshaler, client PermissionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
95
|
|
|
var protoReq PermissionExpandRequest |
96
|
|
|
var metadata runtime.ServerMetadata |
97
|
|
|
|
98
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { |
99
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
100
|
|
|
} |
101
|
|
|
|
102
|
|
|
var ( |
103
|
|
|
val string |
104
|
|
|
ok bool |
105
|
|
|
err error |
106
|
|
|
_ = err |
107
|
|
|
) |
108
|
|
|
|
109
|
|
|
val, ok = pathParams["tenant_id"] |
110
|
|
|
if !ok { |
111
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") |
112
|
|
|
} |
113
|
|
|
|
114
|
|
|
protoReq.TenantId, err = runtime.String(val) |
115
|
|
|
if err != nil { |
116
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) |
117
|
|
|
} |
118
|
|
|
|
119
|
|
|
msg, err := client.Expand(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
120
|
|
|
return msg, metadata, err |
121
|
|
|
|
122
|
|
|
} |
123
|
|
|
|
124
|
|
|
func local_request_Permission_Expand_0(ctx context.Context, marshaler runtime.Marshaler, server PermissionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
125
|
|
|
var protoReq PermissionExpandRequest |
126
|
|
|
var metadata runtime.ServerMetadata |
127
|
|
|
|
128
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { |
129
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
130
|
|
|
} |
131
|
|
|
|
132
|
|
|
var ( |
133
|
|
|
val string |
134
|
|
|
ok bool |
135
|
|
|
err error |
136
|
|
|
_ = err |
137
|
|
|
) |
138
|
|
|
|
139
|
|
|
val, ok = pathParams["tenant_id"] |
140
|
|
|
if !ok { |
141
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") |
142
|
|
|
} |
143
|
|
|
|
144
|
|
|
protoReq.TenantId, err = runtime.String(val) |
145
|
|
|
if err != nil { |
146
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) |
147
|
|
|
} |
148
|
|
|
|
149
|
|
|
msg, err := server.Expand(ctx, &protoReq) |
150
|
|
|
return msg, metadata, err |
151
|
|
|
|
152
|
|
|
} |
153
|
|
|
|
154
|
|
|
func request_Permission_LookupEntity_0(ctx context.Context, marshaler runtime.Marshaler, client PermissionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
155
|
|
|
var protoReq PermissionLookupEntityRequest |
156
|
|
|
var metadata runtime.ServerMetadata |
157
|
|
|
|
158
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { |
159
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
160
|
|
|
} |
161
|
|
|
|
162
|
|
|
var ( |
163
|
|
|
val string |
164
|
|
|
ok bool |
165
|
|
|
err error |
166
|
|
|
_ = err |
167
|
|
|
) |
168
|
|
|
|
169
|
|
|
val, ok = pathParams["tenant_id"] |
170
|
|
|
if !ok { |
171
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") |
172
|
|
|
} |
173
|
|
|
|
174
|
|
|
protoReq.TenantId, err = runtime.String(val) |
175
|
|
|
if err != nil { |
176
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) |
177
|
|
|
} |
178
|
|
|
|
179
|
|
|
msg, err := client.LookupEntity(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
180
|
|
|
return msg, metadata, err |
181
|
|
|
|
182
|
|
|
} |
183
|
|
|
|
184
|
|
|
func local_request_Permission_LookupEntity_0(ctx context.Context, marshaler runtime.Marshaler, server PermissionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
185
|
|
|
var protoReq PermissionLookupEntityRequest |
186
|
|
|
var metadata runtime.ServerMetadata |
187
|
|
|
|
188
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { |
189
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
190
|
|
|
} |
191
|
|
|
|
192
|
|
|
var ( |
193
|
|
|
val string |
194
|
|
|
ok bool |
195
|
|
|
err error |
196
|
|
|
_ = err |
197
|
|
|
) |
198
|
|
|
|
199
|
|
|
val, ok = pathParams["tenant_id"] |
200
|
|
|
if !ok { |
201
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") |
202
|
|
|
} |
203
|
|
|
|
204
|
|
|
protoReq.TenantId, err = runtime.String(val) |
205
|
|
|
if err != nil { |
206
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) |
207
|
|
|
} |
208
|
|
|
|
209
|
|
|
msg, err := server.LookupEntity(ctx, &protoReq) |
210
|
|
|
return msg, metadata, err |
211
|
|
|
|
212
|
|
|
} |
213
|
|
|
|
214
|
|
|
func request_Permission_LookupEntityStream_0(ctx context.Context, marshaler runtime.Marshaler, client PermissionClient, req *http.Request, pathParams map[string]string) (Permission_LookupEntityStreamClient, runtime.ServerMetadata, error) { |
215
|
|
|
var protoReq PermissionLookupEntityRequest |
216
|
|
|
var metadata runtime.ServerMetadata |
217
|
|
|
|
218
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { |
219
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
220
|
|
|
} |
221
|
|
|
|
222
|
|
|
var ( |
223
|
|
|
val string |
224
|
|
|
ok bool |
225
|
|
|
err error |
226
|
|
|
_ = err |
227
|
|
|
) |
228
|
|
|
|
229
|
|
|
val, ok = pathParams["tenant_id"] |
230
|
|
|
if !ok { |
231
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") |
232
|
|
|
} |
233
|
|
|
|
234
|
|
|
protoReq.TenantId, err = runtime.String(val) |
235
|
|
|
if err != nil { |
236
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) |
237
|
|
|
} |
238
|
|
|
|
239
|
|
|
stream, err := client.LookupEntityStream(ctx, &protoReq) |
240
|
|
|
if err != nil { |
241
|
|
|
return nil, metadata, err |
242
|
|
|
} |
243
|
|
|
header, err := stream.Header() |
244
|
|
|
if err != nil { |
245
|
|
|
return nil, metadata, err |
246
|
|
|
} |
247
|
|
|
metadata.HeaderMD = header |
248
|
|
|
return stream, metadata, nil |
249
|
|
|
|
250
|
|
|
} |
251
|
|
|
|
252
|
|
|
func request_Permission_LookupSubject_0(ctx context.Context, marshaler runtime.Marshaler, client PermissionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
253
|
|
|
var protoReq PermissionLookupSubjectRequest |
254
|
|
|
var metadata runtime.ServerMetadata |
255
|
|
|
|
256
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { |
257
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
258
|
|
|
} |
259
|
|
|
|
260
|
|
|
var ( |
261
|
|
|
val string |
262
|
|
|
ok bool |
263
|
|
|
err error |
264
|
|
|
_ = err |
265
|
|
|
) |
266
|
|
|
|
267
|
|
|
val, ok = pathParams["tenant_id"] |
268
|
|
|
if !ok { |
269
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") |
270
|
|
|
} |
271
|
|
|
|
272
|
|
|
protoReq.TenantId, err = runtime.String(val) |
273
|
|
|
if err != nil { |
274
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) |
275
|
|
|
} |
276
|
|
|
|
277
|
|
|
msg, err := client.LookupSubject(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
278
|
|
|
return msg, metadata, err |
279
|
|
|
|
280
|
|
|
} |
281
|
|
|
|
282
|
|
|
func local_request_Permission_LookupSubject_0(ctx context.Context, marshaler runtime.Marshaler, server PermissionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
283
|
|
|
var protoReq PermissionLookupSubjectRequest |
284
|
|
|
var metadata runtime.ServerMetadata |
285
|
|
|
|
286
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { |
287
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
288
|
|
|
} |
289
|
|
|
|
290
|
|
|
var ( |
291
|
|
|
val string |
292
|
|
|
ok bool |
293
|
|
|
err error |
294
|
|
|
_ = err |
295
|
|
|
) |
296
|
|
|
|
297
|
|
|
val, ok = pathParams["tenant_id"] |
298
|
|
|
if !ok { |
299
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") |
300
|
|
|
} |
301
|
|
|
|
302
|
|
|
protoReq.TenantId, err = runtime.String(val) |
303
|
|
|
if err != nil { |
304
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) |
305
|
|
|
} |
306
|
|
|
|
307
|
|
|
msg, err := server.LookupSubject(ctx, &protoReq) |
308
|
|
|
return msg, metadata, err |
309
|
|
|
|
310
|
|
|
} |
311
|
|
|
|
312
|
|
|
func request_Permission_SubjectPermission_0(ctx context.Context, marshaler runtime.Marshaler, client PermissionClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
313
|
|
|
var protoReq PermissionSubjectPermissionRequest |
314
|
|
|
var metadata runtime.ServerMetadata |
315
|
|
|
|
316
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { |
317
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
318
|
|
|
} |
319
|
|
|
|
320
|
|
|
var ( |
321
|
|
|
val string |
322
|
|
|
ok bool |
323
|
|
|
err error |
324
|
|
|
_ = err |
325
|
|
|
) |
326
|
|
|
|
327
|
|
|
val, ok = pathParams["tenant_id"] |
328
|
|
|
if !ok { |
329
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") |
330
|
|
|
} |
331
|
|
|
|
332
|
|
|
protoReq.TenantId, err = runtime.String(val) |
333
|
|
|
if err != nil { |
334
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) |
335
|
|
|
} |
336
|
|
|
|
337
|
|
|
msg, err := client.SubjectPermission(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
338
|
|
|
return msg, metadata, err |
339
|
|
|
|
340
|
|
|
} |
341
|
|
|
|
342
|
|
|
func local_request_Permission_SubjectPermission_0(ctx context.Context, marshaler runtime.Marshaler, server PermissionServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
343
|
|
|
var protoReq PermissionSubjectPermissionRequest |
344
|
|
|
var metadata runtime.ServerMetadata |
345
|
|
|
|
346
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { |
347
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
348
|
|
|
} |
349
|
|
|
|
350
|
|
|
var ( |
351
|
|
|
val string |
352
|
|
|
ok bool |
353
|
|
|
err error |
354
|
|
|
_ = err |
355
|
|
|
) |
356
|
|
|
|
357
|
|
|
val, ok = pathParams["tenant_id"] |
358
|
|
|
if !ok { |
359
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") |
360
|
|
|
} |
361
|
|
|
|
362
|
|
|
protoReq.TenantId, err = runtime.String(val) |
363
|
|
|
if err != nil { |
364
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) |
365
|
|
|
} |
366
|
|
|
|
367
|
|
|
msg, err := server.SubjectPermission(ctx, &protoReq) |
368
|
|
|
return msg, metadata, err |
369
|
|
|
|
370
|
|
|
} |
371
|
|
|
|
372
|
|
|
func request_Watch_Watch_0(ctx context.Context, marshaler runtime.Marshaler, client WatchClient, req *http.Request, pathParams map[string]string) (Watch_WatchClient, runtime.ServerMetadata, error) { |
373
|
|
|
var protoReq WatchRequest |
374
|
|
|
var metadata runtime.ServerMetadata |
375
|
|
|
|
376
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { |
377
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
378
|
|
|
} |
379
|
|
|
|
380
|
|
|
var ( |
381
|
|
|
val string |
382
|
|
|
ok bool |
383
|
|
|
err error |
384
|
|
|
_ = err |
385
|
|
|
) |
386
|
|
|
|
387
|
|
|
val, ok = pathParams["tenant_id"] |
388
|
|
|
if !ok { |
389
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") |
390
|
|
|
} |
391
|
|
|
|
392
|
|
|
protoReq.TenantId, err = runtime.String(val) |
393
|
|
|
if err != nil { |
394
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) |
395
|
|
|
} |
396
|
|
|
|
397
|
|
|
stream, err := client.Watch(ctx, &protoReq) |
398
|
|
|
if err != nil { |
399
|
|
|
return nil, metadata, err |
400
|
|
|
} |
401
|
|
|
header, err := stream.Header() |
402
|
|
|
if err != nil { |
403
|
|
|
return nil, metadata, err |
404
|
|
|
} |
405
|
|
|
metadata.HeaderMD = header |
406
|
|
|
return stream, metadata, nil |
407
|
|
|
|
408
|
|
|
} |
409
|
|
|
|
410
|
|
|
func request_Schema_Write_0(ctx context.Context, marshaler runtime.Marshaler, client SchemaClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
411
|
|
|
var protoReq SchemaWriteRequest |
412
|
|
|
var metadata runtime.ServerMetadata |
413
|
|
|
|
414
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { |
415
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
416
|
|
|
} |
417
|
|
|
|
418
|
|
|
var ( |
419
|
|
|
val string |
420
|
|
|
ok bool |
421
|
|
|
err error |
422
|
|
|
_ = err |
423
|
|
|
) |
424
|
|
|
|
425
|
|
|
val, ok = pathParams["tenant_id"] |
426
|
|
|
if !ok { |
427
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") |
428
|
|
|
} |
429
|
|
|
|
430
|
|
|
protoReq.TenantId, err = runtime.String(val) |
431
|
|
|
if err != nil { |
432
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) |
433
|
|
|
} |
434
|
|
|
|
435
|
|
|
msg, err := client.Write(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
436
|
|
|
return msg, metadata, err |
437
|
|
|
|
438
|
|
|
} |
439
|
|
|
|
440
|
|
|
func local_request_Schema_Write_0(ctx context.Context, marshaler runtime.Marshaler, server SchemaServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
441
|
|
|
var protoReq SchemaWriteRequest |
442
|
|
|
var metadata runtime.ServerMetadata |
443
|
|
|
|
444
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { |
445
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
446
|
|
|
} |
447
|
|
|
|
448
|
|
|
var ( |
449
|
|
|
val string |
450
|
|
|
ok bool |
451
|
|
|
err error |
452
|
|
|
_ = err |
453
|
|
|
) |
454
|
|
|
|
455
|
|
|
val, ok = pathParams["tenant_id"] |
456
|
|
|
if !ok { |
457
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") |
458
|
|
|
} |
459
|
|
|
|
460
|
|
|
protoReq.TenantId, err = runtime.String(val) |
461
|
|
|
if err != nil { |
462
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) |
463
|
|
|
} |
464
|
|
|
|
465
|
|
|
msg, err := server.Write(ctx, &protoReq) |
466
|
|
|
return msg, metadata, err |
467
|
|
|
|
468
|
|
|
} |
469
|
|
|
|
470
|
|
|
func request_Schema_PartialWrite_0(ctx context.Context, marshaler runtime.Marshaler, client SchemaClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
471
|
|
|
var protoReq SchemaPartialWriteRequest |
472
|
|
|
var metadata runtime.ServerMetadata |
473
|
|
|
|
474
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { |
475
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
476
|
|
|
} |
477
|
|
|
|
478
|
|
|
var ( |
479
|
|
|
val string |
480
|
|
|
ok bool |
481
|
|
|
err error |
482
|
|
|
_ = err |
483
|
|
|
) |
484
|
|
|
|
485
|
|
|
val, ok = pathParams["tenant_id"] |
486
|
|
|
if !ok { |
487
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") |
488
|
|
|
} |
489
|
|
|
|
490
|
|
|
protoReq.TenantId, err = runtime.String(val) |
491
|
|
|
if err != nil { |
492
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) |
493
|
|
|
} |
494
|
|
|
|
495
|
|
|
msg, err := client.PartialWrite(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
496
|
|
|
return msg, metadata, err |
497
|
|
|
|
498
|
|
|
} |
499
|
|
|
|
500
|
|
|
func local_request_Schema_PartialWrite_0(ctx context.Context, marshaler runtime.Marshaler, server SchemaServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
501
|
|
|
var protoReq SchemaPartialWriteRequest |
502
|
|
|
var metadata runtime.ServerMetadata |
503
|
|
|
|
504
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { |
505
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
506
|
|
|
} |
507
|
|
|
|
508
|
|
|
var ( |
509
|
|
|
val string |
510
|
|
|
ok bool |
511
|
|
|
err error |
512
|
|
|
_ = err |
513
|
|
|
) |
514
|
|
|
|
515
|
|
|
val, ok = pathParams["tenant_id"] |
516
|
|
|
if !ok { |
517
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") |
518
|
|
|
} |
519
|
|
|
|
520
|
|
|
protoReq.TenantId, err = runtime.String(val) |
521
|
|
|
if err != nil { |
522
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) |
523
|
|
|
} |
524
|
|
|
|
525
|
|
|
msg, err := server.PartialWrite(ctx, &protoReq) |
526
|
|
|
return msg, metadata, err |
527
|
|
|
|
528
|
|
|
} |
529
|
|
|
|
530
|
|
|
func request_Schema_Read_0(ctx context.Context, marshaler runtime.Marshaler, client SchemaClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
531
|
|
|
var protoReq SchemaReadRequest |
532
|
|
|
var metadata runtime.ServerMetadata |
533
|
|
|
|
534
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { |
535
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
536
|
|
|
} |
537
|
|
|
|
538
|
|
|
var ( |
539
|
|
|
val string |
540
|
|
|
ok bool |
541
|
|
|
err error |
542
|
|
|
_ = err |
543
|
|
|
) |
544
|
|
|
|
545
|
|
|
val, ok = pathParams["tenant_id"] |
546
|
|
|
if !ok { |
547
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") |
548
|
|
|
} |
549
|
|
|
|
550
|
|
|
protoReq.TenantId, err = runtime.String(val) |
551
|
|
|
if err != nil { |
552
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) |
553
|
|
|
} |
554
|
|
|
|
555
|
|
|
msg, err := client.Read(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
556
|
|
|
return msg, metadata, err |
557
|
|
|
|
558
|
|
|
} |
559
|
|
|
|
560
|
|
|
func local_request_Schema_Read_0(ctx context.Context, marshaler runtime.Marshaler, server SchemaServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
561
|
|
|
var protoReq SchemaReadRequest |
562
|
|
|
var metadata runtime.ServerMetadata |
563
|
|
|
|
564
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { |
565
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
566
|
|
|
} |
567
|
|
|
|
568
|
|
|
var ( |
569
|
|
|
val string |
570
|
|
|
ok bool |
571
|
|
|
err error |
572
|
|
|
_ = err |
573
|
|
|
) |
574
|
|
|
|
575
|
|
|
val, ok = pathParams["tenant_id"] |
576
|
|
|
if !ok { |
577
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") |
578
|
|
|
} |
579
|
|
|
|
580
|
|
|
protoReq.TenantId, err = runtime.String(val) |
581
|
|
|
if err != nil { |
582
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) |
583
|
|
|
} |
584
|
|
|
|
585
|
|
|
msg, err := server.Read(ctx, &protoReq) |
586
|
|
|
return msg, metadata, err |
587
|
|
|
|
588
|
|
|
} |
589
|
|
|
|
590
|
|
|
func request_Schema_List_0(ctx context.Context, marshaler runtime.Marshaler, client SchemaClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
591
|
|
|
var protoReq SchemaListRequest |
592
|
|
|
var metadata runtime.ServerMetadata |
593
|
|
|
|
594
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { |
595
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
596
|
|
|
} |
597
|
|
|
|
598
|
|
|
var ( |
599
|
|
|
val string |
600
|
|
|
ok bool |
601
|
|
|
err error |
602
|
|
|
_ = err |
603
|
|
|
) |
604
|
|
|
|
605
|
|
|
val, ok = pathParams["tenant_id"] |
606
|
|
|
if !ok { |
607
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") |
608
|
|
|
} |
609
|
|
|
|
610
|
|
|
protoReq.TenantId, err = runtime.String(val) |
611
|
|
|
if err != nil { |
612
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) |
613
|
|
|
} |
614
|
|
|
|
615
|
|
|
msg, err := client.List(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
616
|
|
|
return msg, metadata, err |
617
|
|
|
|
618
|
|
|
} |
619
|
|
|
|
620
|
|
|
func local_request_Schema_List_0(ctx context.Context, marshaler runtime.Marshaler, server SchemaServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
621
|
|
|
var protoReq SchemaListRequest |
622
|
|
|
var metadata runtime.ServerMetadata |
623
|
|
|
|
624
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { |
625
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
626
|
|
|
} |
627
|
|
|
|
628
|
|
|
var ( |
629
|
|
|
val string |
630
|
|
|
ok bool |
631
|
|
|
err error |
632
|
|
|
_ = err |
633
|
|
|
) |
634
|
|
|
|
635
|
|
|
val, ok = pathParams["tenant_id"] |
636
|
|
|
if !ok { |
637
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") |
638
|
|
|
} |
639
|
|
|
|
640
|
|
|
protoReq.TenantId, err = runtime.String(val) |
641
|
|
|
if err != nil { |
642
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) |
643
|
|
|
} |
644
|
|
|
|
645
|
|
|
msg, err := server.List(ctx, &protoReq) |
646
|
|
|
return msg, metadata, err |
647
|
|
|
|
648
|
|
|
} |
649
|
|
|
|
650
|
|
|
func request_Data_Write_0(ctx context.Context, marshaler runtime.Marshaler, client DataClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
651
|
|
|
var protoReq DataWriteRequest |
652
|
|
|
var metadata runtime.ServerMetadata |
653
|
|
|
|
654
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { |
655
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
656
|
|
|
} |
657
|
|
|
|
658
|
|
|
var ( |
659
|
|
|
val string |
660
|
|
|
ok bool |
661
|
|
|
err error |
662
|
|
|
_ = err |
663
|
|
|
) |
664
|
|
|
|
665
|
|
|
val, ok = pathParams["tenant_id"] |
666
|
|
|
if !ok { |
667
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") |
668
|
|
|
} |
669
|
|
|
|
670
|
|
|
protoReq.TenantId, err = runtime.String(val) |
671
|
|
|
if err != nil { |
672
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) |
673
|
|
|
} |
674
|
|
|
|
675
|
|
|
msg, err := client.Write(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
676
|
|
|
return msg, metadata, err |
677
|
|
|
|
678
|
|
|
} |
679
|
|
|
|
680
|
|
|
func local_request_Data_Write_0(ctx context.Context, marshaler runtime.Marshaler, server DataServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
681
|
|
|
var protoReq DataWriteRequest |
682
|
|
|
var metadata runtime.ServerMetadata |
683
|
|
|
|
684
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { |
685
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
686
|
|
|
} |
687
|
|
|
|
688
|
|
|
var ( |
689
|
|
|
val string |
690
|
|
|
ok bool |
691
|
|
|
err error |
692
|
|
|
_ = err |
693
|
|
|
) |
694
|
|
|
|
695
|
|
|
val, ok = pathParams["tenant_id"] |
696
|
|
|
if !ok { |
697
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") |
698
|
|
|
} |
699
|
|
|
|
700
|
|
|
protoReq.TenantId, err = runtime.String(val) |
701
|
|
|
if err != nil { |
702
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) |
703
|
|
|
} |
704
|
|
|
|
705
|
|
|
msg, err := server.Write(ctx, &protoReq) |
706
|
|
|
return msg, metadata, err |
707
|
|
|
|
708
|
|
|
} |
709
|
|
|
|
710
|
|
|
func request_Data_WriteRelationships_0(ctx context.Context, marshaler runtime.Marshaler, client DataClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
711
|
|
|
var protoReq RelationshipWriteRequest |
712
|
|
|
var metadata runtime.ServerMetadata |
713
|
|
|
|
714
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { |
715
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
716
|
|
|
} |
717
|
|
|
|
718
|
|
|
var ( |
719
|
|
|
val string |
720
|
|
|
ok bool |
721
|
|
|
err error |
722
|
|
|
_ = err |
723
|
|
|
) |
724
|
|
|
|
725
|
|
|
val, ok = pathParams["tenant_id"] |
726
|
|
|
if !ok { |
727
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") |
728
|
|
|
} |
729
|
|
|
|
730
|
|
|
protoReq.TenantId, err = runtime.String(val) |
731
|
|
|
if err != nil { |
732
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) |
733
|
|
|
} |
734
|
|
|
|
735
|
|
|
msg, err := client.WriteRelationships(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
736
|
|
|
return msg, metadata, err |
737
|
|
|
|
738
|
|
|
} |
739
|
|
|
|
740
|
|
|
func local_request_Data_WriteRelationships_0(ctx context.Context, marshaler runtime.Marshaler, server DataServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
741
|
|
|
var protoReq RelationshipWriteRequest |
742
|
|
|
var metadata runtime.ServerMetadata |
743
|
|
|
|
744
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { |
745
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
746
|
|
|
} |
747
|
|
|
|
748
|
|
|
var ( |
749
|
|
|
val string |
750
|
|
|
ok bool |
751
|
|
|
err error |
752
|
|
|
_ = err |
753
|
|
|
) |
754
|
|
|
|
755
|
|
|
val, ok = pathParams["tenant_id"] |
756
|
|
|
if !ok { |
757
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") |
758
|
|
|
} |
759
|
|
|
|
760
|
|
|
protoReq.TenantId, err = runtime.String(val) |
761
|
|
|
if err != nil { |
762
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) |
763
|
|
|
} |
764
|
|
|
|
765
|
|
|
msg, err := server.WriteRelationships(ctx, &protoReq) |
766
|
|
|
return msg, metadata, err |
767
|
|
|
|
768
|
|
|
} |
769
|
|
|
|
770
|
|
|
func request_Data_ReadRelationships_0(ctx context.Context, marshaler runtime.Marshaler, client DataClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
771
|
|
|
var protoReq RelationshipReadRequest |
772
|
|
|
var metadata runtime.ServerMetadata |
773
|
|
|
|
774
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { |
775
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
776
|
|
|
} |
777
|
|
|
|
778
|
|
|
var ( |
779
|
|
|
val string |
780
|
|
|
ok bool |
781
|
|
|
err error |
782
|
|
|
_ = err |
783
|
|
|
) |
784
|
|
|
|
785
|
|
|
val, ok = pathParams["tenant_id"] |
786
|
|
|
if !ok { |
787
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") |
788
|
|
|
} |
789
|
|
|
|
790
|
|
|
protoReq.TenantId, err = runtime.String(val) |
791
|
|
|
if err != nil { |
792
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) |
793
|
|
|
} |
794
|
|
|
|
795
|
|
|
msg, err := client.ReadRelationships(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
796
|
|
|
return msg, metadata, err |
797
|
|
|
|
798
|
|
|
} |
799
|
|
|
|
800
|
|
|
func local_request_Data_ReadRelationships_0(ctx context.Context, marshaler runtime.Marshaler, server DataServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
801
|
|
|
var protoReq RelationshipReadRequest |
802
|
|
|
var metadata runtime.ServerMetadata |
803
|
|
|
|
804
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { |
805
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
806
|
|
|
} |
807
|
|
|
|
808
|
|
|
var ( |
809
|
|
|
val string |
810
|
|
|
ok bool |
811
|
|
|
err error |
812
|
|
|
_ = err |
813
|
|
|
) |
814
|
|
|
|
815
|
|
|
val, ok = pathParams["tenant_id"] |
816
|
|
|
if !ok { |
817
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") |
818
|
|
|
} |
819
|
|
|
|
820
|
|
|
protoReq.TenantId, err = runtime.String(val) |
821
|
|
|
if err != nil { |
822
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) |
823
|
|
|
} |
824
|
|
|
|
825
|
|
|
msg, err := server.ReadRelationships(ctx, &protoReq) |
826
|
|
|
return msg, metadata, err |
827
|
|
|
|
828
|
|
|
} |
829
|
|
|
|
830
|
|
|
func request_Data_ReadAttributes_0(ctx context.Context, marshaler runtime.Marshaler, client DataClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
831
|
|
|
var protoReq AttributeReadRequest |
832
|
|
|
var metadata runtime.ServerMetadata |
833
|
|
|
|
834
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { |
835
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
836
|
|
|
} |
837
|
|
|
|
838
|
|
|
var ( |
839
|
|
|
val string |
840
|
|
|
ok bool |
841
|
|
|
err error |
842
|
|
|
_ = err |
843
|
|
|
) |
844
|
|
|
|
845
|
|
|
val, ok = pathParams["tenant_id"] |
846
|
|
|
if !ok { |
847
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") |
848
|
|
|
} |
849
|
|
|
|
850
|
|
|
protoReq.TenantId, err = runtime.String(val) |
851
|
|
|
if err != nil { |
852
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) |
853
|
|
|
} |
854
|
|
|
|
855
|
|
|
msg, err := client.ReadAttributes(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
856
|
|
|
return msg, metadata, err |
857
|
|
|
|
858
|
|
|
} |
859
|
|
|
|
860
|
|
|
func local_request_Data_ReadAttributes_0(ctx context.Context, marshaler runtime.Marshaler, server DataServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
861
|
|
|
var protoReq AttributeReadRequest |
862
|
|
|
var metadata runtime.ServerMetadata |
863
|
|
|
|
864
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { |
865
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
866
|
|
|
} |
867
|
|
|
|
868
|
|
|
var ( |
869
|
|
|
val string |
870
|
|
|
ok bool |
871
|
|
|
err error |
872
|
|
|
_ = err |
873
|
|
|
) |
874
|
|
|
|
875
|
|
|
val, ok = pathParams["tenant_id"] |
876
|
|
|
if !ok { |
877
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") |
878
|
|
|
} |
879
|
|
|
|
880
|
|
|
protoReq.TenantId, err = runtime.String(val) |
881
|
|
|
if err != nil { |
882
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) |
883
|
|
|
} |
884
|
|
|
|
885
|
|
|
msg, err := server.ReadAttributes(ctx, &protoReq) |
886
|
|
|
return msg, metadata, err |
887
|
|
|
|
888
|
|
|
} |
889
|
|
|
|
890
|
|
|
func request_Data_Delete_0(ctx context.Context, marshaler runtime.Marshaler, client DataClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
891
|
|
|
var protoReq DataDeleteRequest |
892
|
|
|
var metadata runtime.ServerMetadata |
893
|
|
|
|
894
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { |
895
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
896
|
|
|
} |
897
|
|
|
|
898
|
|
|
var ( |
899
|
|
|
val string |
900
|
|
|
ok bool |
901
|
|
|
err error |
902
|
|
|
_ = err |
903
|
|
|
) |
904
|
|
|
|
905
|
|
|
val, ok = pathParams["tenant_id"] |
906
|
|
|
if !ok { |
907
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") |
908
|
|
|
} |
909
|
|
|
|
910
|
|
|
protoReq.TenantId, err = runtime.String(val) |
911
|
|
|
if err != nil { |
912
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) |
913
|
|
|
} |
914
|
|
|
|
915
|
|
|
msg, err := client.Delete(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
916
|
|
|
return msg, metadata, err |
917
|
|
|
|
918
|
|
|
} |
919
|
|
|
|
920
|
|
|
func local_request_Data_Delete_0(ctx context.Context, marshaler runtime.Marshaler, server DataServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
921
|
|
|
var protoReq DataDeleteRequest |
922
|
|
|
var metadata runtime.ServerMetadata |
923
|
|
|
|
924
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { |
925
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
926
|
|
|
} |
927
|
|
|
|
928
|
|
|
var ( |
929
|
|
|
val string |
930
|
|
|
ok bool |
931
|
|
|
err error |
932
|
|
|
_ = err |
933
|
|
|
) |
934
|
|
|
|
935
|
|
|
val, ok = pathParams["tenant_id"] |
936
|
|
|
if !ok { |
937
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") |
938
|
|
|
} |
939
|
|
|
|
940
|
|
|
protoReq.TenantId, err = runtime.String(val) |
941
|
|
|
if err != nil { |
942
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) |
943
|
|
|
} |
944
|
|
|
|
945
|
|
|
msg, err := server.Delete(ctx, &protoReq) |
946
|
|
|
return msg, metadata, err |
947
|
|
|
|
948
|
|
|
} |
949
|
|
|
|
950
|
|
|
func request_Data_DeleteRelationships_0(ctx context.Context, marshaler runtime.Marshaler, client DataClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
951
|
|
|
var protoReq RelationshipDeleteRequest |
952
|
|
|
var metadata runtime.ServerMetadata |
953
|
|
|
|
954
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { |
955
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
956
|
|
|
} |
957
|
|
|
|
958
|
|
|
var ( |
959
|
|
|
val string |
960
|
|
|
ok bool |
961
|
|
|
err error |
962
|
|
|
_ = err |
963
|
|
|
) |
964
|
|
|
|
965
|
|
|
val, ok = pathParams["tenant_id"] |
966
|
|
|
if !ok { |
967
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") |
968
|
|
|
} |
969
|
|
|
|
970
|
|
|
protoReq.TenantId, err = runtime.String(val) |
971
|
|
|
if err != nil { |
972
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) |
973
|
|
|
} |
974
|
|
|
|
975
|
|
|
msg, err := client.DeleteRelationships(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
976
|
|
|
return msg, metadata, err |
977
|
|
|
|
978
|
|
|
} |
979
|
|
|
|
980
|
|
|
func local_request_Data_DeleteRelationships_0(ctx context.Context, marshaler runtime.Marshaler, server DataServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
981
|
|
|
var protoReq RelationshipDeleteRequest |
982
|
|
|
var metadata runtime.ServerMetadata |
983
|
|
|
|
984
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { |
985
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
986
|
|
|
} |
987
|
|
|
|
988
|
|
|
var ( |
989
|
|
|
val string |
990
|
|
|
ok bool |
991
|
|
|
err error |
992
|
|
|
_ = err |
993
|
|
|
) |
994
|
|
|
|
995
|
|
|
val, ok = pathParams["tenant_id"] |
996
|
|
|
if !ok { |
997
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") |
998
|
|
|
} |
999
|
|
|
|
1000
|
|
|
protoReq.TenantId, err = runtime.String(val) |
1001
|
|
|
if err != nil { |
1002
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) |
1003
|
|
|
} |
1004
|
|
|
|
1005
|
|
|
msg, err := server.DeleteRelationships(ctx, &protoReq) |
1006
|
|
|
return msg, metadata, err |
1007
|
|
|
|
1008
|
|
|
} |
1009
|
|
|
|
1010
|
|
|
func request_Data_RunBundle_0(ctx context.Context, marshaler runtime.Marshaler, client DataClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
1011
|
|
|
var protoReq BundleRunRequest |
1012
|
|
|
var metadata runtime.ServerMetadata |
1013
|
|
|
|
1014
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { |
1015
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
1016
|
|
|
} |
1017
|
|
|
|
1018
|
|
|
var ( |
1019
|
|
|
val string |
1020
|
|
|
ok bool |
1021
|
|
|
err error |
1022
|
|
|
_ = err |
1023
|
|
|
) |
1024
|
|
|
|
1025
|
|
|
val, ok = pathParams["tenant_id"] |
1026
|
|
|
if !ok { |
1027
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") |
1028
|
|
|
} |
1029
|
|
|
|
1030
|
|
|
protoReq.TenantId, err = runtime.String(val) |
1031
|
|
|
if err != nil { |
1032
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) |
1033
|
|
|
} |
1034
|
|
|
|
1035
|
|
|
msg, err := client.RunBundle(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
1036
|
|
|
return msg, metadata, err |
1037
|
|
|
|
1038
|
|
|
} |
1039
|
|
|
|
1040
|
|
|
func local_request_Data_RunBundle_0(ctx context.Context, marshaler runtime.Marshaler, server DataServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
1041
|
|
|
var protoReq BundleRunRequest |
1042
|
|
|
var metadata runtime.ServerMetadata |
1043
|
|
|
|
1044
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { |
1045
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
1046
|
|
|
} |
1047
|
|
|
|
1048
|
|
|
var ( |
1049
|
|
|
val string |
1050
|
|
|
ok bool |
1051
|
|
|
err error |
1052
|
|
|
_ = err |
1053
|
|
|
) |
1054
|
|
|
|
1055
|
|
|
val, ok = pathParams["tenant_id"] |
1056
|
|
|
if !ok { |
1057
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") |
1058
|
|
|
} |
1059
|
|
|
|
1060
|
|
|
protoReq.TenantId, err = runtime.String(val) |
1061
|
|
|
if err != nil { |
1062
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) |
1063
|
|
|
} |
1064
|
|
|
|
1065
|
|
|
msg, err := server.RunBundle(ctx, &protoReq) |
1066
|
|
|
return msg, metadata, err |
1067
|
|
|
|
1068
|
|
|
} |
1069
|
|
|
|
1070
|
|
|
func request_Bundle_Write_0(ctx context.Context, marshaler runtime.Marshaler, client BundleClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
1071
|
|
|
var protoReq BundleWriteRequest |
1072
|
|
|
var metadata runtime.ServerMetadata |
1073
|
|
|
|
1074
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { |
1075
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
1076
|
|
|
} |
1077
|
|
|
|
1078
|
|
|
var ( |
1079
|
|
|
val string |
1080
|
|
|
ok bool |
1081
|
|
|
err error |
1082
|
|
|
_ = err |
1083
|
|
|
) |
1084
|
|
|
|
1085
|
|
|
val, ok = pathParams["tenant_id"] |
1086
|
|
|
if !ok { |
1087
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") |
1088
|
|
|
} |
1089
|
|
|
|
1090
|
|
|
protoReq.TenantId, err = runtime.String(val) |
1091
|
|
|
if err != nil { |
1092
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) |
1093
|
|
|
} |
1094
|
|
|
|
1095
|
|
|
msg, err := client.Write(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
1096
|
|
|
return msg, metadata, err |
1097
|
|
|
|
1098
|
|
|
} |
1099
|
|
|
|
1100
|
|
|
func local_request_Bundle_Write_0(ctx context.Context, marshaler runtime.Marshaler, server BundleServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
1101
|
|
|
var protoReq BundleWriteRequest |
1102
|
|
|
var metadata runtime.ServerMetadata |
1103
|
|
|
|
1104
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { |
1105
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
1106
|
|
|
} |
1107
|
|
|
|
1108
|
|
|
var ( |
1109
|
|
|
val string |
1110
|
|
|
ok bool |
1111
|
|
|
err error |
1112
|
|
|
_ = err |
1113
|
|
|
) |
1114
|
|
|
|
1115
|
|
|
val, ok = pathParams["tenant_id"] |
1116
|
|
|
if !ok { |
1117
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") |
1118
|
|
|
} |
1119
|
|
|
|
1120
|
|
|
protoReq.TenantId, err = runtime.String(val) |
1121
|
|
|
if err != nil { |
1122
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) |
1123
|
|
|
} |
1124
|
|
|
|
1125
|
|
|
msg, err := server.Write(ctx, &protoReq) |
1126
|
|
|
return msg, metadata, err |
1127
|
|
|
|
1128
|
|
|
} |
1129
|
|
|
|
1130
|
|
|
func request_Bundle_Read_0(ctx context.Context, marshaler runtime.Marshaler, client BundleClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
1131
|
|
|
var protoReq BundleReadRequest |
1132
|
|
|
var metadata runtime.ServerMetadata |
1133
|
|
|
|
1134
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { |
1135
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
1136
|
|
|
} |
1137
|
|
|
|
1138
|
|
|
var ( |
1139
|
|
|
val string |
1140
|
|
|
ok bool |
1141
|
|
|
err error |
1142
|
|
|
_ = err |
1143
|
|
|
) |
1144
|
|
|
|
1145
|
|
|
val, ok = pathParams["tenant_id"] |
1146
|
|
|
if !ok { |
1147
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") |
1148
|
|
|
} |
1149
|
|
|
|
1150
|
|
|
protoReq.TenantId, err = runtime.String(val) |
1151
|
|
|
if err != nil { |
1152
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) |
1153
|
|
|
} |
1154
|
|
|
|
1155
|
|
|
msg, err := client.Read(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
1156
|
|
|
return msg, metadata, err |
1157
|
|
|
|
1158
|
|
|
} |
1159
|
|
|
|
1160
|
|
|
func local_request_Bundle_Read_0(ctx context.Context, marshaler runtime.Marshaler, server BundleServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
1161
|
|
|
var protoReq BundleReadRequest |
1162
|
|
|
var metadata runtime.ServerMetadata |
1163
|
|
|
|
1164
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { |
1165
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
1166
|
|
|
} |
1167
|
|
|
|
1168
|
|
|
var ( |
1169
|
|
|
val string |
1170
|
|
|
ok bool |
1171
|
|
|
err error |
1172
|
|
|
_ = err |
1173
|
|
|
) |
1174
|
|
|
|
1175
|
|
|
val, ok = pathParams["tenant_id"] |
1176
|
|
|
if !ok { |
1177
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") |
1178
|
|
|
} |
1179
|
|
|
|
1180
|
|
|
protoReq.TenantId, err = runtime.String(val) |
1181
|
|
|
if err != nil { |
1182
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) |
1183
|
|
|
} |
1184
|
|
|
|
1185
|
|
|
msg, err := server.Read(ctx, &protoReq) |
1186
|
|
|
return msg, metadata, err |
1187
|
|
|
|
1188
|
|
|
} |
1189
|
|
|
|
1190
|
|
|
func request_Bundle_Delete_0(ctx context.Context, marshaler runtime.Marshaler, client BundleClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
1191
|
|
|
var protoReq BundleDeleteRequest |
1192
|
|
|
var metadata runtime.ServerMetadata |
1193
|
|
|
|
1194
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { |
1195
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
1196
|
|
|
} |
1197
|
|
|
|
1198
|
|
|
var ( |
1199
|
|
|
val string |
1200
|
|
|
ok bool |
1201
|
|
|
err error |
1202
|
|
|
_ = err |
1203
|
|
|
) |
1204
|
|
|
|
1205
|
|
|
val, ok = pathParams["tenant_id"] |
1206
|
|
|
if !ok { |
1207
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") |
1208
|
|
|
} |
1209
|
|
|
|
1210
|
|
|
protoReq.TenantId, err = runtime.String(val) |
1211
|
|
|
if err != nil { |
1212
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) |
1213
|
|
|
} |
1214
|
|
|
|
1215
|
|
|
msg, err := client.Delete(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
1216
|
|
|
return msg, metadata, err |
1217
|
|
|
|
1218
|
|
|
} |
1219
|
|
|
|
1220
|
|
|
func local_request_Bundle_Delete_0(ctx context.Context, marshaler runtime.Marshaler, server BundleServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
1221
|
|
|
var protoReq BundleDeleteRequest |
1222
|
|
|
var metadata runtime.ServerMetadata |
1223
|
|
|
|
1224
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { |
1225
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
1226
|
|
|
} |
1227
|
|
|
|
1228
|
|
|
var ( |
1229
|
|
|
val string |
1230
|
|
|
ok bool |
1231
|
|
|
err error |
1232
|
|
|
_ = err |
1233
|
|
|
) |
1234
|
|
|
|
1235
|
|
|
val, ok = pathParams["tenant_id"] |
1236
|
|
|
if !ok { |
1237
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "tenant_id") |
1238
|
|
|
} |
1239
|
|
|
|
1240
|
|
|
protoReq.TenantId, err = runtime.String(val) |
1241
|
|
|
if err != nil { |
1242
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "tenant_id", err) |
1243
|
|
|
} |
1244
|
|
|
|
1245
|
|
|
msg, err := server.Delete(ctx, &protoReq) |
1246
|
|
|
return msg, metadata, err |
1247
|
|
|
|
1248
|
|
|
} |
1249
|
|
|
|
1250
|
|
|
func request_Tenancy_Create_0(ctx context.Context, marshaler runtime.Marshaler, client TenancyClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
1251
|
|
|
var protoReq TenantCreateRequest |
1252
|
|
|
var metadata runtime.ServerMetadata |
1253
|
|
|
|
1254
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { |
1255
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
1256
|
|
|
} |
1257
|
|
|
|
1258
|
|
|
msg, err := client.Create(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
1259
|
|
|
return msg, metadata, err |
1260
|
|
|
|
1261
|
|
|
} |
1262
|
|
|
|
1263
|
|
|
func local_request_Tenancy_Create_0(ctx context.Context, marshaler runtime.Marshaler, server TenancyServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
1264
|
|
|
var protoReq TenantCreateRequest |
1265
|
|
|
var metadata runtime.ServerMetadata |
1266
|
|
|
|
1267
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { |
1268
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
1269
|
|
|
} |
1270
|
|
|
|
1271
|
|
|
msg, err := server.Create(ctx, &protoReq) |
1272
|
|
|
return msg, metadata, err |
1273
|
|
|
|
1274
|
|
|
} |
1275
|
|
|
|
1276
|
|
|
func request_Tenancy_Delete_0(ctx context.Context, marshaler runtime.Marshaler, client TenancyClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
1277
|
|
|
var protoReq TenantDeleteRequest |
1278
|
|
|
var metadata runtime.ServerMetadata |
1279
|
|
|
|
1280
|
|
|
var ( |
1281
|
|
|
val string |
1282
|
|
|
ok bool |
1283
|
|
|
err error |
1284
|
|
|
_ = err |
1285
|
|
|
) |
1286
|
|
|
|
1287
|
|
|
val, ok = pathParams["id"] |
1288
|
|
|
if !ok { |
1289
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") |
1290
|
|
|
} |
1291
|
|
|
|
1292
|
|
|
protoReq.Id, err = runtime.String(val) |
1293
|
|
|
if err != nil { |
1294
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) |
1295
|
|
|
} |
1296
|
|
|
|
1297
|
|
|
msg, err := client.Delete(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
1298
|
|
|
return msg, metadata, err |
1299
|
|
|
|
1300
|
|
|
} |
1301
|
|
|
|
1302
|
|
|
func local_request_Tenancy_Delete_0(ctx context.Context, marshaler runtime.Marshaler, server TenancyServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
1303
|
|
|
var protoReq TenantDeleteRequest |
1304
|
|
|
var metadata runtime.ServerMetadata |
1305
|
|
|
|
1306
|
|
|
var ( |
1307
|
|
|
val string |
1308
|
|
|
ok bool |
1309
|
|
|
err error |
1310
|
|
|
_ = err |
1311
|
|
|
) |
1312
|
|
|
|
1313
|
|
|
val, ok = pathParams["id"] |
1314
|
|
|
if !ok { |
1315
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") |
1316
|
|
|
} |
1317
|
|
|
|
1318
|
|
|
protoReq.Id, err = runtime.String(val) |
1319
|
|
|
if err != nil { |
1320
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) |
1321
|
|
|
} |
1322
|
|
|
|
1323
|
|
|
msg, err := server.Delete(ctx, &protoReq) |
1324
|
|
|
return msg, metadata, err |
1325
|
|
|
|
1326
|
|
|
} |
1327
|
|
|
|
1328
|
|
|
func request_Tenancy_List_0(ctx context.Context, marshaler runtime.Marshaler, client TenancyClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
1329
|
|
|
var protoReq TenantListRequest |
1330
|
|
|
var metadata runtime.ServerMetadata |
1331
|
|
|
|
1332
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { |
1333
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
1334
|
|
|
} |
1335
|
|
|
|
1336
|
|
|
msg, err := client.List(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) |
1337
|
|
|
return msg, metadata, err |
1338
|
|
|
|
1339
|
|
|
} |
1340
|
|
|
|
1341
|
|
|
func local_request_Tenancy_List_0(ctx context.Context, marshaler runtime.Marshaler, server TenancyServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { |
1342
|
|
|
var protoReq TenantListRequest |
1343
|
|
|
var metadata runtime.ServerMetadata |
1344
|
|
|
|
1345
|
|
|
if err := marshaler.NewDecoder(req.Body).Decode(&protoReq); err != nil && err != io.EOF { |
1346
|
|
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) |
1347
|
|
|
} |
1348
|
|
|
|
1349
|
|
|
msg, err := server.List(ctx, &protoReq) |
1350
|
|
|
return msg, metadata, err |
1351
|
|
|
|
1352
|
|
|
} |
1353
|
|
|
|
1354
|
|
|
// RegisterPermissionHandlerServer registers the http handlers for service Permission to "mux". |
1355
|
|
|
// UnaryRPC :call PermissionServer directly. |
1356
|
|
|
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. |
1357
|
|
|
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterPermissionHandlerFromEndpoint instead. |
1358
|
|
|
func RegisterPermissionHandlerServer(ctx context.Context, mux *runtime.ServeMux, server PermissionServer) error { |
1359
|
|
|
|
1360
|
|
|
mux.Handle("POST", pattern_Permission_Check_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
1361
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
1362
|
|
|
defer cancel() |
1363
|
|
|
var stream runtime.ServerTransportStream |
1364
|
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) |
1365
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
1366
|
|
|
var err error |
1367
|
|
|
var annotatedContext context.Context |
1368
|
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Permission/Check", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/permissions/check")) |
1369
|
|
|
if err != nil { |
1370
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
1371
|
|
|
return |
1372
|
|
|
} |
1373
|
|
|
resp, md, err := local_request_Permission_Check_0(annotatedContext, inboundMarshaler, server, req, pathParams) |
1374
|
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) |
1375
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
1376
|
|
|
if err != nil { |
1377
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
1378
|
|
|
return |
1379
|
|
|
} |
1380
|
|
|
|
1381
|
|
|
forward_Permission_Check_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
1382
|
|
|
|
1383
|
|
|
}) |
1384
|
|
|
|
1385
|
|
|
mux.Handle("POST", pattern_Permission_Expand_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
1386
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
1387
|
|
|
defer cancel() |
1388
|
|
|
var stream runtime.ServerTransportStream |
1389
|
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) |
1390
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
1391
|
|
|
var err error |
1392
|
|
|
var annotatedContext context.Context |
1393
|
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Permission/Expand", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/permissions/expand")) |
1394
|
|
|
if err != nil { |
1395
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
1396
|
|
|
return |
1397
|
|
|
} |
1398
|
|
|
resp, md, err := local_request_Permission_Expand_0(annotatedContext, inboundMarshaler, server, req, pathParams) |
1399
|
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) |
1400
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
1401
|
|
|
if err != nil { |
1402
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
1403
|
|
|
return |
1404
|
|
|
} |
1405
|
|
|
|
1406
|
|
|
forward_Permission_Expand_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
1407
|
|
|
|
1408
|
|
|
}) |
1409
|
|
|
|
1410
|
|
|
mux.Handle("POST", pattern_Permission_LookupEntity_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
1411
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
1412
|
|
|
defer cancel() |
1413
|
|
|
var stream runtime.ServerTransportStream |
1414
|
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) |
1415
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
1416
|
|
|
var err error |
1417
|
|
|
var annotatedContext context.Context |
1418
|
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Permission/LookupEntity", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/permissions/lookup-entity")) |
1419
|
|
|
if err != nil { |
1420
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
1421
|
|
|
return |
1422
|
|
|
} |
1423
|
|
|
resp, md, err := local_request_Permission_LookupEntity_0(annotatedContext, inboundMarshaler, server, req, pathParams) |
1424
|
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) |
1425
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
1426
|
|
|
if err != nil { |
1427
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
1428
|
|
|
return |
1429
|
|
|
} |
1430
|
|
|
|
1431
|
|
|
forward_Permission_LookupEntity_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
1432
|
|
|
|
1433
|
|
|
}) |
1434
|
|
|
|
1435
|
|
|
mux.Handle("POST", pattern_Permission_LookupEntityStream_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
1436
|
|
|
err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport") |
1437
|
|
|
_, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
1438
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
1439
|
|
|
return |
1440
|
|
|
}) |
1441
|
|
|
|
1442
|
|
|
mux.Handle("POST", pattern_Permission_LookupSubject_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
1443
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
1444
|
|
|
defer cancel() |
1445
|
|
|
var stream runtime.ServerTransportStream |
1446
|
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) |
1447
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
1448
|
|
|
var err error |
1449
|
|
|
var annotatedContext context.Context |
1450
|
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Permission/LookupSubject", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/permissions/lookup-subject")) |
1451
|
|
|
if err != nil { |
1452
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
1453
|
|
|
return |
1454
|
|
|
} |
1455
|
|
|
resp, md, err := local_request_Permission_LookupSubject_0(annotatedContext, inboundMarshaler, server, req, pathParams) |
1456
|
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) |
1457
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
1458
|
|
|
if err != nil { |
1459
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
1460
|
|
|
return |
1461
|
|
|
} |
1462
|
|
|
|
1463
|
|
|
forward_Permission_LookupSubject_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
1464
|
|
|
|
1465
|
|
|
}) |
1466
|
|
|
|
1467
|
|
|
mux.Handle("POST", pattern_Permission_SubjectPermission_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
1468
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
1469
|
|
|
defer cancel() |
1470
|
|
|
var stream runtime.ServerTransportStream |
1471
|
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) |
1472
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
1473
|
|
|
var err error |
1474
|
|
|
var annotatedContext context.Context |
1475
|
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Permission/SubjectPermission", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/permissions/subject-permission")) |
1476
|
|
|
if err != nil { |
1477
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
1478
|
|
|
return |
1479
|
|
|
} |
1480
|
|
|
resp, md, err := local_request_Permission_SubjectPermission_0(annotatedContext, inboundMarshaler, server, req, pathParams) |
1481
|
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) |
1482
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
1483
|
|
|
if err != nil { |
1484
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
1485
|
|
|
return |
1486
|
|
|
} |
1487
|
|
|
|
1488
|
|
|
forward_Permission_SubjectPermission_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
1489
|
|
|
|
1490
|
|
|
}) |
1491
|
|
|
|
1492
|
|
|
return nil |
1493
|
|
|
} |
1494
|
|
|
|
1495
|
|
|
// RegisterWatchHandlerServer registers the http handlers for service Watch to "mux". |
1496
|
|
|
// UnaryRPC :call WatchServer directly. |
1497
|
|
|
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. |
1498
|
|
|
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterWatchHandlerFromEndpoint instead. |
1499
|
|
|
func RegisterWatchHandlerServer(ctx context.Context, mux *runtime.ServeMux, server WatchServer) error { |
1500
|
|
|
|
1501
|
|
|
mux.Handle("POST", pattern_Watch_Watch_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
1502
|
|
|
err := status.Error(codes.Unimplemented, "streaming calls are not yet supported in the in-process transport") |
1503
|
|
|
_, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
1504
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
1505
|
|
|
return |
1506
|
|
|
}) |
1507
|
|
|
|
1508
|
|
|
return nil |
1509
|
|
|
} |
1510
|
|
|
|
1511
|
|
|
// RegisterSchemaHandlerServer registers the http handlers for service Schema to "mux". |
1512
|
|
|
// UnaryRPC :call SchemaServer directly. |
1513
|
|
|
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. |
1514
|
|
|
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterSchemaHandlerFromEndpoint instead. |
1515
|
|
|
func RegisterSchemaHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SchemaServer) error { |
1516
|
|
|
|
1517
|
|
|
mux.Handle("POST", pattern_Schema_Write_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
1518
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
1519
|
|
|
defer cancel() |
1520
|
|
|
var stream runtime.ServerTransportStream |
1521
|
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) |
1522
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
1523
|
|
|
var err error |
1524
|
|
|
var annotatedContext context.Context |
1525
|
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Schema/Write", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/schemas/write")) |
1526
|
|
|
if err != nil { |
1527
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
1528
|
|
|
return |
1529
|
|
|
} |
1530
|
|
|
resp, md, err := local_request_Schema_Write_0(annotatedContext, inboundMarshaler, server, req, pathParams) |
1531
|
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) |
1532
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
1533
|
|
|
if err != nil { |
1534
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
1535
|
|
|
return |
1536
|
|
|
} |
1537
|
|
|
|
1538
|
|
|
forward_Schema_Write_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
1539
|
|
|
|
1540
|
|
|
}) |
1541
|
|
|
|
1542
|
|
|
mux.Handle("PATCH", pattern_Schema_PartialWrite_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
1543
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
1544
|
|
|
defer cancel() |
1545
|
|
|
var stream runtime.ServerTransportStream |
1546
|
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) |
1547
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
1548
|
|
|
var err error |
1549
|
|
|
var annotatedContext context.Context |
1550
|
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Schema/PartialWrite", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/schemas/partial-write")) |
1551
|
|
|
if err != nil { |
1552
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
1553
|
|
|
return |
1554
|
|
|
} |
1555
|
|
|
resp, md, err := local_request_Schema_PartialWrite_0(annotatedContext, inboundMarshaler, server, req, pathParams) |
1556
|
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) |
1557
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
1558
|
|
|
if err != nil { |
1559
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
1560
|
|
|
return |
1561
|
|
|
} |
1562
|
|
|
|
1563
|
|
|
forward_Schema_PartialWrite_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
1564
|
|
|
|
1565
|
|
|
}) |
1566
|
|
|
|
1567
|
|
|
mux.Handle("POST", pattern_Schema_Read_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
1568
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
1569
|
|
|
defer cancel() |
1570
|
|
|
var stream runtime.ServerTransportStream |
1571
|
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) |
1572
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
1573
|
|
|
var err error |
1574
|
|
|
var annotatedContext context.Context |
1575
|
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Schema/Read", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/schemas/read")) |
1576
|
|
|
if err != nil { |
1577
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
1578
|
|
|
return |
1579
|
|
|
} |
1580
|
|
|
resp, md, err := local_request_Schema_Read_0(annotatedContext, inboundMarshaler, server, req, pathParams) |
1581
|
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) |
1582
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
1583
|
|
|
if err != nil { |
1584
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
1585
|
|
|
return |
1586
|
|
|
} |
1587
|
|
|
|
1588
|
|
|
forward_Schema_Read_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
1589
|
|
|
|
1590
|
|
|
}) |
1591
|
|
|
|
1592
|
|
|
mux.Handle("POST", pattern_Schema_List_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
1593
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
1594
|
|
|
defer cancel() |
1595
|
|
|
var stream runtime.ServerTransportStream |
1596
|
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) |
1597
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
1598
|
|
|
var err error |
1599
|
|
|
var annotatedContext context.Context |
1600
|
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Schema/List", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/schemas/list")) |
1601
|
|
|
if err != nil { |
1602
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
1603
|
|
|
return |
1604
|
|
|
} |
1605
|
|
|
resp, md, err := local_request_Schema_List_0(annotatedContext, inboundMarshaler, server, req, pathParams) |
1606
|
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) |
1607
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
1608
|
|
|
if err != nil { |
1609
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
1610
|
|
|
return |
1611
|
|
|
} |
1612
|
|
|
|
1613
|
|
|
forward_Schema_List_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
1614
|
|
|
|
1615
|
|
|
}) |
1616
|
|
|
|
1617
|
|
|
return nil |
1618
|
|
|
} |
1619
|
|
|
|
1620
|
|
|
// RegisterDataHandlerServer registers the http handlers for service Data to "mux". |
1621
|
|
|
// UnaryRPC :call DataServer directly. |
1622
|
|
|
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. |
1623
|
|
|
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterDataHandlerFromEndpoint instead. |
1624
|
|
|
func RegisterDataHandlerServer(ctx context.Context, mux *runtime.ServeMux, server DataServer) error { |
1625
|
|
|
|
1626
|
|
|
mux.Handle("POST", pattern_Data_Write_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
1627
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
1628
|
|
|
defer cancel() |
1629
|
|
|
var stream runtime.ServerTransportStream |
1630
|
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) |
1631
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
1632
|
|
|
var err error |
1633
|
|
|
var annotatedContext context.Context |
1634
|
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Data/Write", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/data/write")) |
1635
|
|
|
if err != nil { |
1636
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
1637
|
|
|
return |
1638
|
|
|
} |
1639
|
|
|
resp, md, err := local_request_Data_Write_0(annotatedContext, inboundMarshaler, server, req, pathParams) |
1640
|
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) |
1641
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
1642
|
|
|
if err != nil { |
1643
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
1644
|
|
|
return |
1645
|
|
|
} |
1646
|
|
|
|
1647
|
|
|
forward_Data_Write_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
1648
|
|
|
|
1649
|
|
|
}) |
1650
|
|
|
|
1651
|
|
|
mux.Handle("POST", pattern_Data_WriteRelationships_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
1652
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
1653
|
|
|
defer cancel() |
1654
|
|
|
var stream runtime.ServerTransportStream |
1655
|
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) |
1656
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
1657
|
|
|
var err error |
1658
|
|
|
var annotatedContext context.Context |
1659
|
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Data/WriteRelationships", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/relationships/write")) |
1660
|
|
|
if err != nil { |
1661
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
1662
|
|
|
return |
1663
|
|
|
} |
1664
|
|
|
resp, md, err := local_request_Data_WriteRelationships_0(annotatedContext, inboundMarshaler, server, req, pathParams) |
1665
|
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) |
1666
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
1667
|
|
|
if err != nil { |
1668
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
1669
|
|
|
return |
1670
|
|
|
} |
1671
|
|
|
|
1672
|
|
|
forward_Data_WriteRelationships_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
1673
|
|
|
|
1674
|
|
|
}) |
1675
|
|
|
|
1676
|
|
|
mux.Handle("POST", pattern_Data_ReadRelationships_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
1677
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
1678
|
|
|
defer cancel() |
1679
|
|
|
var stream runtime.ServerTransportStream |
1680
|
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) |
1681
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
1682
|
|
|
var err error |
1683
|
|
|
var annotatedContext context.Context |
1684
|
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Data/ReadRelationships", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/data/relationships/read")) |
1685
|
|
|
if err != nil { |
1686
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
1687
|
|
|
return |
1688
|
|
|
} |
1689
|
|
|
resp, md, err := local_request_Data_ReadRelationships_0(annotatedContext, inboundMarshaler, server, req, pathParams) |
1690
|
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) |
1691
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
1692
|
|
|
if err != nil { |
1693
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
1694
|
|
|
return |
1695
|
|
|
} |
1696
|
|
|
|
1697
|
|
|
forward_Data_ReadRelationships_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
1698
|
|
|
|
1699
|
|
|
}) |
1700
|
|
|
|
1701
|
|
|
mux.Handle("POST", pattern_Data_ReadAttributes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
1702
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
1703
|
|
|
defer cancel() |
1704
|
|
|
var stream runtime.ServerTransportStream |
1705
|
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) |
1706
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
1707
|
|
|
var err error |
1708
|
|
|
var annotatedContext context.Context |
1709
|
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Data/ReadAttributes", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/data/attributes/read")) |
1710
|
|
|
if err != nil { |
1711
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
1712
|
|
|
return |
1713
|
|
|
} |
1714
|
|
|
resp, md, err := local_request_Data_ReadAttributes_0(annotatedContext, inboundMarshaler, server, req, pathParams) |
1715
|
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) |
1716
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
1717
|
|
|
if err != nil { |
1718
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
1719
|
|
|
return |
1720
|
|
|
} |
1721
|
|
|
|
1722
|
|
|
forward_Data_ReadAttributes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
1723
|
|
|
|
1724
|
|
|
}) |
1725
|
|
|
|
1726
|
|
|
mux.Handle("POST", pattern_Data_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
1727
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
1728
|
|
|
defer cancel() |
1729
|
|
|
var stream runtime.ServerTransportStream |
1730
|
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) |
1731
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
1732
|
|
|
var err error |
1733
|
|
|
var annotatedContext context.Context |
1734
|
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Data/Delete", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/data/delete")) |
1735
|
|
|
if err != nil { |
1736
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
1737
|
|
|
return |
1738
|
|
|
} |
1739
|
|
|
resp, md, err := local_request_Data_Delete_0(annotatedContext, inboundMarshaler, server, req, pathParams) |
1740
|
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) |
1741
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
1742
|
|
|
if err != nil { |
1743
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
1744
|
|
|
return |
1745
|
|
|
} |
1746
|
|
|
|
1747
|
|
|
forward_Data_Delete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
1748
|
|
|
|
1749
|
|
|
}) |
1750
|
|
|
|
1751
|
|
|
mux.Handle("POST", pattern_Data_DeleteRelationships_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
1752
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
1753
|
|
|
defer cancel() |
1754
|
|
|
var stream runtime.ServerTransportStream |
1755
|
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) |
1756
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
1757
|
|
|
var err error |
1758
|
|
|
var annotatedContext context.Context |
1759
|
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Data/DeleteRelationships", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/relationships/delete")) |
1760
|
|
|
if err != nil { |
1761
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
1762
|
|
|
return |
1763
|
|
|
} |
1764
|
|
|
resp, md, err := local_request_Data_DeleteRelationships_0(annotatedContext, inboundMarshaler, server, req, pathParams) |
1765
|
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) |
1766
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
1767
|
|
|
if err != nil { |
1768
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
1769
|
|
|
return |
1770
|
|
|
} |
1771
|
|
|
|
1772
|
|
|
forward_Data_DeleteRelationships_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
1773
|
|
|
|
1774
|
|
|
}) |
1775
|
|
|
|
1776
|
|
|
mux.Handle("POST", pattern_Data_RunBundle_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
1777
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
1778
|
|
|
defer cancel() |
1779
|
|
|
var stream runtime.ServerTransportStream |
1780
|
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) |
1781
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
1782
|
|
|
var err error |
1783
|
|
|
var annotatedContext context.Context |
1784
|
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Data/RunBundle", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/data/run-bundle")) |
1785
|
|
|
if err != nil { |
1786
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
1787
|
|
|
return |
1788
|
|
|
} |
1789
|
|
|
resp, md, err := local_request_Data_RunBundle_0(annotatedContext, inboundMarshaler, server, req, pathParams) |
1790
|
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) |
1791
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
1792
|
|
|
if err != nil { |
1793
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
1794
|
|
|
return |
1795
|
|
|
} |
1796
|
|
|
|
1797
|
|
|
forward_Data_RunBundle_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
1798
|
|
|
|
1799
|
|
|
}) |
1800
|
|
|
|
1801
|
|
|
return nil |
1802
|
|
|
} |
1803
|
|
|
|
1804
|
|
|
// RegisterBundleHandlerServer registers the http handlers for service Bundle to "mux". |
1805
|
|
|
// UnaryRPC :call BundleServer directly. |
1806
|
|
|
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. |
1807
|
|
|
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterBundleHandlerFromEndpoint instead. |
1808
|
|
|
func RegisterBundleHandlerServer(ctx context.Context, mux *runtime.ServeMux, server BundleServer) error { |
1809
|
|
|
|
1810
|
|
|
mux.Handle("POST", pattern_Bundle_Write_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
1811
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
1812
|
|
|
defer cancel() |
1813
|
|
|
var stream runtime.ServerTransportStream |
1814
|
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) |
1815
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
1816
|
|
|
var err error |
1817
|
|
|
var annotatedContext context.Context |
1818
|
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Bundle/Write", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/bundle/write")) |
1819
|
|
|
if err != nil { |
1820
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
1821
|
|
|
return |
1822
|
|
|
} |
1823
|
|
|
resp, md, err := local_request_Bundle_Write_0(annotatedContext, inboundMarshaler, server, req, pathParams) |
1824
|
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) |
1825
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
1826
|
|
|
if err != nil { |
1827
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
1828
|
|
|
return |
1829
|
|
|
} |
1830
|
|
|
|
1831
|
|
|
forward_Bundle_Write_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
1832
|
|
|
|
1833
|
|
|
}) |
1834
|
|
|
|
1835
|
|
|
mux.Handle("POST", pattern_Bundle_Read_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
1836
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
1837
|
|
|
defer cancel() |
1838
|
|
|
var stream runtime.ServerTransportStream |
1839
|
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) |
1840
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
1841
|
|
|
var err error |
1842
|
|
|
var annotatedContext context.Context |
1843
|
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Bundle/Read", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/bundle/read")) |
1844
|
|
|
if err != nil { |
1845
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
1846
|
|
|
return |
1847
|
|
|
} |
1848
|
|
|
resp, md, err := local_request_Bundle_Read_0(annotatedContext, inboundMarshaler, server, req, pathParams) |
1849
|
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) |
1850
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
1851
|
|
|
if err != nil { |
1852
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
1853
|
|
|
return |
1854
|
|
|
} |
1855
|
|
|
|
1856
|
|
|
forward_Bundle_Read_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
1857
|
|
|
|
1858
|
|
|
}) |
1859
|
|
|
|
1860
|
|
|
mux.Handle("POST", pattern_Bundle_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
1861
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
1862
|
|
|
defer cancel() |
1863
|
|
|
var stream runtime.ServerTransportStream |
1864
|
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) |
1865
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
1866
|
|
|
var err error |
1867
|
|
|
var annotatedContext context.Context |
1868
|
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Bundle/Delete", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/bundle/delete")) |
1869
|
|
|
if err != nil { |
1870
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
1871
|
|
|
return |
1872
|
|
|
} |
1873
|
|
|
resp, md, err := local_request_Bundle_Delete_0(annotatedContext, inboundMarshaler, server, req, pathParams) |
1874
|
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) |
1875
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
1876
|
|
|
if err != nil { |
1877
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
1878
|
|
|
return |
1879
|
|
|
} |
1880
|
|
|
|
1881
|
|
|
forward_Bundle_Delete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
1882
|
|
|
|
1883
|
|
|
}) |
1884
|
|
|
|
1885
|
|
|
return nil |
1886
|
|
|
} |
1887
|
|
|
|
1888
|
|
|
// RegisterTenancyHandlerServer registers the http handlers for service Tenancy to "mux". |
1889
|
|
|
// UnaryRPC :call TenancyServer directly. |
1890
|
|
|
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. |
1891
|
|
|
// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterTenancyHandlerFromEndpoint instead. |
1892
|
|
|
func RegisterTenancyHandlerServer(ctx context.Context, mux *runtime.ServeMux, server TenancyServer) error { |
1893
|
|
|
|
1894
|
|
|
mux.Handle("POST", pattern_Tenancy_Create_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
1895
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
1896
|
|
|
defer cancel() |
1897
|
|
|
var stream runtime.ServerTransportStream |
1898
|
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) |
1899
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
1900
|
|
|
var err error |
1901
|
|
|
var annotatedContext context.Context |
1902
|
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Tenancy/Create", runtime.WithHTTPPathPattern("/v1/tenants/create")) |
1903
|
|
|
if err != nil { |
1904
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
1905
|
|
|
return |
1906
|
|
|
} |
1907
|
|
|
resp, md, err := local_request_Tenancy_Create_0(annotatedContext, inboundMarshaler, server, req, pathParams) |
1908
|
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) |
1909
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
1910
|
|
|
if err != nil { |
1911
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
1912
|
|
|
return |
1913
|
|
|
} |
1914
|
|
|
|
1915
|
|
|
forward_Tenancy_Create_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
1916
|
|
|
|
1917
|
|
|
}) |
1918
|
|
|
|
1919
|
|
|
mux.Handle("DELETE", pattern_Tenancy_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
1920
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
1921
|
|
|
defer cancel() |
1922
|
|
|
var stream runtime.ServerTransportStream |
1923
|
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) |
1924
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
1925
|
|
|
var err error |
1926
|
|
|
var annotatedContext context.Context |
1927
|
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Tenancy/Delete", runtime.WithHTTPPathPattern("/v1/tenants/{id}")) |
1928
|
|
|
if err != nil { |
1929
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
1930
|
|
|
return |
1931
|
|
|
} |
1932
|
|
|
resp, md, err := local_request_Tenancy_Delete_0(annotatedContext, inboundMarshaler, server, req, pathParams) |
1933
|
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) |
1934
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
1935
|
|
|
if err != nil { |
1936
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
1937
|
|
|
return |
1938
|
|
|
} |
1939
|
|
|
|
1940
|
|
|
forward_Tenancy_Delete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
1941
|
|
|
|
1942
|
|
|
}) |
1943
|
|
|
|
1944
|
|
|
mux.Handle("POST", pattern_Tenancy_List_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
1945
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
1946
|
|
|
defer cancel() |
1947
|
|
|
var stream runtime.ServerTransportStream |
1948
|
|
|
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) |
1949
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
1950
|
|
|
var err error |
1951
|
|
|
var annotatedContext context.Context |
1952
|
|
|
annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/base.v1.Tenancy/List", runtime.WithHTTPPathPattern("/v1/tenants/list")) |
1953
|
|
|
if err != nil { |
1954
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
1955
|
|
|
return |
1956
|
|
|
} |
1957
|
|
|
resp, md, err := local_request_Tenancy_List_0(annotatedContext, inboundMarshaler, server, req, pathParams) |
1958
|
|
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) |
1959
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
1960
|
|
|
if err != nil { |
1961
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
1962
|
|
|
return |
1963
|
|
|
} |
1964
|
|
|
|
1965
|
|
|
forward_Tenancy_List_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
1966
|
|
|
|
1967
|
|
|
}) |
1968
|
|
|
|
1969
|
|
|
return nil |
1970
|
|
|
} |
1971
|
|
|
|
1972
|
|
|
// RegisterPermissionHandlerFromEndpoint is same as RegisterPermissionHandler but |
1973
|
|
|
// automatically dials to "endpoint" and closes the connection when "ctx" gets done. |
1974
|
|
|
func RegisterPermissionHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { |
1975
|
|
|
conn, err := grpc.NewClient(endpoint, opts...) |
1976
|
|
|
if err != nil { |
1977
|
|
|
return err |
1978
|
|
|
} |
1979
|
|
|
defer func() { |
1980
|
|
|
if err != nil { |
1981
|
|
|
if cerr := conn.Close(); cerr != nil { |
1982
|
|
|
grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) |
1983
|
|
|
} |
1984
|
|
|
return |
1985
|
|
|
} |
1986
|
|
|
go func() { |
1987
|
|
|
<-ctx.Done() |
1988
|
|
|
if cerr := conn.Close(); cerr != nil { |
1989
|
|
|
grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) |
1990
|
|
|
} |
1991
|
|
|
}() |
1992
|
|
|
}() |
1993
|
|
|
|
1994
|
|
|
return RegisterPermissionHandler(ctx, mux, conn) |
1995
|
|
|
} |
1996
|
|
|
|
1997
|
|
|
// RegisterPermissionHandler registers the http handlers for service Permission to "mux". |
1998
|
|
|
// The handlers forward requests to the grpc endpoint over "conn". |
1999
|
|
|
func RegisterPermissionHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { |
2000
|
|
|
return RegisterPermissionHandlerClient(ctx, mux, NewPermissionClient(conn)) |
2001
|
|
|
} |
2002
|
|
|
|
2003
|
|
|
// RegisterPermissionHandlerClient registers the http handlers for service Permission |
2004
|
|
|
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "PermissionClient". |
2005
|
|
|
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "PermissionClient" |
2006
|
|
|
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in |
2007
|
|
|
// "PermissionClient" to call the correct interceptors. |
2008
|
|
|
func RegisterPermissionHandlerClient(ctx context.Context, mux *runtime.ServeMux, client PermissionClient) error { |
2009
|
|
|
|
2010
|
|
|
mux.Handle("POST", pattern_Permission_Check_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
2011
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
2012
|
|
|
defer cancel() |
2013
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
2014
|
|
|
var err error |
2015
|
|
|
var annotatedContext context.Context |
2016
|
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/base.v1.Permission/Check", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/permissions/check")) |
2017
|
|
|
if err != nil { |
2018
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
2019
|
|
|
return |
2020
|
|
|
} |
2021
|
|
|
resp, md, err := request_Permission_Check_0(annotatedContext, inboundMarshaler, client, req, pathParams) |
2022
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
2023
|
|
|
if err != nil { |
2024
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
2025
|
|
|
return |
2026
|
|
|
} |
2027
|
|
|
|
2028
|
|
|
forward_Permission_Check_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
2029
|
|
|
|
2030
|
|
|
}) |
2031
|
|
|
|
2032
|
|
|
mux.Handle("POST", pattern_Permission_Expand_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
2033
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
2034
|
|
|
defer cancel() |
2035
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
2036
|
|
|
var err error |
2037
|
|
|
var annotatedContext context.Context |
2038
|
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/base.v1.Permission/Expand", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/permissions/expand")) |
2039
|
|
|
if err != nil { |
2040
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
2041
|
|
|
return |
2042
|
|
|
} |
2043
|
|
|
resp, md, err := request_Permission_Expand_0(annotatedContext, inboundMarshaler, client, req, pathParams) |
2044
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
2045
|
|
|
if err != nil { |
2046
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
2047
|
|
|
return |
2048
|
|
|
} |
2049
|
|
|
|
2050
|
|
|
forward_Permission_Expand_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
2051
|
|
|
|
2052
|
|
|
}) |
2053
|
|
|
|
2054
|
|
|
mux.Handle("POST", pattern_Permission_LookupEntity_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
2055
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
2056
|
|
|
defer cancel() |
2057
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
2058
|
|
|
var err error |
2059
|
|
|
var annotatedContext context.Context |
2060
|
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/base.v1.Permission/LookupEntity", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/permissions/lookup-entity")) |
2061
|
|
|
if err != nil { |
2062
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
2063
|
|
|
return |
2064
|
|
|
} |
2065
|
|
|
resp, md, err := request_Permission_LookupEntity_0(annotatedContext, inboundMarshaler, client, req, pathParams) |
2066
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
2067
|
|
|
if err != nil { |
2068
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
2069
|
|
|
return |
2070
|
|
|
} |
2071
|
|
|
|
2072
|
|
|
forward_Permission_LookupEntity_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
2073
|
|
|
|
2074
|
|
|
}) |
2075
|
|
|
|
2076
|
|
|
mux.Handle("POST", pattern_Permission_LookupEntityStream_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
2077
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
2078
|
|
|
defer cancel() |
2079
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
2080
|
|
|
var err error |
2081
|
|
|
var annotatedContext context.Context |
2082
|
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/base.v1.Permission/LookupEntityStream", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/permissions/lookup-entity-stream")) |
2083
|
|
|
if err != nil { |
2084
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
2085
|
|
|
return |
2086
|
|
|
} |
2087
|
|
|
resp, md, err := request_Permission_LookupEntityStream_0(annotatedContext, inboundMarshaler, client, req, pathParams) |
2088
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
2089
|
|
|
if err != nil { |
2090
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
2091
|
|
|
return |
2092
|
|
|
} |
2093
|
|
|
|
2094
|
|
|
forward_Permission_LookupEntityStream_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) |
2095
|
|
|
|
2096
|
|
|
}) |
2097
|
|
|
|
2098
|
|
|
mux.Handle("POST", pattern_Permission_LookupSubject_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
2099
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
2100
|
|
|
defer cancel() |
2101
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
2102
|
|
|
var err error |
2103
|
|
|
var annotatedContext context.Context |
2104
|
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/base.v1.Permission/LookupSubject", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/permissions/lookup-subject")) |
2105
|
|
|
if err != nil { |
2106
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
2107
|
|
|
return |
2108
|
|
|
} |
2109
|
|
|
resp, md, err := request_Permission_LookupSubject_0(annotatedContext, inboundMarshaler, client, req, pathParams) |
2110
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
2111
|
|
|
if err != nil { |
2112
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
2113
|
|
|
return |
2114
|
|
|
} |
2115
|
|
|
|
2116
|
|
|
forward_Permission_LookupSubject_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
2117
|
|
|
|
2118
|
|
|
}) |
2119
|
|
|
|
2120
|
|
|
mux.Handle("POST", pattern_Permission_SubjectPermission_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
2121
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
2122
|
|
|
defer cancel() |
2123
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
2124
|
|
|
var err error |
2125
|
|
|
var annotatedContext context.Context |
2126
|
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/base.v1.Permission/SubjectPermission", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/permissions/subject-permission")) |
2127
|
|
|
if err != nil { |
2128
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
2129
|
|
|
return |
2130
|
|
|
} |
2131
|
|
|
resp, md, err := request_Permission_SubjectPermission_0(annotatedContext, inboundMarshaler, client, req, pathParams) |
2132
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
2133
|
|
|
if err != nil { |
2134
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
2135
|
|
|
return |
2136
|
|
|
} |
2137
|
|
|
|
2138
|
|
|
forward_Permission_SubjectPermission_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
2139
|
|
|
|
2140
|
|
|
}) |
2141
|
|
|
|
2142
|
|
|
return nil |
2143
|
|
|
} |
2144
|
|
|
|
2145
|
|
|
var ( |
2146
|
|
|
pattern_Permission_Check_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "tenants", "tenant_id", "permissions", "check"}, "")) |
2147
|
|
|
|
2148
|
|
|
pattern_Permission_Expand_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "tenants", "tenant_id", "permissions", "expand"}, "")) |
2149
|
|
|
|
2150
|
|
|
pattern_Permission_LookupEntity_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "tenants", "tenant_id", "permissions", "lookup-entity"}, "")) |
2151
|
|
|
|
2152
|
|
|
pattern_Permission_LookupEntityStream_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "tenants", "tenant_id", "permissions", "lookup-entity-stream"}, "")) |
2153
|
|
|
|
2154
|
|
|
pattern_Permission_LookupSubject_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "tenants", "tenant_id", "permissions", "lookup-subject"}, "")) |
2155
|
|
|
|
2156
|
|
|
pattern_Permission_SubjectPermission_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "tenants", "tenant_id", "permissions", "subject-permission"}, "")) |
2157
|
|
|
) |
2158
|
|
|
|
2159
|
|
|
var ( |
2160
|
|
|
forward_Permission_Check_0 = runtime.ForwardResponseMessage |
2161
|
|
|
|
2162
|
|
|
forward_Permission_Expand_0 = runtime.ForwardResponseMessage |
2163
|
|
|
|
2164
|
|
|
forward_Permission_LookupEntity_0 = runtime.ForwardResponseMessage |
2165
|
|
|
|
2166
|
|
|
forward_Permission_LookupEntityStream_0 = runtime.ForwardResponseStream |
2167
|
|
|
|
2168
|
|
|
forward_Permission_LookupSubject_0 = runtime.ForwardResponseMessage |
2169
|
|
|
|
2170
|
|
|
forward_Permission_SubjectPermission_0 = runtime.ForwardResponseMessage |
2171
|
|
|
) |
2172
|
|
|
|
2173
|
|
|
// RegisterWatchHandlerFromEndpoint is same as RegisterWatchHandler but |
2174
|
|
|
// automatically dials to "endpoint" and closes the connection when "ctx" gets done. |
2175
|
|
|
func RegisterWatchHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { |
2176
|
|
|
conn, err := grpc.NewClient(endpoint, opts...) |
2177
|
|
|
if err != nil { |
2178
|
|
|
return err |
2179
|
|
|
} |
2180
|
|
|
defer func() { |
2181
|
|
|
if err != nil { |
2182
|
|
|
if cerr := conn.Close(); cerr != nil { |
2183
|
|
|
grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) |
2184
|
|
|
} |
2185
|
|
|
return |
2186
|
|
|
} |
2187
|
|
|
go func() { |
2188
|
|
|
<-ctx.Done() |
2189
|
|
|
if cerr := conn.Close(); cerr != nil { |
2190
|
|
|
grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) |
2191
|
|
|
} |
2192
|
|
|
}() |
2193
|
|
|
}() |
2194
|
|
|
|
2195
|
|
|
return RegisterWatchHandler(ctx, mux, conn) |
2196
|
|
|
} |
2197
|
|
|
|
2198
|
|
|
// RegisterWatchHandler registers the http handlers for service Watch to "mux". |
2199
|
|
|
// The handlers forward requests to the grpc endpoint over "conn". |
2200
|
|
|
func RegisterWatchHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { |
2201
|
|
|
return RegisterWatchHandlerClient(ctx, mux, NewWatchClient(conn)) |
2202
|
|
|
} |
2203
|
|
|
|
2204
|
|
|
// RegisterWatchHandlerClient registers the http handlers for service Watch |
2205
|
|
|
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "WatchClient". |
2206
|
|
|
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "WatchClient" |
2207
|
|
|
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in |
2208
|
|
|
// "WatchClient" to call the correct interceptors. |
2209
|
|
|
func RegisterWatchHandlerClient(ctx context.Context, mux *runtime.ServeMux, client WatchClient) error { |
2210
|
|
|
|
2211
|
|
|
mux.Handle("POST", pattern_Watch_Watch_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
2212
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
2213
|
|
|
defer cancel() |
2214
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
2215
|
|
|
var err error |
2216
|
|
|
var annotatedContext context.Context |
2217
|
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/base.v1.Watch/Watch", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/watch")) |
2218
|
|
|
if err != nil { |
2219
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
2220
|
|
|
return |
2221
|
|
|
} |
2222
|
|
|
resp, md, err := request_Watch_Watch_0(annotatedContext, inboundMarshaler, client, req, pathParams) |
2223
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
2224
|
|
|
if err != nil { |
2225
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
2226
|
|
|
return |
2227
|
|
|
} |
2228
|
|
|
|
2229
|
|
|
forward_Watch_Watch_0(annotatedContext, mux, outboundMarshaler, w, req, func() (proto.Message, error) { return resp.Recv() }, mux.GetForwardResponseOptions()...) |
2230
|
|
|
|
2231
|
|
|
}) |
2232
|
|
|
|
2233
|
|
|
return nil |
2234
|
|
|
} |
2235
|
|
|
|
2236
|
|
|
var ( |
2237
|
|
|
pattern_Watch_Watch_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"v1", "tenants", "tenant_id", "watch"}, "")) |
2238
|
|
|
) |
2239
|
|
|
|
2240
|
|
|
var ( |
2241
|
|
|
forward_Watch_Watch_0 = runtime.ForwardResponseStream |
2242
|
|
|
) |
2243
|
|
|
|
2244
|
|
|
// RegisterSchemaHandlerFromEndpoint is same as RegisterSchemaHandler but |
2245
|
|
|
// automatically dials to "endpoint" and closes the connection when "ctx" gets done. |
2246
|
|
|
func RegisterSchemaHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { |
2247
|
|
|
conn, err := grpc.NewClient(endpoint, opts...) |
2248
|
|
|
if err != nil { |
2249
|
|
|
return err |
2250
|
|
|
} |
2251
|
|
|
defer func() { |
2252
|
|
|
if err != nil { |
2253
|
|
|
if cerr := conn.Close(); cerr != nil { |
2254
|
|
|
grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) |
2255
|
|
|
} |
2256
|
|
|
return |
2257
|
|
|
} |
2258
|
|
|
go func() { |
2259
|
|
|
<-ctx.Done() |
2260
|
|
|
if cerr := conn.Close(); cerr != nil { |
2261
|
|
|
grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) |
2262
|
|
|
} |
2263
|
|
|
}() |
2264
|
|
|
}() |
2265
|
|
|
|
2266
|
|
|
return RegisterSchemaHandler(ctx, mux, conn) |
2267
|
|
|
} |
2268
|
|
|
|
2269
|
|
|
// RegisterSchemaHandler registers the http handlers for service Schema to "mux". |
2270
|
|
|
// The handlers forward requests to the grpc endpoint over "conn". |
2271
|
|
|
func RegisterSchemaHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { |
2272
|
|
|
return RegisterSchemaHandlerClient(ctx, mux, NewSchemaClient(conn)) |
2273
|
|
|
} |
2274
|
|
|
|
2275
|
|
|
// RegisterSchemaHandlerClient registers the http handlers for service Schema |
2276
|
|
|
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SchemaClient". |
2277
|
|
|
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SchemaClient" |
2278
|
|
|
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in |
2279
|
|
|
// "SchemaClient" to call the correct interceptors. |
2280
|
|
|
func RegisterSchemaHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SchemaClient) error { |
2281
|
|
|
|
2282
|
|
|
mux.Handle("POST", pattern_Schema_Write_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
2283
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
2284
|
|
|
defer cancel() |
2285
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
2286
|
|
|
var err error |
2287
|
|
|
var annotatedContext context.Context |
2288
|
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/base.v1.Schema/Write", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/schemas/write")) |
2289
|
|
|
if err != nil { |
2290
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
2291
|
|
|
return |
2292
|
|
|
} |
2293
|
|
|
resp, md, err := request_Schema_Write_0(annotatedContext, inboundMarshaler, client, req, pathParams) |
2294
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
2295
|
|
|
if err != nil { |
2296
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
2297
|
|
|
return |
2298
|
|
|
} |
2299
|
|
|
|
2300
|
|
|
forward_Schema_Write_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
2301
|
|
|
|
2302
|
|
|
}) |
2303
|
|
|
|
2304
|
|
|
mux.Handle("PATCH", pattern_Schema_PartialWrite_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
2305
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
2306
|
|
|
defer cancel() |
2307
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
2308
|
|
|
var err error |
2309
|
|
|
var annotatedContext context.Context |
2310
|
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/base.v1.Schema/PartialWrite", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/schemas/partial-write")) |
2311
|
|
|
if err != nil { |
2312
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
2313
|
|
|
return |
2314
|
|
|
} |
2315
|
|
|
resp, md, err := request_Schema_PartialWrite_0(annotatedContext, inboundMarshaler, client, req, pathParams) |
2316
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
2317
|
|
|
if err != nil { |
2318
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
2319
|
|
|
return |
2320
|
|
|
} |
2321
|
|
|
|
2322
|
|
|
forward_Schema_PartialWrite_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
2323
|
|
|
|
2324
|
|
|
}) |
2325
|
|
|
|
2326
|
|
|
mux.Handle("POST", pattern_Schema_Read_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
2327
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
2328
|
|
|
defer cancel() |
2329
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
2330
|
|
|
var err error |
2331
|
|
|
var annotatedContext context.Context |
2332
|
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/base.v1.Schema/Read", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/schemas/read")) |
2333
|
|
|
if err != nil { |
2334
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
2335
|
|
|
return |
2336
|
|
|
} |
2337
|
|
|
resp, md, err := request_Schema_Read_0(annotatedContext, inboundMarshaler, client, req, pathParams) |
2338
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
2339
|
|
|
if err != nil { |
2340
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
2341
|
|
|
return |
2342
|
|
|
} |
2343
|
|
|
|
2344
|
|
|
forward_Schema_Read_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
2345
|
|
|
|
2346
|
|
|
}) |
2347
|
|
|
|
2348
|
|
|
mux.Handle("POST", pattern_Schema_List_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
2349
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
2350
|
|
|
defer cancel() |
2351
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
2352
|
|
|
var err error |
2353
|
|
|
var annotatedContext context.Context |
2354
|
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/base.v1.Schema/List", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/schemas/list")) |
2355
|
|
|
if err != nil { |
2356
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
2357
|
|
|
return |
2358
|
|
|
} |
2359
|
|
|
resp, md, err := request_Schema_List_0(annotatedContext, inboundMarshaler, client, req, pathParams) |
2360
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
2361
|
|
|
if err != nil { |
2362
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
2363
|
|
|
return |
2364
|
|
|
} |
2365
|
|
|
|
2366
|
|
|
forward_Schema_List_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
2367
|
|
|
|
2368
|
|
|
}) |
2369
|
|
|
|
2370
|
|
|
return nil |
2371
|
|
|
} |
2372
|
|
|
|
2373
|
|
|
var ( |
2374
|
|
|
pattern_Schema_Write_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "tenants", "tenant_id", "schemas", "write"}, "")) |
2375
|
|
|
|
2376
|
|
|
pattern_Schema_PartialWrite_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "tenants", "tenant_id", "schemas", "partial-write"}, "")) |
2377
|
|
|
|
2378
|
|
|
pattern_Schema_Read_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "tenants", "tenant_id", "schemas", "read"}, "")) |
2379
|
|
|
|
2380
|
|
|
pattern_Schema_List_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "tenants", "tenant_id", "schemas", "list"}, "")) |
2381
|
|
|
) |
2382
|
|
|
|
2383
|
|
|
var ( |
2384
|
|
|
forward_Schema_Write_0 = runtime.ForwardResponseMessage |
2385
|
|
|
|
2386
|
|
|
forward_Schema_PartialWrite_0 = runtime.ForwardResponseMessage |
2387
|
|
|
|
2388
|
|
|
forward_Schema_Read_0 = runtime.ForwardResponseMessage |
2389
|
|
|
|
2390
|
|
|
forward_Schema_List_0 = runtime.ForwardResponseMessage |
2391
|
|
|
) |
2392
|
|
|
|
2393
|
|
|
// RegisterDataHandlerFromEndpoint is same as RegisterDataHandler but |
2394
|
|
|
// automatically dials to "endpoint" and closes the connection when "ctx" gets done. |
2395
|
|
|
func RegisterDataHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { |
2396
|
|
|
conn, err := grpc.NewClient(endpoint, opts...) |
2397
|
|
|
if err != nil { |
2398
|
|
|
return err |
2399
|
|
|
} |
2400
|
|
|
defer func() { |
2401
|
|
|
if err != nil { |
2402
|
|
|
if cerr := conn.Close(); cerr != nil { |
2403
|
|
|
grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) |
2404
|
|
|
} |
2405
|
|
|
return |
2406
|
|
|
} |
2407
|
|
|
go func() { |
2408
|
|
|
<-ctx.Done() |
2409
|
|
|
if cerr := conn.Close(); cerr != nil { |
2410
|
|
|
grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) |
2411
|
|
|
} |
2412
|
|
|
}() |
2413
|
|
|
}() |
2414
|
|
|
|
2415
|
|
|
return RegisterDataHandler(ctx, mux, conn) |
2416
|
|
|
} |
2417
|
|
|
|
2418
|
|
|
// RegisterDataHandler registers the http handlers for service Data to "mux". |
2419
|
|
|
// The handlers forward requests to the grpc endpoint over "conn". |
2420
|
|
|
func RegisterDataHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { |
2421
|
|
|
return RegisterDataHandlerClient(ctx, mux, NewDataClient(conn)) |
2422
|
|
|
} |
2423
|
|
|
|
2424
|
|
|
// RegisterDataHandlerClient registers the http handlers for service Data |
2425
|
|
|
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "DataClient". |
2426
|
|
|
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "DataClient" |
2427
|
|
|
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in |
2428
|
|
|
// "DataClient" to call the correct interceptors. |
2429
|
|
|
func RegisterDataHandlerClient(ctx context.Context, mux *runtime.ServeMux, client DataClient) error { |
2430
|
|
|
|
2431
|
|
|
mux.Handle("POST", pattern_Data_Write_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
2432
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
2433
|
|
|
defer cancel() |
2434
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
2435
|
|
|
var err error |
2436
|
|
|
var annotatedContext context.Context |
2437
|
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/base.v1.Data/Write", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/data/write")) |
2438
|
|
|
if err != nil { |
2439
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
2440
|
|
|
return |
2441
|
|
|
} |
2442
|
|
|
resp, md, err := request_Data_Write_0(annotatedContext, inboundMarshaler, client, req, pathParams) |
2443
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
2444
|
|
|
if err != nil { |
2445
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
2446
|
|
|
return |
2447
|
|
|
} |
2448
|
|
|
|
2449
|
|
|
forward_Data_Write_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
2450
|
|
|
|
2451
|
|
|
}) |
2452
|
|
|
|
2453
|
|
|
mux.Handle("POST", pattern_Data_WriteRelationships_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
2454
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
2455
|
|
|
defer cancel() |
2456
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
2457
|
|
|
var err error |
2458
|
|
|
var annotatedContext context.Context |
2459
|
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/base.v1.Data/WriteRelationships", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/relationships/write")) |
2460
|
|
|
if err != nil { |
2461
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
2462
|
|
|
return |
2463
|
|
|
} |
2464
|
|
|
resp, md, err := request_Data_WriteRelationships_0(annotatedContext, inboundMarshaler, client, req, pathParams) |
2465
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
2466
|
|
|
if err != nil { |
2467
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
2468
|
|
|
return |
2469
|
|
|
} |
2470
|
|
|
|
2471
|
|
|
forward_Data_WriteRelationships_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
2472
|
|
|
|
2473
|
|
|
}) |
2474
|
|
|
|
2475
|
|
|
mux.Handle("POST", pattern_Data_ReadRelationships_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
2476
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
2477
|
|
|
defer cancel() |
2478
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
2479
|
|
|
var err error |
2480
|
|
|
var annotatedContext context.Context |
2481
|
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/base.v1.Data/ReadRelationships", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/data/relationships/read")) |
2482
|
|
|
if err != nil { |
2483
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
2484
|
|
|
return |
2485
|
|
|
} |
2486
|
|
|
resp, md, err := request_Data_ReadRelationships_0(annotatedContext, inboundMarshaler, client, req, pathParams) |
2487
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
2488
|
|
|
if err != nil { |
2489
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
2490
|
|
|
return |
2491
|
|
|
} |
2492
|
|
|
|
2493
|
|
|
forward_Data_ReadRelationships_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
2494
|
|
|
|
2495
|
|
|
}) |
2496
|
|
|
|
2497
|
|
|
mux.Handle("POST", pattern_Data_ReadAttributes_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
2498
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
2499
|
|
|
defer cancel() |
2500
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
2501
|
|
|
var err error |
2502
|
|
|
var annotatedContext context.Context |
2503
|
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/base.v1.Data/ReadAttributes", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/data/attributes/read")) |
2504
|
|
|
if err != nil { |
2505
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
2506
|
|
|
return |
2507
|
|
|
} |
2508
|
|
|
resp, md, err := request_Data_ReadAttributes_0(annotatedContext, inboundMarshaler, client, req, pathParams) |
2509
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
2510
|
|
|
if err != nil { |
2511
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
2512
|
|
|
return |
2513
|
|
|
} |
2514
|
|
|
|
2515
|
|
|
forward_Data_ReadAttributes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
2516
|
|
|
|
2517
|
|
|
}) |
2518
|
|
|
|
2519
|
|
|
mux.Handle("POST", pattern_Data_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
2520
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
2521
|
|
|
defer cancel() |
2522
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
2523
|
|
|
var err error |
2524
|
|
|
var annotatedContext context.Context |
2525
|
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/base.v1.Data/Delete", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/data/delete")) |
2526
|
|
|
if err != nil { |
2527
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
2528
|
|
|
return |
2529
|
|
|
} |
2530
|
|
|
resp, md, err := request_Data_Delete_0(annotatedContext, inboundMarshaler, client, req, pathParams) |
2531
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
2532
|
|
|
if err != nil { |
2533
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
2534
|
|
|
return |
2535
|
|
|
} |
2536
|
|
|
|
2537
|
|
|
forward_Data_Delete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
2538
|
|
|
|
2539
|
|
|
}) |
2540
|
|
|
|
2541
|
|
|
mux.Handle("POST", pattern_Data_DeleteRelationships_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
2542
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
2543
|
|
|
defer cancel() |
2544
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
2545
|
|
|
var err error |
2546
|
|
|
var annotatedContext context.Context |
2547
|
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/base.v1.Data/DeleteRelationships", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/relationships/delete")) |
2548
|
|
|
if err != nil { |
2549
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
2550
|
|
|
return |
2551
|
|
|
} |
2552
|
|
|
resp, md, err := request_Data_DeleteRelationships_0(annotatedContext, inboundMarshaler, client, req, pathParams) |
2553
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
2554
|
|
|
if err != nil { |
2555
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
2556
|
|
|
return |
2557
|
|
|
} |
2558
|
|
|
|
2559
|
|
|
forward_Data_DeleteRelationships_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
2560
|
|
|
|
2561
|
|
|
}) |
2562
|
|
|
|
2563
|
|
|
mux.Handle("POST", pattern_Data_RunBundle_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
2564
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
2565
|
|
|
defer cancel() |
2566
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
2567
|
|
|
var err error |
2568
|
|
|
var annotatedContext context.Context |
2569
|
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/base.v1.Data/RunBundle", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/data/run-bundle")) |
2570
|
|
|
if err != nil { |
2571
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
2572
|
|
|
return |
2573
|
|
|
} |
2574
|
|
|
resp, md, err := request_Data_RunBundle_0(annotatedContext, inboundMarshaler, client, req, pathParams) |
2575
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
2576
|
|
|
if err != nil { |
2577
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
2578
|
|
|
return |
2579
|
|
|
} |
2580
|
|
|
|
2581
|
|
|
forward_Data_RunBundle_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
2582
|
|
|
|
2583
|
|
|
}) |
2584
|
|
|
|
2585
|
|
|
return nil |
2586
|
|
|
} |
2587
|
|
|
|
2588
|
|
|
var ( |
2589
|
|
|
pattern_Data_Write_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "tenants", "tenant_id", "data", "write"}, "")) |
2590
|
|
|
|
2591
|
|
|
pattern_Data_WriteRelationships_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "tenants", "tenant_id", "relationships", "write"}, "")) |
2592
|
|
|
|
2593
|
|
|
pattern_Data_ReadRelationships_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4, 2, 5}, []string{"v1", "tenants", "tenant_id", "data", "relationships", "read"}, "")) |
2594
|
|
|
|
2595
|
|
|
pattern_Data_ReadAttributes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4, 2, 5}, []string{"v1", "tenants", "tenant_id", "data", "attributes", "read"}, "")) |
2596
|
|
|
|
2597
|
|
|
pattern_Data_Delete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "tenants", "tenant_id", "data", "delete"}, "")) |
2598
|
|
|
|
2599
|
|
|
pattern_Data_DeleteRelationships_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "tenants", "tenant_id", "relationships", "delete"}, "")) |
2600
|
|
|
|
2601
|
|
|
pattern_Data_RunBundle_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "tenants", "tenant_id", "data", "run-bundle"}, "")) |
2602
|
|
|
) |
2603
|
|
|
|
2604
|
|
|
var ( |
2605
|
|
|
forward_Data_Write_0 = runtime.ForwardResponseMessage |
2606
|
|
|
|
2607
|
|
|
forward_Data_WriteRelationships_0 = runtime.ForwardResponseMessage |
2608
|
|
|
|
2609
|
|
|
forward_Data_ReadRelationships_0 = runtime.ForwardResponseMessage |
2610
|
|
|
|
2611
|
|
|
forward_Data_ReadAttributes_0 = runtime.ForwardResponseMessage |
2612
|
|
|
|
2613
|
|
|
forward_Data_Delete_0 = runtime.ForwardResponseMessage |
2614
|
|
|
|
2615
|
|
|
forward_Data_DeleteRelationships_0 = runtime.ForwardResponseMessage |
2616
|
|
|
|
2617
|
|
|
forward_Data_RunBundle_0 = runtime.ForwardResponseMessage |
2618
|
|
|
) |
2619
|
|
|
|
2620
|
|
|
// RegisterBundleHandlerFromEndpoint is same as RegisterBundleHandler but |
2621
|
|
|
// automatically dials to "endpoint" and closes the connection when "ctx" gets done. |
2622
|
|
|
func RegisterBundleHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { |
2623
|
|
|
conn, err := grpc.NewClient(endpoint, opts...) |
2624
|
|
|
if err != nil { |
2625
|
|
|
return err |
2626
|
|
|
} |
2627
|
|
|
defer func() { |
2628
|
|
|
if err != nil { |
2629
|
|
|
if cerr := conn.Close(); cerr != nil { |
2630
|
|
|
grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) |
2631
|
|
|
} |
2632
|
|
|
return |
2633
|
|
|
} |
2634
|
|
|
go func() { |
2635
|
|
|
<-ctx.Done() |
2636
|
|
|
if cerr := conn.Close(); cerr != nil { |
2637
|
|
|
grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) |
2638
|
|
|
} |
2639
|
|
|
}() |
2640
|
|
|
}() |
2641
|
|
|
|
2642
|
|
|
return RegisterBundleHandler(ctx, mux, conn) |
2643
|
|
|
} |
2644
|
|
|
|
2645
|
|
|
// RegisterBundleHandler registers the http handlers for service Bundle to "mux". |
2646
|
|
|
// The handlers forward requests to the grpc endpoint over "conn". |
2647
|
|
|
func RegisterBundleHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { |
2648
|
|
|
return RegisterBundleHandlerClient(ctx, mux, NewBundleClient(conn)) |
2649
|
|
|
} |
2650
|
|
|
|
2651
|
|
|
// RegisterBundleHandlerClient registers the http handlers for service Bundle |
2652
|
|
|
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "BundleClient". |
2653
|
|
|
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "BundleClient" |
2654
|
|
|
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in |
2655
|
|
|
// "BundleClient" to call the correct interceptors. |
2656
|
|
|
func RegisterBundleHandlerClient(ctx context.Context, mux *runtime.ServeMux, client BundleClient) error { |
2657
|
|
|
|
2658
|
|
|
mux.Handle("POST", pattern_Bundle_Write_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
2659
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
2660
|
|
|
defer cancel() |
2661
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
2662
|
|
|
var err error |
2663
|
|
|
var annotatedContext context.Context |
2664
|
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/base.v1.Bundle/Write", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/bundle/write")) |
2665
|
|
|
if err != nil { |
2666
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
2667
|
|
|
return |
2668
|
|
|
} |
2669
|
|
|
resp, md, err := request_Bundle_Write_0(annotatedContext, inboundMarshaler, client, req, pathParams) |
2670
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
2671
|
|
|
if err != nil { |
2672
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
2673
|
|
|
return |
2674
|
|
|
} |
2675
|
|
|
|
2676
|
|
|
forward_Bundle_Write_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
2677
|
|
|
|
2678
|
|
|
}) |
2679
|
|
|
|
2680
|
|
|
mux.Handle("POST", pattern_Bundle_Read_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
2681
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
2682
|
|
|
defer cancel() |
2683
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
2684
|
|
|
var err error |
2685
|
|
|
var annotatedContext context.Context |
2686
|
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/base.v1.Bundle/Read", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/bundle/read")) |
2687
|
|
|
if err != nil { |
2688
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
2689
|
|
|
return |
2690
|
|
|
} |
2691
|
|
|
resp, md, err := request_Bundle_Read_0(annotatedContext, inboundMarshaler, client, req, pathParams) |
2692
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
2693
|
|
|
if err != nil { |
2694
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
2695
|
|
|
return |
2696
|
|
|
} |
2697
|
|
|
|
2698
|
|
|
forward_Bundle_Read_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
2699
|
|
|
|
2700
|
|
|
}) |
2701
|
|
|
|
2702
|
|
|
mux.Handle("POST", pattern_Bundle_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
2703
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
2704
|
|
|
defer cancel() |
2705
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
2706
|
|
|
var err error |
2707
|
|
|
var annotatedContext context.Context |
2708
|
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/base.v1.Bundle/Delete", runtime.WithHTTPPathPattern("/v1/tenants/{tenant_id}/bundle/delete")) |
2709
|
|
|
if err != nil { |
2710
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
2711
|
|
|
return |
2712
|
|
|
} |
2713
|
|
|
resp, md, err := request_Bundle_Delete_0(annotatedContext, inboundMarshaler, client, req, pathParams) |
2714
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
2715
|
|
|
if err != nil { |
2716
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
2717
|
|
|
return |
2718
|
|
|
} |
2719
|
|
|
|
2720
|
|
|
forward_Bundle_Delete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
2721
|
|
|
|
2722
|
|
|
}) |
2723
|
|
|
|
2724
|
|
|
return nil |
2725
|
|
|
} |
2726
|
|
|
|
2727
|
|
|
var ( |
2728
|
|
|
pattern_Bundle_Write_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "tenants", "tenant_id", "bundle", "write"}, "")) |
2729
|
|
|
|
2730
|
|
|
pattern_Bundle_Read_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "tenants", "tenant_id", "bundle", "read"}, "")) |
2731
|
|
|
|
2732
|
|
|
pattern_Bundle_Delete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3, 2, 4}, []string{"v1", "tenants", "tenant_id", "bundle", "delete"}, "")) |
2733
|
|
|
) |
2734
|
|
|
|
2735
|
|
|
var ( |
2736
|
|
|
forward_Bundle_Write_0 = runtime.ForwardResponseMessage |
2737
|
|
|
|
2738
|
|
|
forward_Bundle_Read_0 = runtime.ForwardResponseMessage |
2739
|
|
|
|
2740
|
|
|
forward_Bundle_Delete_0 = runtime.ForwardResponseMessage |
2741
|
|
|
) |
2742
|
|
|
|
2743
|
|
|
// RegisterTenancyHandlerFromEndpoint is same as RegisterTenancyHandler but |
2744
|
|
|
// automatically dials to "endpoint" and closes the connection when "ctx" gets done. |
2745
|
|
|
func RegisterTenancyHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { |
2746
|
|
|
conn, err := grpc.NewClient(endpoint, opts...) |
2747
|
|
|
if err != nil { |
2748
|
|
|
return err |
2749
|
|
|
} |
2750
|
|
|
defer func() { |
2751
|
|
|
if err != nil { |
2752
|
|
|
if cerr := conn.Close(); cerr != nil { |
2753
|
|
|
grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) |
2754
|
|
|
} |
2755
|
|
|
return |
2756
|
|
|
} |
2757
|
|
|
go func() { |
2758
|
|
|
<-ctx.Done() |
2759
|
|
|
if cerr := conn.Close(); cerr != nil { |
2760
|
|
|
grpclog.Errorf("Failed to close conn to %s: %v", endpoint, cerr) |
2761
|
|
|
} |
2762
|
|
|
}() |
2763
|
|
|
}() |
2764
|
|
|
|
2765
|
|
|
return RegisterTenancyHandler(ctx, mux, conn) |
2766
|
|
|
} |
2767
|
|
|
|
2768
|
|
|
// RegisterTenancyHandler registers the http handlers for service Tenancy to "mux". |
2769
|
|
|
// The handlers forward requests to the grpc endpoint over "conn". |
2770
|
|
|
func RegisterTenancyHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { |
2771
|
|
|
return RegisterTenancyHandlerClient(ctx, mux, NewTenancyClient(conn)) |
2772
|
|
|
} |
2773
|
|
|
|
2774
|
|
|
// RegisterTenancyHandlerClient registers the http handlers for service Tenancy |
2775
|
|
|
// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "TenancyClient". |
2776
|
|
|
// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "TenancyClient" |
2777
|
|
|
// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in |
2778
|
|
|
// "TenancyClient" to call the correct interceptors. |
2779
|
|
|
func RegisterTenancyHandlerClient(ctx context.Context, mux *runtime.ServeMux, client TenancyClient) error { |
2780
|
|
|
|
2781
|
|
|
mux.Handle("POST", pattern_Tenancy_Create_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
2782
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
2783
|
|
|
defer cancel() |
2784
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
2785
|
|
|
var err error |
2786
|
|
|
var annotatedContext context.Context |
2787
|
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/base.v1.Tenancy/Create", runtime.WithHTTPPathPattern("/v1/tenants/create")) |
2788
|
|
|
if err != nil { |
2789
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
2790
|
|
|
return |
2791
|
|
|
} |
2792
|
|
|
resp, md, err := request_Tenancy_Create_0(annotatedContext, inboundMarshaler, client, req, pathParams) |
2793
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
2794
|
|
|
if err != nil { |
2795
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
2796
|
|
|
return |
2797
|
|
|
} |
2798
|
|
|
|
2799
|
|
|
forward_Tenancy_Create_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
2800
|
|
|
|
2801
|
|
|
}) |
2802
|
|
|
|
2803
|
|
|
mux.Handle("DELETE", pattern_Tenancy_Delete_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
2804
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
2805
|
|
|
defer cancel() |
2806
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
2807
|
|
|
var err error |
2808
|
|
|
var annotatedContext context.Context |
2809
|
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/base.v1.Tenancy/Delete", runtime.WithHTTPPathPattern("/v1/tenants/{id}")) |
2810
|
|
|
if err != nil { |
2811
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
2812
|
|
|
return |
2813
|
|
|
} |
2814
|
|
|
resp, md, err := request_Tenancy_Delete_0(annotatedContext, inboundMarshaler, client, req, pathParams) |
2815
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
2816
|
|
|
if err != nil { |
2817
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
2818
|
|
|
return |
2819
|
|
|
} |
2820
|
|
|
|
2821
|
|
|
forward_Tenancy_Delete_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
2822
|
|
|
|
2823
|
|
|
}) |
2824
|
|
|
|
2825
|
|
|
mux.Handle("POST", pattern_Tenancy_List_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { |
2826
|
|
|
ctx, cancel := context.WithCancel(req.Context()) |
2827
|
|
|
defer cancel() |
2828
|
|
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) |
2829
|
|
|
var err error |
2830
|
|
|
var annotatedContext context.Context |
2831
|
|
|
annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/base.v1.Tenancy/List", runtime.WithHTTPPathPattern("/v1/tenants/list")) |
2832
|
|
|
if err != nil { |
2833
|
|
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) |
2834
|
|
|
return |
2835
|
|
|
} |
2836
|
|
|
resp, md, err := request_Tenancy_List_0(annotatedContext, inboundMarshaler, client, req, pathParams) |
2837
|
|
|
annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) |
2838
|
|
|
if err != nil { |
2839
|
|
|
runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) |
2840
|
|
|
return |
2841
|
|
|
} |
2842
|
|
|
|
2843
|
|
|
forward_Tenancy_List_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) |
2844
|
|
|
|
2845
|
|
|
}) |
2846
|
|
|
|
2847
|
|
|
return nil |
2848
|
|
|
} |
2849
|
|
|
|
2850
|
|
|
var ( |
2851
|
|
|
pattern_Tenancy_Create_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "tenants", "create"}, "")) |
2852
|
|
|
|
2853
|
|
|
pattern_Tenancy_Delete_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"v1", "tenants", "id"}, "")) |
2854
|
|
|
|
2855
|
|
|
pattern_Tenancy_List_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"v1", "tenants", "list"}, "")) |
2856
|
|
|
) |
2857
|
|
|
|
2858
|
|
|
var ( |
2859
|
|
|
forward_Tenancy_Create_0 = runtime.ForwardResponseMessage |
2860
|
|
|
|
2861
|
|
|
forward_Tenancy_Delete_0 = runtime.ForwardResponseMessage |
2862
|
|
|
|
2863
|
|
|
forward_Tenancy_List_0 = runtime.ForwardResponseMessage |
2864
|
|
|
) |
2865
|
|
|
|