-
Notifications
You must be signed in to change notification settings - Fork 1
/
reader_grpc.pb.go
415 lines (384 loc) · 15.5 KB
/
reader_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
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: aserto/directory/reader/v3/reader.proto
package reader
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 (
Reader_GetObject_FullMethodName = "/aserto.directory.reader.v3.Reader/GetObject"
Reader_GetObjectMany_FullMethodName = "/aserto.directory.reader.v3.Reader/GetObjectMany"
Reader_GetObjects_FullMethodName = "/aserto.directory.reader.v3.Reader/GetObjects"
Reader_GetRelation_FullMethodName = "/aserto.directory.reader.v3.Reader/GetRelation"
Reader_GetRelations_FullMethodName = "/aserto.directory.reader.v3.Reader/GetRelations"
Reader_Check_FullMethodName = "/aserto.directory.reader.v3.Reader/Check"
Reader_CheckPermission_FullMethodName = "/aserto.directory.reader.v3.Reader/CheckPermission"
Reader_CheckRelation_FullMethodName = "/aserto.directory.reader.v3.Reader/CheckRelation"
Reader_GetGraph_FullMethodName = "/aserto.directory.reader.v3.Reader/GetGraph"
)
// ReaderClient is the client API for Reader 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 ReaderClient interface {
// object methods
GetObject(ctx context.Context, in *GetObjectRequest, opts ...grpc.CallOption) (*GetObjectResponse, error)
GetObjectMany(ctx context.Context, in *GetObjectManyRequest, opts ...grpc.CallOption) (*GetObjectManyResponse, error)
GetObjects(ctx context.Context, in *GetObjectsRequest, opts ...grpc.CallOption) (*GetObjectsResponse, error)
// relation methods
GetRelation(ctx context.Context, in *GetRelationRequest, opts ...grpc.CallOption) (*GetRelationResponse, error)
GetRelations(ctx context.Context, in *GetRelationsRequest, opts ...grpc.CallOption) (*GetRelationsResponse, error)
// check method
Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error)
// check permission method
CheckPermission(ctx context.Context, in *CheckPermissionRequest, opts ...grpc.CallOption) (*CheckPermissionResponse, error)
// check relation method
CheckRelation(ctx context.Context, in *CheckRelationRequest, opts ...grpc.CallOption) (*CheckRelationResponse, error)
// graph methods
GetGraph(ctx context.Context, in *GetGraphRequest, opts ...grpc.CallOption) (*GetGraphResponse, error)
}
type readerClient struct {
cc grpc.ClientConnInterface
}
func NewReaderClient(cc grpc.ClientConnInterface) ReaderClient {
return &readerClient{cc}
}
func (c *readerClient) GetObject(ctx context.Context, in *GetObjectRequest, opts ...grpc.CallOption) (*GetObjectResponse, error) {
out := new(GetObjectResponse)
err := c.cc.Invoke(ctx, Reader_GetObject_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *readerClient) GetObjectMany(ctx context.Context, in *GetObjectManyRequest, opts ...grpc.CallOption) (*GetObjectManyResponse, error) {
out := new(GetObjectManyResponse)
err := c.cc.Invoke(ctx, Reader_GetObjectMany_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *readerClient) GetObjects(ctx context.Context, in *GetObjectsRequest, opts ...grpc.CallOption) (*GetObjectsResponse, error) {
out := new(GetObjectsResponse)
err := c.cc.Invoke(ctx, Reader_GetObjects_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *readerClient) GetRelation(ctx context.Context, in *GetRelationRequest, opts ...grpc.CallOption) (*GetRelationResponse, error) {
out := new(GetRelationResponse)
err := c.cc.Invoke(ctx, Reader_GetRelation_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *readerClient) GetRelations(ctx context.Context, in *GetRelationsRequest, opts ...grpc.CallOption) (*GetRelationsResponse, error) {
out := new(GetRelationsResponse)
err := c.cc.Invoke(ctx, Reader_GetRelations_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *readerClient) Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckResponse, error) {
out := new(CheckResponse)
err := c.cc.Invoke(ctx, Reader_Check_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *readerClient) CheckPermission(ctx context.Context, in *CheckPermissionRequest, opts ...grpc.CallOption) (*CheckPermissionResponse, error) {
out := new(CheckPermissionResponse)
err := c.cc.Invoke(ctx, Reader_CheckPermission_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *readerClient) CheckRelation(ctx context.Context, in *CheckRelationRequest, opts ...grpc.CallOption) (*CheckRelationResponse, error) {
out := new(CheckRelationResponse)
err := c.cc.Invoke(ctx, Reader_CheckRelation_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *readerClient) GetGraph(ctx context.Context, in *GetGraphRequest, opts ...grpc.CallOption) (*GetGraphResponse, error) {
out := new(GetGraphResponse)
err := c.cc.Invoke(ctx, Reader_GetGraph_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ReaderServer is the server API for Reader service.
// All implementations should embed UnimplementedReaderServer
// for forward compatibility
type ReaderServer interface {
// object methods
GetObject(context.Context, *GetObjectRequest) (*GetObjectResponse, error)
GetObjectMany(context.Context, *GetObjectManyRequest) (*GetObjectManyResponse, error)
GetObjects(context.Context, *GetObjectsRequest) (*GetObjectsResponse, error)
// relation methods
GetRelation(context.Context, *GetRelationRequest) (*GetRelationResponse, error)
GetRelations(context.Context, *GetRelationsRequest) (*GetRelationsResponse, error)
// check method
Check(context.Context, *CheckRequest) (*CheckResponse, error)
// check permission method
CheckPermission(context.Context, *CheckPermissionRequest) (*CheckPermissionResponse, error)
// check relation method
CheckRelation(context.Context, *CheckRelationRequest) (*CheckRelationResponse, error)
// graph methods
GetGraph(context.Context, *GetGraphRequest) (*GetGraphResponse, error)
}
// UnimplementedReaderServer should be embedded to have forward compatible implementations.
type UnimplementedReaderServer struct {
}
func (UnimplementedReaderServer) GetObject(context.Context, *GetObjectRequest) (*GetObjectResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetObject not implemented")
}
func (UnimplementedReaderServer) GetObjectMany(context.Context, *GetObjectManyRequest) (*GetObjectManyResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetObjectMany not implemented")
}
func (UnimplementedReaderServer) GetObjects(context.Context, *GetObjectsRequest) (*GetObjectsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetObjects not implemented")
}
func (UnimplementedReaderServer) GetRelation(context.Context, *GetRelationRequest) (*GetRelationResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetRelation not implemented")
}
func (UnimplementedReaderServer) GetRelations(context.Context, *GetRelationsRequest) (*GetRelationsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetRelations not implemented")
}
func (UnimplementedReaderServer) Check(context.Context, *CheckRequest) (*CheckResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Check not implemented")
}
func (UnimplementedReaderServer) CheckPermission(context.Context, *CheckPermissionRequest) (*CheckPermissionResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CheckPermission not implemented")
}
func (UnimplementedReaderServer) CheckRelation(context.Context, *CheckRelationRequest) (*CheckRelationResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CheckRelation not implemented")
}
func (UnimplementedReaderServer) GetGraph(context.Context, *GetGraphRequest) (*GetGraphResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetGraph not implemented")
}
// UnsafeReaderServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to ReaderServer will
// result in compilation errors.
type UnsafeReaderServer interface {
mustEmbedUnimplementedReaderServer()
}
func RegisterReaderServer(s grpc.ServiceRegistrar, srv ReaderServer) {
s.RegisterService(&Reader_ServiceDesc, srv)
}
func _Reader_GetObject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetObjectRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ReaderServer).GetObject(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Reader_GetObject_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ReaderServer).GetObject(ctx, req.(*GetObjectRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Reader_GetObjectMany_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetObjectManyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ReaderServer).GetObjectMany(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Reader_GetObjectMany_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ReaderServer).GetObjectMany(ctx, req.(*GetObjectManyRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Reader_GetObjects_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetObjectsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ReaderServer).GetObjects(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Reader_GetObjects_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ReaderServer).GetObjects(ctx, req.(*GetObjectsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Reader_GetRelation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetRelationRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ReaderServer).GetRelation(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Reader_GetRelation_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ReaderServer).GetRelation(ctx, req.(*GetRelationRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Reader_GetRelations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetRelationsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ReaderServer).GetRelations(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Reader_GetRelations_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ReaderServer).GetRelations(ctx, req.(*GetRelationsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Reader_Check_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CheckRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ReaderServer).Check(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Reader_Check_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ReaderServer).Check(ctx, req.(*CheckRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Reader_CheckPermission_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CheckPermissionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ReaderServer).CheckPermission(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Reader_CheckPermission_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ReaderServer).CheckPermission(ctx, req.(*CheckPermissionRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Reader_CheckRelation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CheckRelationRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ReaderServer).CheckRelation(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Reader_CheckRelation_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ReaderServer).CheckRelation(ctx, req.(*CheckRelationRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Reader_GetGraph_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetGraphRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ReaderServer).GetGraph(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Reader_GetGraph_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ReaderServer).GetGraph(ctx, req.(*GetGraphRequest))
}
return interceptor(ctx, in, info, handler)
}
// Reader_ServiceDesc is the grpc.ServiceDesc for Reader service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var Reader_ServiceDesc = grpc.ServiceDesc{
ServiceName: "aserto.directory.reader.v3.Reader",
HandlerType: (*ReaderServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetObject",
Handler: _Reader_GetObject_Handler,
},
{
MethodName: "GetObjectMany",
Handler: _Reader_GetObjectMany_Handler,
},
{
MethodName: "GetObjects",
Handler: _Reader_GetObjects_Handler,
},
{
MethodName: "GetRelation",
Handler: _Reader_GetRelation_Handler,
},
{
MethodName: "GetRelations",
Handler: _Reader_GetRelations_Handler,
},
{
MethodName: "Check",
Handler: _Reader_Check_Handler,
},
{
MethodName: "CheckPermission",
Handler: _Reader_CheckPermission_Handler,
},
{
MethodName: "CheckRelation",
Handler: _Reader_CheckRelation_Handler,
},
{
MethodName: "GetGraph",
Handler: _Reader_GetGraph_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "aserto/directory/reader/v3/reader.proto",
}