1
|
|
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT. |
2
|
|
|
// versions: |
3
|
|
|
// - protoc-gen-go-grpc v1.4.0 |
4
|
|
|
// - protoc (unknown) |
5
|
|
|
// source: base/v1/service.proto |
6
|
|
|
|
7
|
|
|
package basev1 |
8
|
|
|
|
9
|
|
|
import ( |
10
|
|
|
context "context" |
11
|
|
|
grpc "google.golang.org/grpc" |
12
|
|
|
codes "google.golang.org/grpc/codes" |
13
|
|
|
status "google.golang.org/grpc/status" |
14
|
|
|
) |
15
|
|
|
|
16
|
|
|
// This is a compile-time assertion to ensure that this generated file |
17
|
|
|
// is compatible with the grpc package it is being compiled against. |
18
|
|
|
// Requires gRPC-Go v1.62.0 or later. |
19
|
|
|
const _ = grpc.SupportPackageIsVersion8 |
20
|
|
|
|
21
|
|
|
const ( |
22
|
|
|
Health_Check_FullMethodName = "/base.v1.Health/Check" |
23
|
|
|
) |
24
|
|
|
|
25
|
|
|
// HealthClient is the client API for Health service. |
26
|
|
|
// |
27
|
|
|
// 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. |
28
|
|
|
// |
29
|
|
|
// HealthCheck service |
30
|
|
|
type HealthClient interface { |
31
|
|
|
// CheckHealth method for health checking |
32
|
|
|
Check(ctx context.Context, in *HealthRequest, opts ...grpc.CallOption) (*HealthResponse, error) |
33
|
|
|
} |
34
|
|
|
|
35
|
|
|
type healthClient struct { |
36
|
|
|
cc grpc.ClientConnInterface |
37
|
|
|
} |
38
|
|
|
|
39
|
|
|
func NewHealthClient(cc grpc.ClientConnInterface) HealthClient { |
40
|
|
|
return &healthClient{cc} |
41
|
|
|
} |
42
|
|
|
|
43
|
|
|
func (c *healthClient) Check(ctx context.Context, in *HealthRequest, opts ...grpc.CallOption) (*HealthResponse, error) { |
44
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) |
45
|
|
|
out := new(HealthResponse) |
46
|
|
|
err := c.cc.Invoke(ctx, Health_Check_FullMethodName, in, out, cOpts...) |
47
|
|
|
if err != nil { |
48
|
|
|
return nil, err |
49
|
|
|
} |
50
|
|
|
return out, nil |
51
|
|
|
} |
52
|
|
|
|
53
|
|
|
// HealthServer is the server API for Health service. |
54
|
|
|
// All implementations must embed UnimplementedHealthServer |
55
|
|
|
// for forward compatibility |
56
|
|
|
// |
57
|
|
|
// HealthCheck service |
58
|
|
|
type HealthServer interface { |
59
|
|
|
// CheckHealth method for health checking |
60
|
|
|
Check(context.Context, *HealthRequest) (*HealthResponse, error) |
61
|
|
|
mustEmbedUnimplementedHealthServer() |
62
|
|
|
} |
63
|
|
|
|
64
|
|
|
// UnimplementedHealthServer must be embedded to have forward compatible implementations. |
65
|
|
|
type UnimplementedHealthServer struct { |
66
|
|
|
} |
67
|
|
|
|
68
|
|
|
func (UnimplementedHealthServer) Check(context.Context, *HealthRequest) (*HealthResponse, error) { |
69
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method Check not implemented") |
70
|
|
|
} |
71
|
|
|
func (UnimplementedHealthServer) mustEmbedUnimplementedHealthServer() {} |
72
|
|
|
|
73
|
|
|
// UnsafeHealthServer may be embedded to opt out of forward compatibility for this service. |
74
|
|
|
// Use of this interface is not recommended, as added methods to HealthServer will |
75
|
|
|
// result in compilation errors. |
76
|
|
|
type UnsafeHealthServer interface { |
77
|
|
|
mustEmbedUnimplementedHealthServer() |
78
|
|
|
} |
79
|
|
|
|
80
|
|
|
func RegisterHealthServer(s grpc.ServiceRegistrar, srv HealthServer) { |
81
|
|
|
s.RegisterService(&Health_ServiceDesc, srv) |
82
|
|
|
} |
83
|
|
|
|
84
|
|
|
func _Health_Check_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
85
|
|
|
in := new(HealthRequest) |
86
|
|
|
if err := dec(in); err != nil { |
87
|
|
|
return nil, err |
88
|
|
|
} |
89
|
|
|
if interceptor == nil { |
90
|
|
|
return srv.(HealthServer).Check(ctx, in) |
91
|
|
|
} |
92
|
|
|
info := &grpc.UnaryServerInfo{ |
93
|
|
|
Server: srv, |
94
|
|
|
FullMethod: Health_Check_FullMethodName, |
95
|
|
|
} |
96
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
97
|
|
|
return srv.(HealthServer).Check(ctx, req.(*HealthRequest)) |
98
|
|
|
} |
99
|
|
|
return interceptor(ctx, in, info, handler) |
100
|
|
|
} |
101
|
|
|
|
102
|
|
|
// Health_ServiceDesc is the grpc.ServiceDesc for Health service. |
103
|
|
|
// It's only intended for direct use with grpc.RegisterService, |
104
|
|
|
// and not to be introspected or modified (even as a copy) |
105
|
|
|
var Health_ServiceDesc = grpc.ServiceDesc{ |
106
|
|
|
ServiceName: "base.v1.Health", |
107
|
|
|
HandlerType: (*HealthServer)(nil), |
108
|
|
|
Methods: []grpc.MethodDesc{ |
109
|
|
|
{ |
110
|
|
|
MethodName: "Check", |
111
|
|
|
Handler: _Health_Check_Handler, |
112
|
|
|
}, |
113
|
|
|
}, |
114
|
|
|
Streams: []grpc.StreamDesc{}, |
115
|
|
|
Metadata: "base/v1/service.proto", |
116
|
|
|
} |
117
|
|
|
|
118
|
|
|
const ( |
119
|
|
|
Permission_Check_FullMethodName = "/base.v1.Permission/Check" |
120
|
|
|
Permission_Expand_FullMethodName = "/base.v1.Permission/Expand" |
121
|
|
|
Permission_LookupEntity_FullMethodName = "/base.v1.Permission/LookupEntity" |
122
|
|
|
Permission_LookupEntityStream_FullMethodName = "/base.v1.Permission/LookupEntityStream" |
123
|
|
|
Permission_LookupSubject_FullMethodName = "/base.v1.Permission/LookupSubject" |
124
|
|
|
Permission_SubjectPermission_FullMethodName = "/base.v1.Permission/SubjectPermission" |
125
|
|
|
) |
126
|
|
|
|
127
|
|
|
// PermissionClient is the client API for Permission service. |
128
|
|
|
// |
129
|
|
|
// 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. |
130
|
|
|
// |
131
|
|
|
// Permission service contains methods to interact with permissions. |
132
|
|
|
type PermissionClient interface { |
133
|
|
|
// Check method receives a PermissionCheckRequest and returns a PermissionCheckResponse. |
134
|
|
|
// It is used to determine whether a specific user has permission to perform an action on a resource. |
135
|
|
|
// For example, "Can the user 1 push to repository 1?" |
136
|
|
|
Check(ctx context.Context, in *PermissionCheckRequest, opts ...grpc.CallOption) (*PermissionCheckResponse, error) |
137
|
|
|
// Expand method receives a PermissionExpandRequest and returns a PermissionExpandResponse. |
138
|
|
|
// It expands relationships according to the schema provided. |
139
|
|
|
Expand(ctx context.Context, in *PermissionExpandRequest, opts ...grpc.CallOption) (*PermissionExpandResponse, error) |
140
|
|
|
// LookupEntity method receives a PermissionLookupEntityRequest and returns a PermissionLookupEntityResponse. |
141
|
|
|
// It is used to retrieve an entity by its identifier. |
142
|
|
|
LookupEntity(ctx context.Context, in *PermissionLookupEntityRequest, opts ...grpc.CallOption) (*PermissionLookupEntityResponse, error) |
143
|
|
|
// LookupEntityStream method receives a PermissionLookupEntityRequest and streams a series of PermissionLookupEntityStreamResponse messages. |
144
|
|
|
// It is used to retrieve entities by their identifiers in a streaming fashion. |
145
|
|
|
LookupEntityStream(ctx context.Context, in *PermissionLookupEntityRequest, opts ...grpc.CallOption) (Permission_LookupEntityStreamClient, error) |
146
|
|
|
// LookupSubject method receives a PermissionLookupSubjectRequest and returns a PermissionLookupSubjectResponse. |
147
|
|
|
// It is used to retrieve a subject by its identifier. |
148
|
|
|
LookupSubject(ctx context.Context, in *PermissionLookupSubjectRequest, opts ...grpc.CallOption) (*PermissionLookupSubjectResponse, error) |
149
|
|
|
// SubjectPermission method receives a PermissionSubjectPermissionRequest and returns a PermissionSubjectPermissionResponse. |
150
|
|
|
// It is used to retrieve permissions related to a specific subject. |
151
|
|
|
SubjectPermission(ctx context.Context, in *PermissionSubjectPermissionRequest, opts ...grpc.CallOption) (*PermissionSubjectPermissionResponse, error) |
152
|
|
|
} |
153
|
|
|
|
154
|
|
|
type permissionClient struct { |
155
|
|
|
cc grpc.ClientConnInterface |
156
|
|
|
} |
157
|
|
|
|
158
|
|
|
func NewPermissionClient(cc grpc.ClientConnInterface) PermissionClient { |
159
|
|
|
return &permissionClient{cc} |
160
|
|
|
} |
161
|
|
|
|
162
|
|
|
func (c *permissionClient) Check(ctx context.Context, in *PermissionCheckRequest, opts ...grpc.CallOption) (*PermissionCheckResponse, error) { |
163
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) |
164
|
|
|
out := new(PermissionCheckResponse) |
165
|
|
|
err := c.cc.Invoke(ctx, Permission_Check_FullMethodName, in, out, cOpts...) |
166
|
|
|
if err != nil { |
167
|
|
|
return nil, err |
168
|
|
|
} |
169
|
|
|
return out, nil |
170
|
|
|
} |
171
|
|
|
|
172
|
|
|
func (c *permissionClient) Expand(ctx context.Context, in *PermissionExpandRequest, opts ...grpc.CallOption) (*PermissionExpandResponse, error) { |
173
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) |
174
|
|
|
out := new(PermissionExpandResponse) |
175
|
|
|
err := c.cc.Invoke(ctx, Permission_Expand_FullMethodName, in, out, cOpts...) |
176
|
|
|
if err != nil { |
177
|
|
|
return nil, err |
178
|
|
|
} |
179
|
|
|
return out, nil |
180
|
|
|
} |
181
|
|
|
|
182
|
|
|
func (c *permissionClient) LookupEntity(ctx context.Context, in *PermissionLookupEntityRequest, opts ...grpc.CallOption) (*PermissionLookupEntityResponse, error) { |
183
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) |
184
|
|
|
out := new(PermissionLookupEntityResponse) |
185
|
|
|
err := c.cc.Invoke(ctx, Permission_LookupEntity_FullMethodName, in, out, cOpts...) |
186
|
|
|
if err != nil { |
187
|
|
|
return nil, err |
188
|
|
|
} |
189
|
|
|
return out, nil |
190
|
|
|
} |
191
|
|
|
|
192
|
|
|
func (c *permissionClient) LookupEntityStream(ctx context.Context, in *PermissionLookupEntityRequest, opts ...grpc.CallOption) (Permission_LookupEntityStreamClient, error) { |
193
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) |
194
|
|
|
stream, err := c.cc.NewStream(ctx, &Permission_ServiceDesc.Streams[0], Permission_LookupEntityStream_FullMethodName, cOpts...) |
195
|
|
|
if err != nil { |
196
|
|
|
return nil, err |
197
|
|
|
} |
198
|
|
|
x := &permissionLookupEntityStreamClient{ClientStream: stream} |
199
|
|
|
if err := x.ClientStream.SendMsg(in); err != nil { |
200
|
|
|
return nil, err |
201
|
|
|
} |
202
|
|
|
if err := x.ClientStream.CloseSend(); err != nil { |
203
|
|
|
return nil, err |
204
|
|
|
} |
205
|
|
|
return x, nil |
206
|
|
|
} |
207
|
|
|
|
208
|
|
|
type Permission_LookupEntityStreamClient interface { |
209
|
|
|
Recv() (*PermissionLookupEntityStreamResponse, error) |
210
|
|
|
grpc.ClientStream |
211
|
|
|
} |
212
|
|
|
|
213
|
|
|
type permissionLookupEntityStreamClient struct { |
214
|
|
|
grpc.ClientStream |
215
|
|
|
} |
216
|
|
|
|
217
|
|
|
func (x *permissionLookupEntityStreamClient) Recv() (*PermissionLookupEntityStreamResponse, error) { |
218
|
|
|
m := new(PermissionLookupEntityStreamResponse) |
219
|
|
|
if err := x.ClientStream.RecvMsg(m); err != nil { |
220
|
|
|
return nil, err |
221
|
|
|
} |
222
|
|
|
return m, nil |
223
|
|
|
} |
224
|
|
|
|
225
|
|
|
func (c *permissionClient) LookupSubject(ctx context.Context, in *PermissionLookupSubjectRequest, opts ...grpc.CallOption) (*PermissionLookupSubjectResponse, error) { |
226
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) |
227
|
|
|
out := new(PermissionLookupSubjectResponse) |
228
|
|
|
err := c.cc.Invoke(ctx, Permission_LookupSubject_FullMethodName, in, out, cOpts...) |
229
|
|
|
if err != nil { |
230
|
|
|
return nil, err |
231
|
|
|
} |
232
|
|
|
return out, nil |
233
|
|
|
} |
234
|
|
|
|
235
|
|
|
func (c *permissionClient) SubjectPermission(ctx context.Context, in *PermissionSubjectPermissionRequest, opts ...grpc.CallOption) (*PermissionSubjectPermissionResponse, error) { |
236
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) |
237
|
|
|
out := new(PermissionSubjectPermissionResponse) |
238
|
|
|
err := c.cc.Invoke(ctx, Permission_SubjectPermission_FullMethodName, in, out, cOpts...) |
239
|
|
|
if err != nil { |
240
|
|
|
return nil, err |
241
|
|
|
} |
242
|
|
|
return out, nil |
243
|
|
|
} |
244
|
|
|
|
245
|
|
|
// PermissionServer is the server API for Permission service. |
246
|
|
|
// All implementations must embed UnimplementedPermissionServer |
247
|
|
|
// for forward compatibility |
248
|
|
|
// |
249
|
|
|
// Permission service contains methods to interact with permissions. |
250
|
|
|
type PermissionServer interface { |
251
|
|
|
// Check method receives a PermissionCheckRequest and returns a PermissionCheckResponse. |
252
|
|
|
// It is used to determine whether a specific user has permission to perform an action on a resource. |
253
|
|
|
// For example, "Can the user 1 push to repository 1?" |
254
|
|
|
Check(context.Context, *PermissionCheckRequest) (*PermissionCheckResponse, error) |
255
|
|
|
// Expand method receives a PermissionExpandRequest and returns a PermissionExpandResponse. |
256
|
|
|
// It expands relationships according to the schema provided. |
257
|
|
|
Expand(context.Context, *PermissionExpandRequest) (*PermissionExpandResponse, error) |
258
|
|
|
// LookupEntity method receives a PermissionLookupEntityRequest and returns a PermissionLookupEntityResponse. |
259
|
|
|
// It is used to retrieve an entity by its identifier. |
260
|
|
|
LookupEntity(context.Context, *PermissionLookupEntityRequest) (*PermissionLookupEntityResponse, error) |
261
|
|
|
// LookupEntityStream method receives a PermissionLookupEntityRequest and streams a series of PermissionLookupEntityStreamResponse messages. |
262
|
|
|
// It is used to retrieve entities by their identifiers in a streaming fashion. |
263
|
|
|
LookupEntityStream(*PermissionLookupEntityRequest, Permission_LookupEntityStreamServer) error |
264
|
|
|
// LookupSubject method receives a PermissionLookupSubjectRequest and returns a PermissionLookupSubjectResponse. |
265
|
|
|
// It is used to retrieve a subject by its identifier. |
266
|
|
|
LookupSubject(context.Context, *PermissionLookupSubjectRequest) (*PermissionLookupSubjectResponse, error) |
267
|
|
|
// SubjectPermission method receives a PermissionSubjectPermissionRequest and returns a PermissionSubjectPermissionResponse. |
268
|
|
|
// It is used to retrieve permissions related to a specific subject. |
269
|
|
|
SubjectPermission(context.Context, *PermissionSubjectPermissionRequest) (*PermissionSubjectPermissionResponse, error) |
270
|
|
|
mustEmbedUnimplementedPermissionServer() |
271
|
|
|
} |
272
|
|
|
|
273
|
|
|
// UnimplementedPermissionServer must be embedded to have forward compatible implementations. |
274
|
|
|
type UnimplementedPermissionServer struct { |
275
|
|
|
} |
276
|
|
|
|
277
|
|
|
func (UnimplementedPermissionServer) Check(context.Context, *PermissionCheckRequest) (*PermissionCheckResponse, error) { |
278
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method Check not implemented") |
279
|
|
|
} |
280
|
|
|
func (UnimplementedPermissionServer) Expand(context.Context, *PermissionExpandRequest) (*PermissionExpandResponse, error) { |
281
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method Expand not implemented") |
282
|
|
|
} |
283
|
|
|
func (UnimplementedPermissionServer) LookupEntity(context.Context, *PermissionLookupEntityRequest) (*PermissionLookupEntityResponse, error) { |
284
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method LookupEntity not implemented") |
285
|
|
|
} |
286
|
|
|
func (UnimplementedPermissionServer) LookupEntityStream(*PermissionLookupEntityRequest, Permission_LookupEntityStreamServer) error { |
287
|
|
|
return status.Errorf(codes.Unimplemented, "method LookupEntityStream not implemented") |
288
|
|
|
} |
289
|
|
|
func (UnimplementedPermissionServer) LookupSubject(context.Context, *PermissionLookupSubjectRequest) (*PermissionLookupSubjectResponse, error) { |
290
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method LookupSubject not implemented") |
291
|
|
|
} |
292
|
|
|
func (UnimplementedPermissionServer) SubjectPermission(context.Context, *PermissionSubjectPermissionRequest) (*PermissionSubjectPermissionResponse, error) { |
293
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method SubjectPermission not implemented") |
294
|
|
|
} |
295
|
|
|
func (UnimplementedPermissionServer) mustEmbedUnimplementedPermissionServer() {} |
296
|
|
|
|
297
|
|
|
// UnsafePermissionServer may be embedded to opt out of forward compatibility for this service. |
298
|
|
|
// Use of this interface is not recommended, as added methods to PermissionServer will |
299
|
|
|
// result in compilation errors. |
300
|
|
|
type UnsafePermissionServer interface { |
301
|
|
|
mustEmbedUnimplementedPermissionServer() |
302
|
|
|
} |
303
|
|
|
|
304
|
|
|
func RegisterPermissionServer(s grpc.ServiceRegistrar, srv PermissionServer) { |
305
|
|
|
s.RegisterService(&Permission_ServiceDesc, srv) |
306
|
|
|
} |
307
|
|
|
|
308
|
|
|
func _Permission_Check_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
309
|
|
|
in := new(PermissionCheckRequest) |
310
|
|
|
if err := dec(in); err != nil { |
311
|
|
|
return nil, err |
312
|
|
|
} |
313
|
|
|
if interceptor == nil { |
314
|
|
|
return srv.(PermissionServer).Check(ctx, in) |
315
|
|
|
} |
316
|
|
|
info := &grpc.UnaryServerInfo{ |
317
|
|
|
Server: srv, |
318
|
|
|
FullMethod: Permission_Check_FullMethodName, |
319
|
|
|
} |
320
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
321
|
|
|
return srv.(PermissionServer).Check(ctx, req.(*PermissionCheckRequest)) |
322
|
|
|
} |
323
|
|
|
return interceptor(ctx, in, info, handler) |
324
|
|
|
} |
325
|
|
|
|
326
|
|
|
func _Permission_Expand_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
327
|
|
|
in := new(PermissionExpandRequest) |
328
|
|
|
if err := dec(in); err != nil { |
329
|
|
|
return nil, err |
330
|
|
|
} |
331
|
|
|
if interceptor == nil { |
332
|
|
|
return srv.(PermissionServer).Expand(ctx, in) |
333
|
|
|
} |
334
|
|
|
info := &grpc.UnaryServerInfo{ |
335
|
|
|
Server: srv, |
336
|
|
|
FullMethod: Permission_Expand_FullMethodName, |
337
|
|
|
} |
338
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
339
|
|
|
return srv.(PermissionServer).Expand(ctx, req.(*PermissionExpandRequest)) |
340
|
|
|
} |
341
|
|
|
return interceptor(ctx, in, info, handler) |
342
|
|
|
} |
343
|
|
|
|
344
|
|
|
func _Permission_LookupEntity_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
345
|
|
|
in := new(PermissionLookupEntityRequest) |
346
|
|
|
if err := dec(in); err != nil { |
347
|
|
|
return nil, err |
348
|
|
|
} |
349
|
|
|
if interceptor == nil { |
350
|
|
|
return srv.(PermissionServer).LookupEntity(ctx, in) |
351
|
|
|
} |
352
|
|
|
info := &grpc.UnaryServerInfo{ |
353
|
|
|
Server: srv, |
354
|
|
|
FullMethod: Permission_LookupEntity_FullMethodName, |
355
|
|
|
} |
356
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
357
|
|
|
return srv.(PermissionServer).LookupEntity(ctx, req.(*PermissionLookupEntityRequest)) |
358
|
|
|
} |
359
|
|
|
return interceptor(ctx, in, info, handler) |
360
|
|
|
} |
361
|
|
|
|
362
|
|
|
func _Permission_LookupEntityStream_Handler(srv interface{}, stream grpc.ServerStream) error { |
363
|
|
|
m := new(PermissionLookupEntityRequest) |
364
|
|
|
if err := stream.RecvMsg(m); err != nil { |
365
|
|
|
return err |
366
|
|
|
} |
367
|
|
|
return srv.(PermissionServer).LookupEntityStream(m, &permissionLookupEntityStreamServer{ServerStream: stream}) |
368
|
|
|
} |
369
|
|
|
|
370
|
|
|
type Permission_LookupEntityStreamServer interface { |
371
|
|
|
Send(*PermissionLookupEntityStreamResponse) error |
372
|
|
|
grpc.ServerStream |
373
|
|
|
} |
374
|
|
|
|
375
|
|
|
type permissionLookupEntityStreamServer struct { |
376
|
|
|
grpc.ServerStream |
377
|
|
|
} |
378
|
|
|
|
379
|
|
|
func (x *permissionLookupEntityStreamServer) Send(m *PermissionLookupEntityStreamResponse) error { |
380
|
|
|
return x.ServerStream.SendMsg(m) |
381
|
|
|
} |
382
|
|
|
|
383
|
|
|
func _Permission_LookupSubject_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
384
|
|
|
in := new(PermissionLookupSubjectRequest) |
385
|
|
|
if err := dec(in); err != nil { |
386
|
|
|
return nil, err |
387
|
|
|
} |
388
|
|
|
if interceptor == nil { |
389
|
|
|
return srv.(PermissionServer).LookupSubject(ctx, in) |
390
|
|
|
} |
391
|
|
|
info := &grpc.UnaryServerInfo{ |
392
|
|
|
Server: srv, |
393
|
|
|
FullMethod: Permission_LookupSubject_FullMethodName, |
394
|
|
|
} |
395
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
396
|
|
|
return srv.(PermissionServer).LookupSubject(ctx, req.(*PermissionLookupSubjectRequest)) |
397
|
|
|
} |
398
|
|
|
return interceptor(ctx, in, info, handler) |
399
|
|
|
} |
400
|
|
|
|
401
|
|
|
func _Permission_SubjectPermission_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
402
|
|
|
in := new(PermissionSubjectPermissionRequest) |
403
|
|
|
if err := dec(in); err != nil { |
404
|
|
|
return nil, err |
405
|
|
|
} |
406
|
|
|
if interceptor == nil { |
407
|
|
|
return srv.(PermissionServer).SubjectPermission(ctx, in) |
408
|
|
|
} |
409
|
|
|
info := &grpc.UnaryServerInfo{ |
410
|
|
|
Server: srv, |
411
|
|
|
FullMethod: Permission_SubjectPermission_FullMethodName, |
412
|
|
|
} |
413
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
414
|
|
|
return srv.(PermissionServer).SubjectPermission(ctx, req.(*PermissionSubjectPermissionRequest)) |
415
|
|
|
} |
416
|
|
|
return interceptor(ctx, in, info, handler) |
417
|
|
|
} |
418
|
|
|
|
419
|
|
|
// Permission_ServiceDesc is the grpc.ServiceDesc for Permission service. |
420
|
|
|
// It's only intended for direct use with grpc.RegisterService, |
421
|
|
|
// and not to be introspected or modified (even as a copy) |
422
|
|
|
var Permission_ServiceDesc = grpc.ServiceDesc{ |
423
|
|
|
ServiceName: "base.v1.Permission", |
424
|
|
|
HandlerType: (*PermissionServer)(nil), |
425
|
|
|
Methods: []grpc.MethodDesc{ |
426
|
|
|
{ |
427
|
|
|
MethodName: "Check", |
428
|
|
|
Handler: _Permission_Check_Handler, |
429
|
|
|
}, |
430
|
|
|
{ |
431
|
|
|
MethodName: "Expand", |
432
|
|
|
Handler: _Permission_Expand_Handler, |
433
|
|
|
}, |
434
|
|
|
{ |
435
|
|
|
MethodName: "LookupEntity", |
436
|
|
|
Handler: _Permission_LookupEntity_Handler, |
437
|
|
|
}, |
438
|
|
|
{ |
439
|
|
|
MethodName: "LookupSubject", |
440
|
|
|
Handler: _Permission_LookupSubject_Handler, |
441
|
|
|
}, |
442
|
|
|
{ |
443
|
|
|
MethodName: "SubjectPermission", |
444
|
|
|
Handler: _Permission_SubjectPermission_Handler, |
445
|
|
|
}, |
446
|
|
|
}, |
447
|
|
|
Streams: []grpc.StreamDesc{ |
448
|
|
|
{ |
449
|
|
|
StreamName: "LookupEntityStream", |
450
|
|
|
Handler: _Permission_LookupEntityStream_Handler, |
451
|
|
|
ServerStreams: true, |
452
|
|
|
}, |
453
|
|
|
}, |
454
|
|
|
Metadata: "base/v1/service.proto", |
455
|
|
|
} |
456
|
|
|
|
457
|
|
|
const ( |
458
|
|
|
Watch_Watch_FullMethodName = "/base.v1.Watch/Watch" |
459
|
|
|
) |
460
|
|
|
|
461
|
|
|
// WatchClient is the client API for Watch service. |
462
|
|
|
// |
463
|
|
|
// 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. |
464
|
|
|
// |
465
|
|
|
// Watch is the main RPC in the Watch service. It establishes a stream between |
466
|
|
|
// the client and the server. The server pushes data changes into this stream |
467
|
|
|
// and the client can read those in real time. |
468
|
|
|
type WatchClient interface { |
469
|
|
|
Watch(ctx context.Context, in *WatchRequest, opts ...grpc.CallOption) (Watch_WatchClient, error) |
470
|
|
|
} |
471
|
|
|
|
472
|
|
|
type watchClient struct { |
473
|
|
|
cc grpc.ClientConnInterface |
474
|
|
|
} |
475
|
|
|
|
476
|
|
|
func NewWatchClient(cc grpc.ClientConnInterface) WatchClient { |
477
|
|
|
return &watchClient{cc} |
478
|
|
|
} |
479
|
|
|
|
480
|
|
|
func (c *watchClient) Watch(ctx context.Context, in *WatchRequest, opts ...grpc.CallOption) (Watch_WatchClient, error) { |
481
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) |
482
|
|
|
stream, err := c.cc.NewStream(ctx, &Watch_ServiceDesc.Streams[0], Watch_Watch_FullMethodName, cOpts...) |
483
|
|
|
if err != nil { |
484
|
|
|
return nil, err |
485
|
|
|
} |
486
|
|
|
x := &watchWatchClient{ClientStream: stream} |
487
|
|
|
if err := x.ClientStream.SendMsg(in); err != nil { |
488
|
|
|
return nil, err |
489
|
|
|
} |
490
|
|
|
if err := x.ClientStream.CloseSend(); err != nil { |
491
|
|
|
return nil, err |
492
|
|
|
} |
493
|
|
|
return x, nil |
494
|
|
|
} |
495
|
|
|
|
496
|
|
|
type Watch_WatchClient interface { |
497
|
|
|
Recv() (*WatchResponse, error) |
498
|
|
|
grpc.ClientStream |
499
|
|
|
} |
500
|
|
|
|
501
|
|
|
type watchWatchClient struct { |
502
|
|
|
grpc.ClientStream |
503
|
|
|
} |
504
|
|
|
|
505
|
|
|
func (x *watchWatchClient) Recv() (*WatchResponse, error) { |
506
|
|
|
m := new(WatchResponse) |
507
|
|
|
if err := x.ClientStream.RecvMsg(m); err != nil { |
508
|
|
|
return nil, err |
509
|
|
|
} |
510
|
|
|
return m, nil |
511
|
|
|
} |
512
|
|
|
|
513
|
|
|
// WatchServer is the server API for Watch service. |
514
|
|
|
// All implementations must embed UnimplementedWatchServer |
515
|
|
|
// for forward compatibility |
516
|
|
|
// |
517
|
|
|
// Watch is the main RPC in the Watch service. It establishes a stream between |
518
|
|
|
// the client and the server. The server pushes data changes into this stream |
519
|
|
|
// and the client can read those in real time. |
520
|
|
|
type WatchServer interface { |
521
|
|
|
Watch(*WatchRequest, Watch_WatchServer) error |
522
|
|
|
mustEmbedUnimplementedWatchServer() |
523
|
|
|
} |
524
|
|
|
|
525
|
|
|
// UnimplementedWatchServer must be embedded to have forward compatible implementations. |
526
|
|
|
type UnimplementedWatchServer struct { |
527
|
|
|
} |
528
|
|
|
|
529
|
|
|
func (UnimplementedWatchServer) Watch(*WatchRequest, Watch_WatchServer) error { |
530
|
|
|
return status.Errorf(codes.Unimplemented, "method Watch not implemented") |
531
|
|
|
} |
532
|
|
|
func (UnimplementedWatchServer) mustEmbedUnimplementedWatchServer() {} |
533
|
|
|
|
534
|
|
|
// UnsafeWatchServer may be embedded to opt out of forward compatibility for this service. |
535
|
|
|
// Use of this interface is not recommended, as added methods to WatchServer will |
536
|
|
|
// result in compilation errors. |
537
|
|
|
type UnsafeWatchServer interface { |
538
|
|
|
mustEmbedUnimplementedWatchServer() |
539
|
|
|
} |
540
|
|
|
|
541
|
|
|
func RegisterWatchServer(s grpc.ServiceRegistrar, srv WatchServer) { |
542
|
|
|
s.RegisterService(&Watch_ServiceDesc, srv) |
543
|
|
|
} |
544
|
|
|
|
545
|
|
|
func _Watch_Watch_Handler(srv interface{}, stream grpc.ServerStream) error { |
546
|
|
|
m := new(WatchRequest) |
547
|
|
|
if err := stream.RecvMsg(m); err != nil { |
548
|
|
|
return err |
549
|
|
|
} |
550
|
|
|
return srv.(WatchServer).Watch(m, &watchWatchServer{ServerStream: stream}) |
551
|
|
|
} |
552
|
|
|
|
553
|
|
|
type Watch_WatchServer interface { |
554
|
|
|
Send(*WatchResponse) error |
555
|
|
|
grpc.ServerStream |
556
|
|
|
} |
557
|
|
|
|
558
|
|
|
type watchWatchServer struct { |
559
|
|
|
grpc.ServerStream |
560
|
|
|
} |
561
|
|
|
|
562
|
|
|
func (x *watchWatchServer) Send(m *WatchResponse) error { |
563
|
|
|
return x.ServerStream.SendMsg(m) |
564
|
|
|
} |
565
|
|
|
|
566
|
|
|
// Watch_ServiceDesc is the grpc.ServiceDesc for Watch service. |
567
|
|
|
// It's only intended for direct use with grpc.RegisterService, |
568
|
|
|
// and not to be introspected or modified (even as a copy) |
569
|
|
|
var Watch_ServiceDesc = grpc.ServiceDesc{ |
570
|
|
|
ServiceName: "base.v1.Watch", |
571
|
|
|
HandlerType: (*WatchServer)(nil), |
572
|
|
|
Methods: []grpc.MethodDesc{}, |
573
|
|
|
Streams: []grpc.StreamDesc{ |
574
|
|
|
{ |
575
|
|
|
StreamName: "Watch", |
576
|
|
|
Handler: _Watch_Watch_Handler, |
577
|
|
|
ServerStreams: true, |
578
|
|
|
}, |
579
|
|
|
}, |
580
|
|
|
Metadata: "base/v1/service.proto", |
581
|
|
|
} |
582
|
|
|
|
583
|
|
|
const ( |
584
|
|
|
Schema_Write_FullMethodName = "/base.v1.Schema/Write" |
585
|
|
|
Schema_PartialWrite_FullMethodName = "/base.v1.Schema/PartialWrite" |
586
|
|
|
Schema_Read_FullMethodName = "/base.v1.Schema/Read" |
587
|
|
|
Schema_List_FullMethodName = "/base.v1.Schema/List" |
588
|
|
|
) |
589
|
|
|
|
590
|
|
|
// SchemaClient is the client API for Schema service. |
591
|
|
|
// |
592
|
|
|
// 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. |
593
|
|
|
// |
594
|
|
|
// The Schema service definition. |
595
|
|
|
type SchemaClient interface { |
596
|
|
|
// Write is an RPC that allows you to write your authorization model. |
597
|
|
|
Write(ctx context.Context, in *SchemaWriteRequest, opts ...grpc.CallOption) (*SchemaWriteResponse, error) |
598
|
|
|
// PartialWrite is an RPC that allows you to partially update an existing authorization model. |
599
|
|
|
PartialWrite(ctx context.Context, in *SchemaPartialWriteRequest, opts ...grpc.CallOption) (*SchemaPartialWriteResponse, error) |
600
|
|
|
// Read is an RPC that allows you to read your authorization model. |
601
|
|
|
Read(ctx context.Context, in *SchemaReadRequest, opts ...grpc.CallOption) (*SchemaReadResponse, error) |
602
|
|
|
// List is an RPC that allows you to list all authorization models. |
603
|
|
|
List(ctx context.Context, in *SchemaListRequest, opts ...grpc.CallOption) (*SchemaListResponse, error) |
604
|
|
|
} |
605
|
|
|
|
606
|
|
|
type schemaClient struct { |
607
|
|
|
cc grpc.ClientConnInterface |
608
|
|
|
} |
609
|
|
|
|
610
|
|
|
func NewSchemaClient(cc grpc.ClientConnInterface) SchemaClient { |
611
|
|
|
return &schemaClient{cc} |
612
|
|
|
} |
613
|
|
|
|
614
|
|
|
func (c *schemaClient) Write(ctx context.Context, in *SchemaWriteRequest, opts ...grpc.CallOption) (*SchemaWriteResponse, error) { |
615
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) |
616
|
|
|
out := new(SchemaWriteResponse) |
617
|
|
|
err := c.cc.Invoke(ctx, Schema_Write_FullMethodName, in, out, cOpts...) |
618
|
|
|
if err != nil { |
619
|
|
|
return nil, err |
620
|
|
|
} |
621
|
|
|
return out, nil |
622
|
|
|
} |
623
|
|
|
|
624
|
|
|
func (c *schemaClient) PartialWrite(ctx context.Context, in *SchemaPartialWriteRequest, opts ...grpc.CallOption) (*SchemaPartialWriteResponse, error) { |
625
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) |
626
|
|
|
out := new(SchemaPartialWriteResponse) |
627
|
|
|
err := c.cc.Invoke(ctx, Schema_PartialWrite_FullMethodName, in, out, cOpts...) |
628
|
|
|
if err != nil { |
629
|
|
|
return nil, err |
630
|
|
|
} |
631
|
|
|
return out, nil |
632
|
|
|
} |
633
|
|
|
|
634
|
|
|
func (c *schemaClient) Read(ctx context.Context, in *SchemaReadRequest, opts ...grpc.CallOption) (*SchemaReadResponse, error) { |
635
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) |
636
|
|
|
out := new(SchemaReadResponse) |
637
|
|
|
err := c.cc.Invoke(ctx, Schema_Read_FullMethodName, in, out, cOpts...) |
638
|
|
|
if err != nil { |
639
|
|
|
return nil, err |
640
|
|
|
} |
641
|
|
|
return out, nil |
642
|
|
|
} |
643
|
|
|
|
644
|
|
|
func (c *schemaClient) List(ctx context.Context, in *SchemaListRequest, opts ...grpc.CallOption) (*SchemaListResponse, error) { |
645
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) |
646
|
|
|
out := new(SchemaListResponse) |
647
|
|
|
err := c.cc.Invoke(ctx, Schema_List_FullMethodName, in, out, cOpts...) |
648
|
|
|
if err != nil { |
649
|
|
|
return nil, err |
650
|
|
|
} |
651
|
|
|
return out, nil |
652
|
|
|
} |
653
|
|
|
|
654
|
|
|
// SchemaServer is the server API for Schema service. |
655
|
|
|
// All implementations must embed UnimplementedSchemaServer |
656
|
|
|
// for forward compatibility |
657
|
|
|
// |
658
|
|
|
// The Schema service definition. |
659
|
|
|
type SchemaServer interface { |
660
|
|
|
// Write is an RPC that allows you to write your authorization model. |
661
|
|
|
Write(context.Context, *SchemaWriteRequest) (*SchemaWriteResponse, error) |
662
|
|
|
// PartialWrite is an RPC that allows you to partially update an existing authorization model. |
663
|
|
|
PartialWrite(context.Context, *SchemaPartialWriteRequest) (*SchemaPartialWriteResponse, error) |
664
|
|
|
// Read is an RPC that allows you to read your authorization model. |
665
|
|
|
Read(context.Context, *SchemaReadRequest) (*SchemaReadResponse, error) |
666
|
|
|
// List is an RPC that allows you to list all authorization models. |
667
|
|
|
List(context.Context, *SchemaListRequest) (*SchemaListResponse, error) |
668
|
|
|
mustEmbedUnimplementedSchemaServer() |
669
|
|
|
} |
670
|
|
|
|
671
|
|
|
// UnimplementedSchemaServer must be embedded to have forward compatible implementations. |
672
|
|
|
type UnimplementedSchemaServer struct { |
673
|
|
|
} |
674
|
|
|
|
675
|
|
|
func (UnimplementedSchemaServer) Write(context.Context, *SchemaWriteRequest) (*SchemaWriteResponse, error) { |
676
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method Write not implemented") |
677
|
|
|
} |
678
|
|
|
func (UnimplementedSchemaServer) PartialWrite(context.Context, *SchemaPartialWriteRequest) (*SchemaPartialWriteResponse, error) { |
679
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method PartialWrite not implemented") |
680
|
|
|
} |
681
|
|
|
func (UnimplementedSchemaServer) Read(context.Context, *SchemaReadRequest) (*SchemaReadResponse, error) { |
682
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method Read not implemented") |
683
|
|
|
} |
684
|
|
|
func (UnimplementedSchemaServer) List(context.Context, *SchemaListRequest) (*SchemaListResponse, error) { |
685
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method List not implemented") |
686
|
|
|
} |
687
|
|
|
func (UnimplementedSchemaServer) mustEmbedUnimplementedSchemaServer() {} |
688
|
|
|
|
689
|
|
|
// UnsafeSchemaServer may be embedded to opt out of forward compatibility for this service. |
690
|
|
|
// Use of this interface is not recommended, as added methods to SchemaServer will |
691
|
|
|
// result in compilation errors. |
692
|
|
|
type UnsafeSchemaServer interface { |
693
|
|
|
mustEmbedUnimplementedSchemaServer() |
694
|
|
|
} |
695
|
|
|
|
696
|
|
|
func RegisterSchemaServer(s grpc.ServiceRegistrar, srv SchemaServer) { |
697
|
|
|
s.RegisterService(&Schema_ServiceDesc, srv) |
698
|
|
|
} |
699
|
|
|
|
700
|
|
|
func _Schema_Write_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
701
|
|
|
in := new(SchemaWriteRequest) |
702
|
|
|
if err := dec(in); err != nil { |
703
|
|
|
return nil, err |
704
|
|
|
} |
705
|
|
|
if interceptor == nil { |
706
|
|
|
return srv.(SchemaServer).Write(ctx, in) |
707
|
|
|
} |
708
|
|
|
info := &grpc.UnaryServerInfo{ |
709
|
|
|
Server: srv, |
710
|
|
|
FullMethod: Schema_Write_FullMethodName, |
711
|
|
|
} |
712
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
713
|
|
|
return srv.(SchemaServer).Write(ctx, req.(*SchemaWriteRequest)) |
714
|
|
|
} |
715
|
|
|
return interceptor(ctx, in, info, handler) |
716
|
|
|
} |
717
|
|
|
|
718
|
|
|
func _Schema_PartialWrite_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
719
|
|
|
in := new(SchemaPartialWriteRequest) |
720
|
|
|
if err := dec(in); err != nil { |
721
|
|
|
return nil, err |
722
|
|
|
} |
723
|
|
|
if interceptor == nil { |
724
|
|
|
return srv.(SchemaServer).PartialWrite(ctx, in) |
725
|
|
|
} |
726
|
|
|
info := &grpc.UnaryServerInfo{ |
727
|
|
|
Server: srv, |
728
|
|
|
FullMethod: Schema_PartialWrite_FullMethodName, |
729
|
|
|
} |
730
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
731
|
|
|
return srv.(SchemaServer).PartialWrite(ctx, req.(*SchemaPartialWriteRequest)) |
732
|
|
|
} |
733
|
|
|
return interceptor(ctx, in, info, handler) |
734
|
|
|
} |
735
|
|
|
|
736
|
|
|
func _Schema_Read_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
737
|
|
|
in := new(SchemaReadRequest) |
738
|
|
|
if err := dec(in); err != nil { |
739
|
|
|
return nil, err |
740
|
|
|
} |
741
|
|
|
if interceptor == nil { |
742
|
|
|
return srv.(SchemaServer).Read(ctx, in) |
743
|
|
|
} |
744
|
|
|
info := &grpc.UnaryServerInfo{ |
745
|
|
|
Server: srv, |
746
|
|
|
FullMethod: Schema_Read_FullMethodName, |
747
|
|
|
} |
748
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
749
|
|
|
return srv.(SchemaServer).Read(ctx, req.(*SchemaReadRequest)) |
750
|
|
|
} |
751
|
|
|
return interceptor(ctx, in, info, handler) |
752
|
|
|
} |
753
|
|
|
|
754
|
|
|
func _Schema_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
755
|
|
|
in := new(SchemaListRequest) |
756
|
|
|
if err := dec(in); err != nil { |
757
|
|
|
return nil, err |
758
|
|
|
} |
759
|
|
|
if interceptor == nil { |
760
|
|
|
return srv.(SchemaServer).List(ctx, in) |
761
|
|
|
} |
762
|
|
|
info := &grpc.UnaryServerInfo{ |
763
|
|
|
Server: srv, |
764
|
|
|
FullMethod: Schema_List_FullMethodName, |
765
|
|
|
} |
766
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
767
|
|
|
return srv.(SchemaServer).List(ctx, req.(*SchemaListRequest)) |
768
|
|
|
} |
769
|
|
|
return interceptor(ctx, in, info, handler) |
770
|
|
|
} |
771
|
|
|
|
772
|
|
|
// Schema_ServiceDesc is the grpc.ServiceDesc for Schema service. |
773
|
|
|
// It's only intended for direct use with grpc.RegisterService, |
774
|
|
|
// and not to be introspected or modified (even as a copy) |
775
|
|
|
var Schema_ServiceDesc = grpc.ServiceDesc{ |
776
|
|
|
ServiceName: "base.v1.Schema", |
777
|
|
|
HandlerType: (*SchemaServer)(nil), |
778
|
|
|
Methods: []grpc.MethodDesc{ |
779
|
|
|
{ |
780
|
|
|
MethodName: "Write", |
781
|
|
|
Handler: _Schema_Write_Handler, |
782
|
|
|
}, |
783
|
|
|
{ |
784
|
|
|
MethodName: "PartialWrite", |
785
|
|
|
Handler: _Schema_PartialWrite_Handler, |
786
|
|
|
}, |
787
|
|
|
{ |
788
|
|
|
MethodName: "Read", |
789
|
|
|
Handler: _Schema_Read_Handler, |
790
|
|
|
}, |
791
|
|
|
{ |
792
|
|
|
MethodName: "List", |
793
|
|
|
Handler: _Schema_List_Handler, |
794
|
|
|
}, |
795
|
|
|
}, |
796
|
|
|
Streams: []grpc.StreamDesc{}, |
797
|
|
|
Metadata: "base/v1/service.proto", |
798
|
|
|
} |
799
|
|
|
|
800
|
|
|
const ( |
801
|
|
|
Data_Write_FullMethodName = "/base.v1.Data/Write" |
802
|
|
|
Data_WriteRelationships_FullMethodName = "/base.v1.Data/WriteRelationships" |
803
|
|
|
Data_ReadRelationships_FullMethodName = "/base.v1.Data/ReadRelationships" |
804
|
|
|
Data_ReadAttributes_FullMethodName = "/base.v1.Data/ReadAttributes" |
805
|
|
|
Data_Delete_FullMethodName = "/base.v1.Data/Delete" |
806
|
|
|
Data_DeleteRelationships_FullMethodName = "/base.v1.Data/DeleteRelationships" |
807
|
|
|
Data_RunBundle_FullMethodName = "/base.v1.Data/RunBundle" |
808
|
|
|
) |
809
|
|
|
|
810
|
|
|
// DataClient is the client API for Data service. |
811
|
|
|
// |
812
|
|
|
// 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. |
813
|
|
|
// |
814
|
|
|
// The Data service provides RPC methods for managing data in the context of relationships and attributes. |
815
|
|
|
type DataClient interface { |
816
|
|
|
// The Write RPC method creates a new relation tuple. |
817
|
|
|
Write(ctx context.Context, in *DataWriteRequest, opts ...grpc.CallOption) (*DataWriteResponse, error) |
818
|
|
|
// RPC method to write relationships for a tenant. This can be accessed via a POST request to the given HTTP path. It's tagged under "Data" in OpenAPI documentation. |
819
|
|
|
WriteRelationships(ctx context.Context, in *RelationshipWriteRequest, opts ...grpc.CallOption) (*RelationshipWriteResponse, error) |
820
|
|
|
// The ReadRelationships RPC method reads relation tuple(s). |
821
|
|
|
ReadRelationships(ctx context.Context, in *RelationshipReadRequest, opts ...grpc.CallOption) (*RelationshipReadResponse, error) |
822
|
|
|
// The ReadAttributes RPC method reads attribute(s) of a relation. |
823
|
|
|
ReadAttributes(ctx context.Context, in *AttributeReadRequest, opts ...grpc.CallOption) (*AttributeReadResponse, error) |
824
|
|
|
// The Delete RPC method deletes a relation tuple. |
825
|
|
|
Delete(ctx context.Context, in *DataDeleteRequest, opts ...grpc.CallOption) (*DataDeleteResponse, error) |
826
|
|
|
// RPC method to delete relationships for a tenant, accessed via a POST request to the specified path, tagged as "Data" in OpenAPI documentation. |
827
|
|
|
DeleteRelationships(ctx context.Context, in *RelationshipDeleteRequest, opts ...grpc.CallOption) (*RelationshipDeleteResponse, error) |
828
|
|
|
// Executes or runs a specific bundle. This method is useful for processing or triggering actions based on the bundle's data. |
829
|
|
|
RunBundle(ctx context.Context, in *BundleRunRequest, opts ...grpc.CallOption) (*BundleRunResponse, error) |
830
|
|
|
} |
831
|
|
|
|
832
|
|
|
type dataClient struct { |
833
|
|
|
cc grpc.ClientConnInterface |
834
|
|
|
} |
835
|
|
|
|
836
|
|
|
func NewDataClient(cc grpc.ClientConnInterface) DataClient { |
837
|
|
|
return &dataClient{cc} |
838
|
|
|
} |
839
|
|
|
|
840
|
|
|
func (c *dataClient) Write(ctx context.Context, in *DataWriteRequest, opts ...grpc.CallOption) (*DataWriteResponse, error) { |
841
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) |
842
|
|
|
out := new(DataWriteResponse) |
843
|
|
|
err := c.cc.Invoke(ctx, Data_Write_FullMethodName, in, out, cOpts...) |
844
|
|
|
if err != nil { |
845
|
|
|
return nil, err |
846
|
|
|
} |
847
|
|
|
return out, nil |
848
|
|
|
} |
849
|
|
|
|
850
|
|
|
func (c *dataClient) WriteRelationships(ctx context.Context, in *RelationshipWriteRequest, opts ...grpc.CallOption) (*RelationshipWriteResponse, error) { |
851
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) |
852
|
|
|
out := new(RelationshipWriteResponse) |
853
|
|
|
err := c.cc.Invoke(ctx, Data_WriteRelationships_FullMethodName, in, out, cOpts...) |
854
|
|
|
if err != nil { |
855
|
|
|
return nil, err |
856
|
|
|
} |
857
|
|
|
return out, nil |
858
|
|
|
} |
859
|
|
|
|
860
|
|
|
func (c *dataClient) ReadRelationships(ctx context.Context, in *RelationshipReadRequest, opts ...grpc.CallOption) (*RelationshipReadResponse, error) { |
861
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) |
862
|
|
|
out := new(RelationshipReadResponse) |
863
|
|
|
err := c.cc.Invoke(ctx, Data_ReadRelationships_FullMethodName, in, out, cOpts...) |
864
|
|
|
if err != nil { |
865
|
|
|
return nil, err |
866
|
|
|
} |
867
|
|
|
return out, nil |
868
|
|
|
} |
869
|
|
|
|
870
|
|
|
func (c *dataClient) ReadAttributes(ctx context.Context, in *AttributeReadRequest, opts ...grpc.CallOption) (*AttributeReadResponse, error) { |
871
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) |
872
|
|
|
out := new(AttributeReadResponse) |
873
|
|
|
err := c.cc.Invoke(ctx, Data_ReadAttributes_FullMethodName, in, out, cOpts...) |
874
|
|
|
if err != nil { |
875
|
|
|
return nil, err |
876
|
|
|
} |
877
|
|
|
return out, nil |
878
|
|
|
} |
879
|
|
|
|
880
|
|
|
func (c *dataClient) Delete(ctx context.Context, in *DataDeleteRequest, opts ...grpc.CallOption) (*DataDeleteResponse, error) { |
881
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) |
882
|
|
|
out := new(DataDeleteResponse) |
883
|
|
|
err := c.cc.Invoke(ctx, Data_Delete_FullMethodName, in, out, cOpts...) |
884
|
|
|
if err != nil { |
885
|
|
|
return nil, err |
886
|
|
|
} |
887
|
|
|
return out, nil |
888
|
|
|
} |
889
|
|
|
|
890
|
|
|
func (c *dataClient) DeleteRelationships(ctx context.Context, in *RelationshipDeleteRequest, opts ...grpc.CallOption) (*RelationshipDeleteResponse, error) { |
891
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) |
892
|
|
|
out := new(RelationshipDeleteResponse) |
893
|
|
|
err := c.cc.Invoke(ctx, Data_DeleteRelationships_FullMethodName, in, out, cOpts...) |
894
|
|
|
if err != nil { |
895
|
|
|
return nil, err |
896
|
|
|
} |
897
|
|
|
return out, nil |
898
|
|
|
} |
899
|
|
|
|
900
|
|
|
func (c *dataClient) RunBundle(ctx context.Context, in *BundleRunRequest, opts ...grpc.CallOption) (*BundleRunResponse, error) { |
901
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) |
902
|
|
|
out := new(BundleRunResponse) |
903
|
|
|
err := c.cc.Invoke(ctx, Data_RunBundle_FullMethodName, in, out, cOpts...) |
904
|
|
|
if err != nil { |
905
|
|
|
return nil, err |
906
|
|
|
} |
907
|
|
|
return out, nil |
908
|
|
|
} |
909
|
|
|
|
910
|
|
|
// DataServer is the server API for Data service. |
911
|
|
|
// All implementations must embed UnimplementedDataServer |
912
|
|
|
// for forward compatibility |
913
|
|
|
// |
914
|
|
|
// The Data service provides RPC methods for managing data in the context of relationships and attributes. |
915
|
|
|
type DataServer interface { |
916
|
|
|
// The Write RPC method creates a new relation tuple. |
917
|
|
|
Write(context.Context, *DataWriteRequest) (*DataWriteResponse, error) |
918
|
|
|
// RPC method to write relationships for a tenant. This can be accessed via a POST request to the given HTTP path. It's tagged under "Data" in OpenAPI documentation. |
919
|
|
|
WriteRelationships(context.Context, *RelationshipWriteRequest) (*RelationshipWriteResponse, error) |
920
|
|
|
// The ReadRelationships RPC method reads relation tuple(s). |
921
|
|
|
ReadRelationships(context.Context, *RelationshipReadRequest) (*RelationshipReadResponse, error) |
922
|
|
|
// The ReadAttributes RPC method reads attribute(s) of a relation. |
923
|
|
|
ReadAttributes(context.Context, *AttributeReadRequest) (*AttributeReadResponse, error) |
924
|
|
|
// The Delete RPC method deletes a relation tuple. |
925
|
|
|
Delete(context.Context, *DataDeleteRequest) (*DataDeleteResponse, error) |
926
|
|
|
// RPC method to delete relationships for a tenant, accessed via a POST request to the specified path, tagged as "Data" in OpenAPI documentation. |
927
|
|
|
DeleteRelationships(context.Context, *RelationshipDeleteRequest) (*RelationshipDeleteResponse, error) |
928
|
|
|
// Executes or runs a specific bundle. This method is useful for processing or triggering actions based on the bundle's data. |
929
|
|
|
RunBundle(context.Context, *BundleRunRequest) (*BundleRunResponse, error) |
930
|
|
|
mustEmbedUnimplementedDataServer() |
931
|
|
|
} |
932
|
|
|
|
933
|
|
|
// UnimplementedDataServer must be embedded to have forward compatible implementations. |
934
|
|
|
type UnimplementedDataServer struct { |
935
|
|
|
} |
936
|
|
|
|
937
|
|
|
func (UnimplementedDataServer) Write(context.Context, *DataWriteRequest) (*DataWriteResponse, error) { |
938
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method Write not implemented") |
939
|
|
|
} |
940
|
|
|
func (UnimplementedDataServer) WriteRelationships(context.Context, *RelationshipWriteRequest) (*RelationshipWriteResponse, error) { |
941
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method WriteRelationships not implemented") |
942
|
|
|
} |
943
|
|
|
func (UnimplementedDataServer) ReadRelationships(context.Context, *RelationshipReadRequest) (*RelationshipReadResponse, error) { |
944
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method ReadRelationships not implemented") |
945
|
|
|
} |
946
|
|
|
func (UnimplementedDataServer) ReadAttributes(context.Context, *AttributeReadRequest) (*AttributeReadResponse, error) { |
947
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method ReadAttributes not implemented") |
948
|
|
|
} |
949
|
|
|
func (UnimplementedDataServer) Delete(context.Context, *DataDeleteRequest) (*DataDeleteResponse, error) { |
950
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") |
951
|
|
|
} |
952
|
|
|
func (UnimplementedDataServer) DeleteRelationships(context.Context, *RelationshipDeleteRequest) (*RelationshipDeleteResponse, error) { |
953
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method DeleteRelationships not implemented") |
954
|
|
|
} |
955
|
|
|
func (UnimplementedDataServer) RunBundle(context.Context, *BundleRunRequest) (*BundleRunResponse, error) { |
956
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method RunBundle not implemented") |
957
|
|
|
} |
958
|
|
|
func (UnimplementedDataServer) mustEmbedUnimplementedDataServer() {} |
959
|
|
|
|
960
|
|
|
// UnsafeDataServer may be embedded to opt out of forward compatibility for this service. |
961
|
|
|
// Use of this interface is not recommended, as added methods to DataServer will |
962
|
|
|
// result in compilation errors. |
963
|
|
|
type UnsafeDataServer interface { |
964
|
|
|
mustEmbedUnimplementedDataServer() |
965
|
|
|
} |
966
|
|
|
|
967
|
|
|
func RegisterDataServer(s grpc.ServiceRegistrar, srv DataServer) { |
968
|
|
|
s.RegisterService(&Data_ServiceDesc, srv) |
969
|
|
|
} |
970
|
|
|
|
971
|
|
|
func _Data_Write_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
972
|
|
|
in := new(DataWriteRequest) |
973
|
|
|
if err := dec(in); err != nil { |
974
|
|
|
return nil, err |
975
|
|
|
} |
976
|
|
|
if interceptor == nil { |
977
|
|
|
return srv.(DataServer).Write(ctx, in) |
978
|
|
|
} |
979
|
|
|
info := &grpc.UnaryServerInfo{ |
980
|
|
|
Server: srv, |
981
|
|
|
FullMethod: Data_Write_FullMethodName, |
982
|
|
|
} |
983
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
984
|
|
|
return srv.(DataServer).Write(ctx, req.(*DataWriteRequest)) |
985
|
|
|
} |
986
|
|
|
return interceptor(ctx, in, info, handler) |
987
|
|
|
} |
988
|
|
|
|
989
|
|
|
func _Data_WriteRelationships_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
990
|
|
|
in := new(RelationshipWriteRequest) |
991
|
|
|
if err := dec(in); err != nil { |
992
|
|
|
return nil, err |
993
|
|
|
} |
994
|
|
|
if interceptor == nil { |
995
|
|
|
return srv.(DataServer).WriteRelationships(ctx, in) |
996
|
|
|
} |
997
|
|
|
info := &grpc.UnaryServerInfo{ |
998
|
|
|
Server: srv, |
999
|
|
|
FullMethod: Data_WriteRelationships_FullMethodName, |
1000
|
|
|
} |
1001
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
1002
|
|
|
return srv.(DataServer).WriteRelationships(ctx, req.(*RelationshipWriteRequest)) |
1003
|
|
|
} |
1004
|
|
|
return interceptor(ctx, in, info, handler) |
1005
|
|
|
} |
1006
|
|
|
|
1007
|
|
|
func _Data_ReadRelationships_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
1008
|
|
|
in := new(RelationshipReadRequest) |
1009
|
|
|
if err := dec(in); err != nil { |
1010
|
|
|
return nil, err |
1011
|
|
|
} |
1012
|
|
|
if interceptor == nil { |
1013
|
|
|
return srv.(DataServer).ReadRelationships(ctx, in) |
1014
|
|
|
} |
1015
|
|
|
info := &grpc.UnaryServerInfo{ |
1016
|
|
|
Server: srv, |
1017
|
|
|
FullMethod: Data_ReadRelationships_FullMethodName, |
1018
|
|
|
} |
1019
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
1020
|
|
|
return srv.(DataServer).ReadRelationships(ctx, req.(*RelationshipReadRequest)) |
1021
|
|
|
} |
1022
|
|
|
return interceptor(ctx, in, info, handler) |
1023
|
|
|
} |
1024
|
|
|
|
1025
|
|
|
func _Data_ReadAttributes_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
1026
|
|
|
in := new(AttributeReadRequest) |
1027
|
|
|
if err := dec(in); err != nil { |
1028
|
|
|
return nil, err |
1029
|
|
|
} |
1030
|
|
|
if interceptor == nil { |
1031
|
|
|
return srv.(DataServer).ReadAttributes(ctx, in) |
1032
|
|
|
} |
1033
|
|
|
info := &grpc.UnaryServerInfo{ |
1034
|
|
|
Server: srv, |
1035
|
|
|
FullMethod: Data_ReadAttributes_FullMethodName, |
1036
|
|
|
} |
1037
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
1038
|
|
|
return srv.(DataServer).ReadAttributes(ctx, req.(*AttributeReadRequest)) |
1039
|
|
|
} |
1040
|
|
|
return interceptor(ctx, in, info, handler) |
1041
|
|
|
} |
1042
|
|
|
|
1043
|
|
|
func _Data_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
1044
|
|
|
in := new(DataDeleteRequest) |
1045
|
|
|
if err := dec(in); err != nil { |
1046
|
|
|
return nil, err |
1047
|
|
|
} |
1048
|
|
|
if interceptor == nil { |
1049
|
|
|
return srv.(DataServer).Delete(ctx, in) |
1050
|
|
|
} |
1051
|
|
|
info := &grpc.UnaryServerInfo{ |
1052
|
|
|
Server: srv, |
1053
|
|
|
FullMethod: Data_Delete_FullMethodName, |
1054
|
|
|
} |
1055
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
1056
|
|
|
return srv.(DataServer).Delete(ctx, req.(*DataDeleteRequest)) |
1057
|
|
|
} |
1058
|
|
|
return interceptor(ctx, in, info, handler) |
1059
|
|
|
} |
1060
|
|
|
|
1061
|
|
|
func _Data_DeleteRelationships_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
1062
|
|
|
in := new(RelationshipDeleteRequest) |
1063
|
|
|
if err := dec(in); err != nil { |
1064
|
|
|
return nil, err |
1065
|
|
|
} |
1066
|
|
|
if interceptor == nil { |
1067
|
|
|
return srv.(DataServer).DeleteRelationships(ctx, in) |
1068
|
|
|
} |
1069
|
|
|
info := &grpc.UnaryServerInfo{ |
1070
|
|
|
Server: srv, |
1071
|
|
|
FullMethod: Data_DeleteRelationships_FullMethodName, |
1072
|
|
|
} |
1073
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
1074
|
|
|
return srv.(DataServer).DeleteRelationships(ctx, req.(*RelationshipDeleteRequest)) |
1075
|
|
|
} |
1076
|
|
|
return interceptor(ctx, in, info, handler) |
1077
|
|
|
} |
1078
|
|
|
|
1079
|
|
|
func _Data_RunBundle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
1080
|
|
|
in := new(BundleRunRequest) |
1081
|
|
|
if err := dec(in); err != nil { |
1082
|
|
|
return nil, err |
1083
|
|
|
} |
1084
|
|
|
if interceptor == nil { |
1085
|
|
|
return srv.(DataServer).RunBundle(ctx, in) |
1086
|
|
|
} |
1087
|
|
|
info := &grpc.UnaryServerInfo{ |
1088
|
|
|
Server: srv, |
1089
|
|
|
FullMethod: Data_RunBundle_FullMethodName, |
1090
|
|
|
} |
1091
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
1092
|
|
|
return srv.(DataServer).RunBundle(ctx, req.(*BundleRunRequest)) |
1093
|
|
|
} |
1094
|
|
|
return interceptor(ctx, in, info, handler) |
1095
|
|
|
} |
1096
|
|
|
|
1097
|
|
|
// Data_ServiceDesc is the grpc.ServiceDesc for Data service. |
1098
|
|
|
// It's only intended for direct use with grpc.RegisterService, |
1099
|
|
|
// and not to be introspected or modified (even as a copy) |
1100
|
|
|
var Data_ServiceDesc = grpc.ServiceDesc{ |
1101
|
|
|
ServiceName: "base.v1.Data", |
1102
|
|
|
HandlerType: (*DataServer)(nil), |
1103
|
|
|
Methods: []grpc.MethodDesc{ |
1104
|
|
|
{ |
1105
|
|
|
MethodName: "Write", |
1106
|
|
|
Handler: _Data_Write_Handler, |
1107
|
|
|
}, |
1108
|
|
|
{ |
1109
|
|
|
MethodName: "WriteRelationships", |
1110
|
|
|
Handler: _Data_WriteRelationships_Handler, |
1111
|
|
|
}, |
1112
|
|
|
{ |
1113
|
|
|
MethodName: "ReadRelationships", |
1114
|
|
|
Handler: _Data_ReadRelationships_Handler, |
1115
|
|
|
}, |
1116
|
|
|
{ |
1117
|
|
|
MethodName: "ReadAttributes", |
1118
|
|
|
Handler: _Data_ReadAttributes_Handler, |
1119
|
|
|
}, |
1120
|
|
|
{ |
1121
|
|
|
MethodName: "Delete", |
1122
|
|
|
Handler: _Data_Delete_Handler, |
1123
|
|
|
}, |
1124
|
|
|
{ |
1125
|
|
|
MethodName: "DeleteRelationships", |
1126
|
|
|
Handler: _Data_DeleteRelationships_Handler, |
1127
|
|
|
}, |
1128
|
|
|
{ |
1129
|
|
|
MethodName: "RunBundle", |
1130
|
|
|
Handler: _Data_RunBundle_Handler, |
1131
|
|
|
}, |
1132
|
|
|
}, |
1133
|
|
|
Streams: []grpc.StreamDesc{}, |
1134
|
|
|
Metadata: "base/v1/service.proto", |
1135
|
|
|
} |
1136
|
|
|
|
1137
|
|
|
const ( |
1138
|
|
|
Bundle_Write_FullMethodName = "/base.v1.Bundle/Write" |
1139
|
|
|
Bundle_Read_FullMethodName = "/base.v1.Bundle/Read" |
1140
|
|
|
Bundle_Delete_FullMethodName = "/base.v1.Bundle/Delete" |
1141
|
|
|
) |
1142
|
|
|
|
1143
|
|
|
// BundleClient is the client API for Bundle service. |
1144
|
|
|
// |
1145
|
|
|
// 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. |
1146
|
|
|
type BundleClient interface { |
1147
|
|
|
// Writes a bundle of data for a specific operation. This is a general purpose method to handle writing data bundles. |
1148
|
|
|
Write(ctx context.Context, in *BundleWriteRequest, opts ...grpc.CallOption) (*BundleWriteResponse, error) |
1149
|
|
|
// Reads a data bundle based on a specified request. This method is tailored for retrieving data bundles. |
1150
|
|
|
Read(ctx context.Context, in *BundleReadRequest, opts ...grpc.CallOption) (*BundleReadResponse, error) |
1151
|
|
|
// Deletes a specific data bundle. This method is used to remove existing bundles from the system. |
1152
|
|
|
Delete(ctx context.Context, in *BundleDeleteRequest, opts ...grpc.CallOption) (*BundleDeleteResponse, error) |
1153
|
|
|
} |
1154
|
|
|
|
1155
|
|
|
type bundleClient struct { |
1156
|
|
|
cc grpc.ClientConnInterface |
1157
|
|
|
} |
1158
|
|
|
|
1159
|
|
|
func NewBundleClient(cc grpc.ClientConnInterface) BundleClient { |
1160
|
|
|
return &bundleClient{cc} |
1161
|
|
|
} |
1162
|
|
|
|
1163
|
|
|
func (c *bundleClient) Write(ctx context.Context, in *BundleWriteRequest, opts ...grpc.CallOption) (*BundleWriteResponse, error) { |
1164
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) |
1165
|
|
|
out := new(BundleWriteResponse) |
1166
|
|
|
err := c.cc.Invoke(ctx, Bundle_Write_FullMethodName, in, out, cOpts...) |
1167
|
|
|
if err != nil { |
1168
|
|
|
return nil, err |
1169
|
|
|
} |
1170
|
|
|
return out, nil |
1171
|
|
|
} |
1172
|
|
|
|
1173
|
|
|
func (c *bundleClient) Read(ctx context.Context, in *BundleReadRequest, opts ...grpc.CallOption) (*BundleReadResponse, error) { |
1174
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) |
1175
|
|
|
out := new(BundleReadResponse) |
1176
|
|
|
err := c.cc.Invoke(ctx, Bundle_Read_FullMethodName, in, out, cOpts...) |
1177
|
|
|
if err != nil { |
1178
|
|
|
return nil, err |
1179
|
|
|
} |
1180
|
|
|
return out, nil |
1181
|
|
|
} |
1182
|
|
|
|
1183
|
|
|
func (c *bundleClient) Delete(ctx context.Context, in *BundleDeleteRequest, opts ...grpc.CallOption) (*BundleDeleteResponse, error) { |
1184
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) |
1185
|
|
|
out := new(BundleDeleteResponse) |
1186
|
|
|
err := c.cc.Invoke(ctx, Bundle_Delete_FullMethodName, in, out, cOpts...) |
1187
|
|
|
if err != nil { |
1188
|
|
|
return nil, err |
1189
|
|
|
} |
1190
|
|
|
return out, nil |
1191
|
|
|
} |
1192
|
|
|
|
1193
|
|
|
// BundleServer is the server API for Bundle service. |
1194
|
|
|
// All implementations must embed UnimplementedBundleServer |
1195
|
|
|
// for forward compatibility |
1196
|
|
|
type BundleServer interface { |
1197
|
|
|
// Writes a bundle of data for a specific operation. This is a general purpose method to handle writing data bundles. |
1198
|
|
|
Write(context.Context, *BundleWriteRequest) (*BundleWriteResponse, error) |
1199
|
|
|
// Reads a data bundle based on a specified request. This method is tailored for retrieving data bundles. |
1200
|
|
|
Read(context.Context, *BundleReadRequest) (*BundleReadResponse, error) |
1201
|
|
|
// Deletes a specific data bundle. This method is used to remove existing bundles from the system. |
1202
|
|
|
Delete(context.Context, *BundleDeleteRequest) (*BundleDeleteResponse, error) |
1203
|
|
|
mustEmbedUnimplementedBundleServer() |
1204
|
|
|
} |
1205
|
|
|
|
1206
|
|
|
// UnimplementedBundleServer must be embedded to have forward compatible implementations. |
1207
|
|
|
type UnimplementedBundleServer struct { |
1208
|
|
|
} |
1209
|
|
|
|
1210
|
|
|
func (UnimplementedBundleServer) Write(context.Context, *BundleWriteRequest) (*BundleWriteResponse, error) { |
1211
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method Write not implemented") |
1212
|
|
|
} |
1213
|
|
|
func (UnimplementedBundleServer) Read(context.Context, *BundleReadRequest) (*BundleReadResponse, error) { |
1214
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method Read not implemented") |
1215
|
|
|
} |
1216
|
|
|
func (UnimplementedBundleServer) Delete(context.Context, *BundleDeleteRequest) (*BundleDeleteResponse, error) { |
1217
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") |
1218
|
|
|
} |
1219
|
|
|
func (UnimplementedBundleServer) mustEmbedUnimplementedBundleServer() {} |
1220
|
|
|
|
1221
|
|
|
// UnsafeBundleServer may be embedded to opt out of forward compatibility for this service. |
1222
|
|
|
// Use of this interface is not recommended, as added methods to BundleServer will |
1223
|
|
|
// result in compilation errors. |
1224
|
|
|
type UnsafeBundleServer interface { |
1225
|
|
|
mustEmbedUnimplementedBundleServer() |
1226
|
|
|
} |
1227
|
|
|
|
1228
|
|
|
func RegisterBundleServer(s grpc.ServiceRegistrar, srv BundleServer) { |
1229
|
|
|
s.RegisterService(&Bundle_ServiceDesc, srv) |
1230
|
|
|
} |
1231
|
|
|
|
1232
|
|
|
func _Bundle_Write_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
1233
|
|
|
in := new(BundleWriteRequest) |
1234
|
|
|
if err := dec(in); err != nil { |
1235
|
|
|
return nil, err |
1236
|
|
|
} |
1237
|
|
|
if interceptor == nil { |
1238
|
|
|
return srv.(BundleServer).Write(ctx, in) |
1239
|
|
|
} |
1240
|
|
|
info := &grpc.UnaryServerInfo{ |
1241
|
|
|
Server: srv, |
1242
|
|
|
FullMethod: Bundle_Write_FullMethodName, |
1243
|
|
|
} |
1244
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
1245
|
|
|
return srv.(BundleServer).Write(ctx, req.(*BundleWriteRequest)) |
1246
|
|
|
} |
1247
|
|
|
return interceptor(ctx, in, info, handler) |
1248
|
|
|
} |
1249
|
|
|
|
1250
|
|
|
func _Bundle_Read_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
1251
|
|
|
in := new(BundleReadRequest) |
1252
|
|
|
if err := dec(in); err != nil { |
1253
|
|
|
return nil, err |
1254
|
|
|
} |
1255
|
|
|
if interceptor == nil { |
1256
|
|
|
return srv.(BundleServer).Read(ctx, in) |
1257
|
|
|
} |
1258
|
|
|
info := &grpc.UnaryServerInfo{ |
1259
|
|
|
Server: srv, |
1260
|
|
|
FullMethod: Bundle_Read_FullMethodName, |
1261
|
|
|
} |
1262
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
1263
|
|
|
return srv.(BundleServer).Read(ctx, req.(*BundleReadRequest)) |
1264
|
|
|
} |
1265
|
|
|
return interceptor(ctx, in, info, handler) |
1266
|
|
|
} |
1267
|
|
|
|
1268
|
|
|
func _Bundle_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
1269
|
|
|
in := new(BundleDeleteRequest) |
1270
|
|
|
if err := dec(in); err != nil { |
1271
|
|
|
return nil, err |
1272
|
|
|
} |
1273
|
|
|
if interceptor == nil { |
1274
|
|
|
return srv.(BundleServer).Delete(ctx, in) |
1275
|
|
|
} |
1276
|
|
|
info := &grpc.UnaryServerInfo{ |
1277
|
|
|
Server: srv, |
1278
|
|
|
FullMethod: Bundle_Delete_FullMethodName, |
1279
|
|
|
} |
1280
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
1281
|
|
|
return srv.(BundleServer).Delete(ctx, req.(*BundleDeleteRequest)) |
1282
|
|
|
} |
1283
|
|
|
return interceptor(ctx, in, info, handler) |
1284
|
|
|
} |
1285
|
|
|
|
1286
|
|
|
// Bundle_ServiceDesc is the grpc.ServiceDesc for Bundle service. |
1287
|
|
|
// It's only intended for direct use with grpc.RegisterService, |
1288
|
|
|
// and not to be introspected or modified (even as a copy) |
1289
|
|
|
var Bundle_ServiceDesc = grpc.ServiceDesc{ |
1290
|
|
|
ServiceName: "base.v1.Bundle", |
1291
|
|
|
HandlerType: (*BundleServer)(nil), |
1292
|
|
|
Methods: []grpc.MethodDesc{ |
1293
|
|
|
{ |
1294
|
|
|
MethodName: "Write", |
1295
|
|
|
Handler: _Bundle_Write_Handler, |
1296
|
|
|
}, |
1297
|
|
|
{ |
1298
|
|
|
MethodName: "Read", |
1299
|
|
|
Handler: _Bundle_Read_Handler, |
1300
|
|
|
}, |
1301
|
|
|
{ |
1302
|
|
|
MethodName: "Delete", |
1303
|
|
|
Handler: _Bundle_Delete_Handler, |
1304
|
|
|
}, |
1305
|
|
|
}, |
1306
|
|
|
Streams: []grpc.StreamDesc{}, |
1307
|
|
|
Metadata: "base/v1/service.proto", |
1308
|
|
|
} |
1309
|
|
|
|
1310
|
|
|
const ( |
1311
|
|
|
Tenancy_Create_FullMethodName = "/base.v1.Tenancy/Create" |
1312
|
|
|
Tenancy_Delete_FullMethodName = "/base.v1.Tenancy/Delete" |
1313
|
|
|
Tenancy_List_FullMethodName = "/base.v1.Tenancy/List" |
1314
|
|
|
) |
1315
|
|
|
|
1316
|
|
|
// TenancyClient is the client API for Tenancy service. |
1317
|
|
|
// |
1318
|
|
|
// 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. |
1319
|
|
|
type TenancyClient interface { |
1320
|
|
|
// Create is a unary RPC to create a new tenant. |
1321
|
|
|
// It requires a TenantCreateRequest and returns a TenantCreateResponse. |
1322
|
|
|
Create(ctx context.Context, in *TenantCreateRequest, opts ...grpc.CallOption) (*TenantCreateResponse, error) |
1323
|
|
|
// Delete is a unary RPC to delete an existing tenant. |
1324
|
|
|
// It requires a TenantDeleteRequest and returns a TenantDeleteResponse. |
1325
|
|
|
Delete(ctx context.Context, in *TenantDeleteRequest, opts ...grpc.CallOption) (*TenantDeleteResponse, error) |
1326
|
|
|
// List is a unary RPC to get a list of all tenants. |
1327
|
|
|
// It requires a TenantListRequest and returns a TenantListResponse. |
1328
|
|
|
List(ctx context.Context, in *TenantListRequest, opts ...grpc.CallOption) (*TenantListResponse, error) |
1329
|
|
|
} |
1330
|
|
|
|
1331
|
|
|
type tenancyClient struct { |
1332
|
|
|
cc grpc.ClientConnInterface |
1333
|
|
|
} |
1334
|
|
|
|
1335
|
|
|
func NewTenancyClient(cc grpc.ClientConnInterface) TenancyClient { |
1336
|
|
|
return &tenancyClient{cc} |
1337
|
|
|
} |
1338
|
|
|
|
1339
|
|
|
func (c *tenancyClient) Create(ctx context.Context, in *TenantCreateRequest, opts ...grpc.CallOption) (*TenantCreateResponse, error) { |
1340
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) |
1341
|
|
|
out := new(TenantCreateResponse) |
1342
|
|
|
err := c.cc.Invoke(ctx, Tenancy_Create_FullMethodName, in, out, cOpts...) |
1343
|
|
|
if err != nil { |
1344
|
|
|
return nil, err |
1345
|
|
|
} |
1346
|
|
|
return out, nil |
1347
|
|
|
} |
1348
|
|
|
|
1349
|
|
|
func (c *tenancyClient) Delete(ctx context.Context, in *TenantDeleteRequest, opts ...grpc.CallOption) (*TenantDeleteResponse, error) { |
1350
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) |
1351
|
|
|
out := new(TenantDeleteResponse) |
1352
|
|
|
err := c.cc.Invoke(ctx, Tenancy_Delete_FullMethodName, in, out, cOpts...) |
1353
|
|
|
if err != nil { |
1354
|
|
|
return nil, err |
1355
|
|
|
} |
1356
|
|
|
return out, nil |
1357
|
|
|
} |
1358
|
|
|
|
1359
|
|
|
func (c *tenancyClient) List(ctx context.Context, in *TenantListRequest, opts ...grpc.CallOption) (*TenantListResponse, error) { |
1360
|
|
|
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) |
1361
|
|
|
out := new(TenantListResponse) |
1362
|
|
|
err := c.cc.Invoke(ctx, Tenancy_List_FullMethodName, in, out, cOpts...) |
1363
|
|
|
if err != nil { |
1364
|
|
|
return nil, err |
1365
|
|
|
} |
1366
|
|
|
return out, nil |
1367
|
|
|
} |
1368
|
|
|
|
1369
|
|
|
// TenancyServer is the server API for Tenancy service. |
1370
|
|
|
// All implementations must embed UnimplementedTenancyServer |
1371
|
|
|
// for forward compatibility |
1372
|
|
|
type TenancyServer interface { |
1373
|
|
|
// Create is a unary RPC to create a new tenant. |
1374
|
|
|
// It requires a TenantCreateRequest and returns a TenantCreateResponse. |
1375
|
|
|
Create(context.Context, *TenantCreateRequest) (*TenantCreateResponse, error) |
1376
|
|
|
// Delete is a unary RPC to delete an existing tenant. |
1377
|
|
|
// It requires a TenantDeleteRequest and returns a TenantDeleteResponse. |
1378
|
|
|
Delete(context.Context, *TenantDeleteRequest) (*TenantDeleteResponse, error) |
1379
|
|
|
// List is a unary RPC to get a list of all tenants. |
1380
|
|
|
// It requires a TenantListRequest and returns a TenantListResponse. |
1381
|
|
|
List(context.Context, *TenantListRequest) (*TenantListResponse, error) |
1382
|
|
|
mustEmbedUnimplementedTenancyServer() |
1383
|
|
|
} |
1384
|
|
|
|
1385
|
|
|
// UnimplementedTenancyServer must be embedded to have forward compatible implementations. |
1386
|
|
|
type UnimplementedTenancyServer struct { |
1387
|
|
|
} |
1388
|
|
|
|
1389
|
|
|
func (UnimplementedTenancyServer) Create(context.Context, *TenantCreateRequest) (*TenantCreateResponse, error) { |
1390
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented") |
1391
|
|
|
} |
1392
|
|
|
func (UnimplementedTenancyServer) Delete(context.Context, *TenantDeleteRequest) (*TenantDeleteResponse, error) { |
1393
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented") |
1394
|
|
|
} |
1395
|
|
|
func (UnimplementedTenancyServer) List(context.Context, *TenantListRequest) (*TenantListResponse, error) { |
1396
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method List not implemented") |
1397
|
|
|
} |
1398
|
|
|
func (UnimplementedTenancyServer) mustEmbedUnimplementedTenancyServer() {} |
1399
|
|
|
|
1400
|
|
|
// UnsafeTenancyServer may be embedded to opt out of forward compatibility for this service. |
1401
|
|
|
// Use of this interface is not recommended, as added methods to TenancyServer will |
1402
|
|
|
// result in compilation errors. |
1403
|
|
|
type UnsafeTenancyServer interface { |
1404
|
|
|
mustEmbedUnimplementedTenancyServer() |
1405
|
|
|
} |
1406
|
|
|
|
1407
|
|
|
func RegisterTenancyServer(s grpc.ServiceRegistrar, srv TenancyServer) { |
1408
|
|
|
s.RegisterService(&Tenancy_ServiceDesc, srv) |
1409
|
|
|
} |
1410
|
|
|
|
1411
|
|
|
func _Tenancy_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
1412
|
|
|
in := new(TenantCreateRequest) |
1413
|
|
|
if err := dec(in); err != nil { |
1414
|
|
|
return nil, err |
1415
|
|
|
} |
1416
|
|
|
if interceptor == nil { |
1417
|
|
|
return srv.(TenancyServer).Create(ctx, in) |
1418
|
|
|
} |
1419
|
|
|
info := &grpc.UnaryServerInfo{ |
1420
|
|
|
Server: srv, |
1421
|
|
|
FullMethod: Tenancy_Create_FullMethodName, |
1422
|
|
|
} |
1423
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
1424
|
|
|
return srv.(TenancyServer).Create(ctx, req.(*TenantCreateRequest)) |
1425
|
|
|
} |
1426
|
|
|
return interceptor(ctx, in, info, handler) |
1427
|
|
|
} |
1428
|
|
|
|
1429
|
|
|
func _Tenancy_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
1430
|
|
|
in := new(TenantDeleteRequest) |
1431
|
|
|
if err := dec(in); err != nil { |
1432
|
|
|
return nil, err |
1433
|
|
|
} |
1434
|
|
|
if interceptor == nil { |
1435
|
|
|
return srv.(TenancyServer).Delete(ctx, in) |
1436
|
|
|
} |
1437
|
|
|
info := &grpc.UnaryServerInfo{ |
1438
|
|
|
Server: srv, |
1439
|
|
|
FullMethod: Tenancy_Delete_FullMethodName, |
1440
|
|
|
} |
1441
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
1442
|
|
|
return srv.(TenancyServer).Delete(ctx, req.(*TenantDeleteRequest)) |
1443
|
|
|
} |
1444
|
|
|
return interceptor(ctx, in, info, handler) |
1445
|
|
|
} |
1446
|
|
|
|
1447
|
|
|
func _Tenancy_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { |
1448
|
|
|
in := new(TenantListRequest) |
1449
|
|
|
if err := dec(in); err != nil { |
1450
|
|
|
return nil, err |
1451
|
|
|
} |
1452
|
|
|
if interceptor == nil { |
1453
|
|
|
return srv.(TenancyServer).List(ctx, in) |
1454
|
|
|
} |
1455
|
|
|
info := &grpc.UnaryServerInfo{ |
1456
|
|
|
Server: srv, |
1457
|
|
|
FullMethod: Tenancy_List_FullMethodName, |
1458
|
|
|
} |
1459
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) { |
1460
|
|
|
return srv.(TenancyServer).List(ctx, req.(*TenantListRequest)) |
1461
|
|
|
} |
1462
|
|
|
return interceptor(ctx, in, info, handler) |
1463
|
|
|
} |
1464
|
|
|
|
1465
|
|
|
// Tenancy_ServiceDesc is the grpc.ServiceDesc for Tenancy service. |
1466
|
|
|
// It's only intended for direct use with grpc.RegisterService, |
1467
|
|
|
// and not to be introspected or modified (even as a copy) |
1468
|
|
|
var Tenancy_ServiceDesc = grpc.ServiceDesc{ |
1469
|
|
|
ServiceName: "base.v1.Tenancy", |
1470
|
|
|
HandlerType: (*TenancyServer)(nil), |
1471
|
|
|
Methods: []grpc.MethodDesc{ |
1472
|
|
|
{ |
1473
|
|
|
MethodName: "Create", |
1474
|
|
|
Handler: _Tenancy_Create_Handler, |
1475
|
|
|
}, |
1476
|
|
|
{ |
1477
|
|
|
MethodName: "Delete", |
1478
|
|
|
Handler: _Tenancy_Delete_Handler, |
1479
|
|
|
}, |
1480
|
|
|
{ |
1481
|
|
|
MethodName: "List", |
1482
|
|
|
Handler: _Tenancy_List_Handler, |
1483
|
|
|
}, |
1484
|
|
|
}, |
1485
|
|
|
Streams: []grpc.StreamDesc{}, |
1486
|
|
|
Metadata: "base/v1/service.proto", |
1487
|
|
|
} |
1488
|
|
|
|