-
Notifications
You must be signed in to change notification settings - Fork 1
/
writer_grpc.pb.go
450 lines (417 loc) · 17.7 KB
/
writer_grpc.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: aserto/directory/writer/v2/writer.proto
package writer
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
const (
Writer_SetObjectType_FullMethodName = "/aserto.directory.writer.v2.Writer/SetObjectType"
Writer_DeleteObjectType_FullMethodName = "/aserto.directory.writer.v2.Writer/DeleteObjectType"
Writer_SetRelationType_FullMethodName = "/aserto.directory.writer.v2.Writer/SetRelationType"
Writer_DeleteRelationType_FullMethodName = "/aserto.directory.writer.v2.Writer/DeleteRelationType"
Writer_SetPermission_FullMethodName = "/aserto.directory.writer.v2.Writer/SetPermission"
Writer_DeletePermission_FullMethodName = "/aserto.directory.writer.v2.Writer/DeletePermission"
Writer_SetObject_FullMethodName = "/aserto.directory.writer.v2.Writer/SetObject"
Writer_DeleteObject_FullMethodName = "/aserto.directory.writer.v2.Writer/DeleteObject"
Writer_SetRelation_FullMethodName = "/aserto.directory.writer.v2.Writer/SetRelation"
Writer_DeleteRelation_FullMethodName = "/aserto.directory.writer.v2.Writer/DeleteRelation"
)
// WriterClient is the client API for Writer service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type WriterClient interface {
// object type metadata methods
SetObjectType(ctx context.Context, in *SetObjectTypeRequest, opts ...grpc.CallOption) (*SetObjectTypeResponse, error)
DeleteObjectType(ctx context.Context, in *DeleteObjectTypeRequest, opts ...grpc.CallOption) (*DeleteObjectTypeResponse, error)
// relation type metadata methods
SetRelationType(ctx context.Context, in *SetRelationTypeRequest, opts ...grpc.CallOption) (*SetRelationTypeResponse, error)
DeleteRelationType(ctx context.Context, in *DeleteRelationTypeRequest, opts ...grpc.CallOption) (*DeleteRelationTypeResponse, error)
// permission metadata methods
SetPermission(ctx context.Context, in *SetPermissionRequest, opts ...grpc.CallOption) (*SetPermissionResponse, error)
DeletePermission(ctx context.Context, in *DeletePermissionRequest, opts ...grpc.CallOption) (*DeletePermissionResponse, error)
// object methods
SetObject(ctx context.Context, in *SetObjectRequest, opts ...grpc.CallOption) (*SetObjectResponse, error)
DeleteObject(ctx context.Context, in *DeleteObjectRequest, opts ...grpc.CallOption) (*DeleteObjectResponse, error)
// relation methods
SetRelation(ctx context.Context, in *SetRelationRequest, opts ...grpc.CallOption) (*SetRelationResponse, error)
DeleteRelation(ctx context.Context, in *DeleteRelationRequest, opts ...grpc.CallOption) (*DeleteRelationResponse, error)
}
type writerClient struct {
cc grpc.ClientConnInterface
}
func NewWriterClient(cc grpc.ClientConnInterface) WriterClient {
return &writerClient{cc}
}
func (c *writerClient) SetObjectType(ctx context.Context, in *SetObjectTypeRequest, opts ...grpc.CallOption) (*SetObjectTypeResponse, error) {
out := new(SetObjectTypeResponse)
err := c.cc.Invoke(ctx, Writer_SetObjectType_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *writerClient) DeleteObjectType(ctx context.Context, in *DeleteObjectTypeRequest, opts ...grpc.CallOption) (*DeleteObjectTypeResponse, error) {
out := new(DeleteObjectTypeResponse)
err := c.cc.Invoke(ctx, Writer_DeleteObjectType_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *writerClient) SetRelationType(ctx context.Context, in *SetRelationTypeRequest, opts ...grpc.CallOption) (*SetRelationTypeResponse, error) {
out := new(SetRelationTypeResponse)
err := c.cc.Invoke(ctx, Writer_SetRelationType_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *writerClient) DeleteRelationType(ctx context.Context, in *DeleteRelationTypeRequest, opts ...grpc.CallOption) (*DeleteRelationTypeResponse, error) {
out := new(DeleteRelationTypeResponse)
err := c.cc.Invoke(ctx, Writer_DeleteRelationType_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *writerClient) SetPermission(ctx context.Context, in *SetPermissionRequest, opts ...grpc.CallOption) (*SetPermissionResponse, error) {
out := new(SetPermissionResponse)
err := c.cc.Invoke(ctx, Writer_SetPermission_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *writerClient) DeletePermission(ctx context.Context, in *DeletePermissionRequest, opts ...grpc.CallOption) (*DeletePermissionResponse, error) {
out := new(DeletePermissionResponse)
err := c.cc.Invoke(ctx, Writer_DeletePermission_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *writerClient) SetObject(ctx context.Context, in *SetObjectRequest, opts ...grpc.CallOption) (*SetObjectResponse, error) {
out := new(SetObjectResponse)
err := c.cc.Invoke(ctx, Writer_SetObject_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *writerClient) DeleteObject(ctx context.Context, in *DeleteObjectRequest, opts ...grpc.CallOption) (*DeleteObjectResponse, error) {
out := new(DeleteObjectResponse)
err := c.cc.Invoke(ctx, Writer_DeleteObject_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *writerClient) SetRelation(ctx context.Context, in *SetRelationRequest, opts ...grpc.CallOption) (*SetRelationResponse, error) {
out := new(SetRelationResponse)
err := c.cc.Invoke(ctx, Writer_SetRelation_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *writerClient) DeleteRelation(ctx context.Context, in *DeleteRelationRequest, opts ...grpc.CallOption) (*DeleteRelationResponse, error) {
out := new(DeleteRelationResponse)
err := c.cc.Invoke(ctx, Writer_DeleteRelation_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// WriterServer is the server API for Writer service.
// All implementations should embed UnimplementedWriterServer
// for forward compatibility
type WriterServer interface {
// object type metadata methods
SetObjectType(context.Context, *SetObjectTypeRequest) (*SetObjectTypeResponse, error)
DeleteObjectType(context.Context, *DeleteObjectTypeRequest) (*DeleteObjectTypeResponse, error)
// relation type metadata methods
SetRelationType(context.Context, *SetRelationTypeRequest) (*SetRelationTypeResponse, error)
DeleteRelationType(context.Context, *DeleteRelationTypeRequest) (*DeleteRelationTypeResponse, error)
// permission metadata methods
SetPermission(context.Context, *SetPermissionRequest) (*SetPermissionResponse, error)
DeletePermission(context.Context, *DeletePermissionRequest) (*DeletePermissionResponse, error)
// object methods
SetObject(context.Context, *SetObjectRequest) (*SetObjectResponse, error)
DeleteObject(context.Context, *DeleteObjectRequest) (*DeleteObjectResponse, error)
// relation methods
SetRelation(context.Context, *SetRelationRequest) (*SetRelationResponse, error)
DeleteRelation(context.Context, *DeleteRelationRequest) (*DeleteRelationResponse, error)
}
// UnimplementedWriterServer should be embedded to have forward compatible implementations.
type UnimplementedWriterServer struct {
}
func (UnimplementedWriterServer) SetObjectType(context.Context, *SetObjectTypeRequest) (*SetObjectTypeResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SetObjectType not implemented")
}
func (UnimplementedWriterServer) DeleteObjectType(context.Context, *DeleteObjectTypeRequest) (*DeleteObjectTypeResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteObjectType not implemented")
}
func (UnimplementedWriterServer) SetRelationType(context.Context, *SetRelationTypeRequest) (*SetRelationTypeResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SetRelationType not implemented")
}
func (UnimplementedWriterServer) DeleteRelationType(context.Context, *DeleteRelationTypeRequest) (*DeleteRelationTypeResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteRelationType not implemented")
}
func (UnimplementedWriterServer) SetPermission(context.Context, *SetPermissionRequest) (*SetPermissionResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SetPermission not implemented")
}
func (UnimplementedWriterServer) DeletePermission(context.Context, *DeletePermissionRequest) (*DeletePermissionResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeletePermission not implemented")
}
func (UnimplementedWriterServer) SetObject(context.Context, *SetObjectRequest) (*SetObjectResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SetObject not implemented")
}
func (UnimplementedWriterServer) DeleteObject(context.Context, *DeleteObjectRequest) (*DeleteObjectResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteObject not implemented")
}
func (UnimplementedWriterServer) SetRelation(context.Context, *SetRelationRequest) (*SetRelationResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SetRelation not implemented")
}
func (UnimplementedWriterServer) DeleteRelation(context.Context, *DeleteRelationRequest) (*DeleteRelationResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteRelation not implemented")
}
// UnsafeWriterServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to WriterServer will
// result in compilation errors.
type UnsafeWriterServer interface {
mustEmbedUnimplementedWriterServer()
}
func RegisterWriterServer(s grpc.ServiceRegistrar, srv WriterServer) {
s.RegisterService(&Writer_ServiceDesc, srv)
}
func _Writer_SetObjectType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SetObjectTypeRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WriterServer).SetObjectType(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Writer_SetObjectType_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WriterServer).SetObjectType(ctx, req.(*SetObjectTypeRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Writer_DeleteObjectType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteObjectTypeRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WriterServer).DeleteObjectType(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Writer_DeleteObjectType_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WriterServer).DeleteObjectType(ctx, req.(*DeleteObjectTypeRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Writer_SetRelationType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SetRelationTypeRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WriterServer).SetRelationType(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Writer_SetRelationType_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WriterServer).SetRelationType(ctx, req.(*SetRelationTypeRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Writer_DeleteRelationType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteRelationTypeRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WriterServer).DeleteRelationType(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Writer_DeleteRelationType_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WriterServer).DeleteRelationType(ctx, req.(*DeleteRelationTypeRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Writer_SetPermission_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SetPermissionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WriterServer).SetPermission(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Writer_SetPermission_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WriterServer).SetPermission(ctx, req.(*SetPermissionRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Writer_DeletePermission_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeletePermissionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WriterServer).DeletePermission(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Writer_DeletePermission_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WriterServer).DeletePermission(ctx, req.(*DeletePermissionRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Writer_SetObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SetObjectRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WriterServer).SetObject(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Writer_SetObject_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WriterServer).SetObject(ctx, req.(*SetObjectRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Writer_DeleteObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteObjectRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WriterServer).DeleteObject(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Writer_DeleteObject_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WriterServer).DeleteObject(ctx, req.(*DeleteObjectRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Writer_SetRelation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SetRelationRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WriterServer).SetRelation(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Writer_SetRelation_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WriterServer).SetRelation(ctx, req.(*SetRelationRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Writer_DeleteRelation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteRelationRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WriterServer).DeleteRelation(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Writer_DeleteRelation_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WriterServer).DeleteRelation(ctx, req.(*DeleteRelationRequest))
}
return interceptor(ctx, in, info, handler)
}
// Writer_ServiceDesc is the grpc.ServiceDesc for Writer service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Writer_ServiceDesc = grpc.ServiceDesc{
ServiceName: "aserto.directory.writer.v2.Writer",
HandlerType: (*WriterServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "SetObjectType",
Handler: _Writer_SetObjectType_Handler,
},
{
MethodName: "DeleteObjectType",
Handler: _Writer_DeleteObjectType_Handler,
},
{
MethodName: "SetRelationType",
Handler: _Writer_SetRelationType_Handler,
},
{
MethodName: "DeleteRelationType",
Handler: _Writer_DeleteRelationType_Handler,
},
{
MethodName: "SetPermission",
Handler: _Writer_SetPermission_Handler,
},
{
MethodName: "DeletePermission",
Handler: _Writer_DeletePermission_Handler,
},
{
MethodName: "SetObject",
Handler: _Writer_SetObject_Handler,
},
{
MethodName: "DeleteObject",
Handler: _Writer_DeleteObject_Handler,
},
{
MethodName: "SetRelation",
Handler: _Writer_SetRelation_Handler,
},
{
MethodName: "DeleteRelation",
Handler: _Writer_DeleteRelation_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "aserto/directory/writer/v2/writer.proto",
}