blob: d9250b20e885d164639ab0e9fdeb4c28328d4371 [file] [log] [blame]
avm9996383f8f292021-08-24 18:26:52 +02001// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
2
3package api_proto
4
5import (
6 context "context"
7 grpc "google.golang.org/grpc"
8 codes "google.golang.org/grpc/codes"
9 status "google.golang.org/grpc/status"
10)
11
12// This is a compile-time assertion to ensure that this generated file
13// is compatible with the grpc package it is being compiled against.
14// Requires gRPC-Go v1.32.0 or later.
15const _ = grpc.SupportPackageIsVersion7
16
17// KillSwitchServiceClient is the client API for KillSwitchService service.
18//
19// 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.
20type KillSwitchServiceClient interface {
21 GetKillSwitchStatus(ctx context.Context, in *GetKillSwitchStatusRequest, opts ...grpc.CallOption) (*GetKillSwitchStatusResponse, error)
22 GetKillSwitchOverview(ctx context.Context, in *GetKillSwitchOverviewRequest, opts ...grpc.CallOption) (*GetKillSwitchOverviewResponse, error)
23 ListFeatures(ctx context.Context, in *ListFeaturesRequest, opts ...grpc.CallOption) (*ListFeaturesResponse, error)
24 SyncFeatures(ctx context.Context, in *SyncFeaturesRequest, opts ...grpc.CallOption) (*SyncFeaturesResponse, error)
25 EnableKillSwitch(ctx context.Context, in *EnableKillSwitchRequest, opts ...grpc.CallOption) (*EnableKillSwitchResponse, error)
26 DisableKillSwitch(ctx context.Context, in *DisableKillSwitchRequest, opts ...grpc.CallOption) (*DisableKillSwitchResponse, error)
27 ListAuthorizedUsers(ctx context.Context, in *ListAuthorizedUsersRequest, opts ...grpc.CallOption) (*ListAuthorizedUsersResponse, error)
28 AddAuthorizedUser(ctx context.Context, in *AddAuthorizedUserRequest, opts ...grpc.CallOption) (*AddAuthorizedUserResponse, error)
29 UpdateAuthorizedUser(ctx context.Context, in *UpdateAuthorizedUserRequest, opts ...grpc.CallOption) (*UpdateAuthorizedUserResponse, error)
30 DeleteAuthorizedUser(ctx context.Context, in *DeleteAuthorizedUserRequest, opts ...grpc.CallOption) (*DeleteAuthorizedUserResponse, error)
31}
32
33type killSwitchServiceClient struct {
34 cc grpc.ClientConnInterface
35}
36
37func NewKillSwitchServiceClient(cc grpc.ClientConnInterface) KillSwitchServiceClient {
38 return &killSwitchServiceClient{cc}
39}
40
41func (c *killSwitchServiceClient) GetKillSwitchStatus(ctx context.Context, in *GetKillSwitchStatusRequest, opts ...grpc.CallOption) (*GetKillSwitchStatusResponse, error) {
42 out := new(GetKillSwitchStatusResponse)
43 err := c.cc.Invoke(ctx, "/KillSwitchService/GetKillSwitchStatus", in, out, opts...)
44 if err != nil {
45 return nil, err
46 }
47 return out, nil
48}
49
50func (c *killSwitchServiceClient) GetKillSwitchOverview(ctx context.Context, in *GetKillSwitchOverviewRequest, opts ...grpc.CallOption) (*GetKillSwitchOverviewResponse, error) {
51 out := new(GetKillSwitchOverviewResponse)
52 err := c.cc.Invoke(ctx, "/KillSwitchService/GetKillSwitchOverview", in, out, opts...)
53 if err != nil {
54 return nil, err
55 }
56 return out, nil
57}
58
59func (c *killSwitchServiceClient) ListFeatures(ctx context.Context, in *ListFeaturesRequest, opts ...grpc.CallOption) (*ListFeaturesResponse, error) {
60 out := new(ListFeaturesResponse)
61 err := c.cc.Invoke(ctx, "/KillSwitchService/ListFeatures", in, out, opts...)
62 if err != nil {
63 return nil, err
64 }
65 return out, nil
66}
67
68func (c *killSwitchServiceClient) SyncFeatures(ctx context.Context, in *SyncFeaturesRequest, opts ...grpc.CallOption) (*SyncFeaturesResponse, error) {
69 out := new(SyncFeaturesResponse)
70 err := c.cc.Invoke(ctx, "/KillSwitchService/SyncFeatures", in, out, opts...)
71 if err != nil {
72 return nil, err
73 }
74 return out, nil
75}
76
77func (c *killSwitchServiceClient) EnableKillSwitch(ctx context.Context, in *EnableKillSwitchRequest, opts ...grpc.CallOption) (*EnableKillSwitchResponse, error) {
78 out := new(EnableKillSwitchResponse)
79 err := c.cc.Invoke(ctx, "/KillSwitchService/EnableKillSwitch", in, out, opts...)
80 if err != nil {
81 return nil, err
82 }
83 return out, nil
84}
85
86func (c *killSwitchServiceClient) DisableKillSwitch(ctx context.Context, in *DisableKillSwitchRequest, opts ...grpc.CallOption) (*DisableKillSwitchResponse, error) {
87 out := new(DisableKillSwitchResponse)
88 err := c.cc.Invoke(ctx, "/KillSwitchService/DisableKillSwitch", in, out, opts...)
89 if err != nil {
90 return nil, err
91 }
92 return out, nil
93}
94
95func (c *killSwitchServiceClient) ListAuthorizedUsers(ctx context.Context, in *ListAuthorizedUsersRequest, opts ...grpc.CallOption) (*ListAuthorizedUsersResponse, error) {
96 out := new(ListAuthorizedUsersResponse)
97 err := c.cc.Invoke(ctx, "/KillSwitchService/ListAuthorizedUsers", in, out, opts...)
98 if err != nil {
99 return nil, err
100 }
101 return out, nil
102}
103
104func (c *killSwitchServiceClient) AddAuthorizedUser(ctx context.Context, in *AddAuthorizedUserRequest, opts ...grpc.CallOption) (*AddAuthorizedUserResponse, error) {
105 out := new(AddAuthorizedUserResponse)
106 err := c.cc.Invoke(ctx, "/KillSwitchService/AddAuthorizedUser", in, out, opts...)
107 if err != nil {
108 return nil, err
109 }
110 return out, nil
111}
112
113func (c *killSwitchServiceClient) UpdateAuthorizedUser(ctx context.Context, in *UpdateAuthorizedUserRequest, opts ...grpc.CallOption) (*UpdateAuthorizedUserResponse, error) {
114 out := new(UpdateAuthorizedUserResponse)
115 err := c.cc.Invoke(ctx, "/KillSwitchService/UpdateAuthorizedUser", in, out, opts...)
116 if err != nil {
117 return nil, err
118 }
119 return out, nil
120}
121
122func (c *killSwitchServiceClient) DeleteAuthorizedUser(ctx context.Context, in *DeleteAuthorizedUserRequest, opts ...grpc.CallOption) (*DeleteAuthorizedUserResponse, error) {
123 out := new(DeleteAuthorizedUserResponse)
124 err := c.cc.Invoke(ctx, "/KillSwitchService/DeleteAuthorizedUser", in, out, opts...)
125 if err != nil {
126 return nil, err
127 }
128 return out, nil
129}
130
131// KillSwitchServiceServer is the server API for KillSwitchService service.
132// All implementations must embed UnimplementedKillSwitchServiceServer
133// for forward compatibility
134type KillSwitchServiceServer interface {
135 GetKillSwitchStatus(context.Context, *GetKillSwitchStatusRequest) (*GetKillSwitchStatusResponse, error)
136 GetKillSwitchOverview(context.Context, *GetKillSwitchOverviewRequest) (*GetKillSwitchOverviewResponse, error)
137 ListFeatures(context.Context, *ListFeaturesRequest) (*ListFeaturesResponse, error)
138 SyncFeatures(context.Context, *SyncFeaturesRequest) (*SyncFeaturesResponse, error)
139 EnableKillSwitch(context.Context, *EnableKillSwitchRequest) (*EnableKillSwitchResponse, error)
140 DisableKillSwitch(context.Context, *DisableKillSwitchRequest) (*DisableKillSwitchResponse, error)
141 ListAuthorizedUsers(context.Context, *ListAuthorizedUsersRequest) (*ListAuthorizedUsersResponse, error)
142 AddAuthorizedUser(context.Context, *AddAuthorizedUserRequest) (*AddAuthorizedUserResponse, error)
143 UpdateAuthorizedUser(context.Context, *UpdateAuthorizedUserRequest) (*UpdateAuthorizedUserResponse, error)
144 DeleteAuthorizedUser(context.Context, *DeleteAuthorizedUserRequest) (*DeleteAuthorizedUserResponse, error)
145 mustEmbedUnimplementedKillSwitchServiceServer()
146}
147
148// UnimplementedKillSwitchServiceServer must be embedded to have forward compatible implementations.
149type UnimplementedKillSwitchServiceServer struct {
150}
151
152func (UnimplementedKillSwitchServiceServer) GetKillSwitchStatus(context.Context, *GetKillSwitchStatusRequest) (*GetKillSwitchStatusResponse, error) {
153 return nil, status.Errorf(codes.Unimplemented, "method GetKillSwitchStatus not implemented")
154}
155func (UnimplementedKillSwitchServiceServer) GetKillSwitchOverview(context.Context, *GetKillSwitchOverviewRequest) (*GetKillSwitchOverviewResponse, error) {
156 return nil, status.Errorf(codes.Unimplemented, "method GetKillSwitchOverview not implemented")
157}
158func (UnimplementedKillSwitchServiceServer) ListFeatures(context.Context, *ListFeaturesRequest) (*ListFeaturesResponse, error) {
159 return nil, status.Errorf(codes.Unimplemented, "method ListFeatures not implemented")
160}
161func (UnimplementedKillSwitchServiceServer) SyncFeatures(context.Context, *SyncFeaturesRequest) (*SyncFeaturesResponse, error) {
162 return nil, status.Errorf(codes.Unimplemented, "method SyncFeatures not implemented")
163}
164func (UnimplementedKillSwitchServiceServer) EnableKillSwitch(context.Context, *EnableKillSwitchRequest) (*EnableKillSwitchResponse, error) {
165 return nil, status.Errorf(codes.Unimplemented, "method EnableKillSwitch not implemented")
166}
167func (UnimplementedKillSwitchServiceServer) DisableKillSwitch(context.Context, *DisableKillSwitchRequest) (*DisableKillSwitchResponse, error) {
168 return nil, status.Errorf(codes.Unimplemented, "method DisableKillSwitch not implemented")
169}
170func (UnimplementedKillSwitchServiceServer) ListAuthorizedUsers(context.Context, *ListAuthorizedUsersRequest) (*ListAuthorizedUsersResponse, error) {
171 return nil, status.Errorf(codes.Unimplemented, "method ListAuthorizedUsers not implemented")
172}
173func (UnimplementedKillSwitchServiceServer) AddAuthorizedUser(context.Context, *AddAuthorizedUserRequest) (*AddAuthorizedUserResponse, error) {
174 return nil, status.Errorf(codes.Unimplemented, "method AddAuthorizedUser not implemented")
175}
176func (UnimplementedKillSwitchServiceServer) UpdateAuthorizedUser(context.Context, *UpdateAuthorizedUserRequest) (*UpdateAuthorizedUserResponse, error) {
177 return nil, status.Errorf(codes.Unimplemented, "method UpdateAuthorizedUser not implemented")
178}
179func (UnimplementedKillSwitchServiceServer) DeleteAuthorizedUser(context.Context, *DeleteAuthorizedUserRequest) (*DeleteAuthorizedUserResponse, error) {
180 return nil, status.Errorf(codes.Unimplemented, "method DeleteAuthorizedUser not implemented")
181}
182func (UnimplementedKillSwitchServiceServer) mustEmbedUnimplementedKillSwitchServiceServer() {}
183
184// UnsafeKillSwitchServiceServer may be embedded to opt out of forward compatibility for this service.
185// Use of this interface is not recommended, as added methods to KillSwitchServiceServer will
186// result in compilation errors.
187type UnsafeKillSwitchServiceServer interface {
188 mustEmbedUnimplementedKillSwitchServiceServer()
189}
190
191func RegisterKillSwitchServiceServer(s grpc.ServiceRegistrar, srv KillSwitchServiceServer) {
192 s.RegisterService(&KillSwitchService_ServiceDesc, srv)
193}
194
195func _KillSwitchService_GetKillSwitchStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
196 in := new(GetKillSwitchStatusRequest)
197 if err := dec(in); err != nil {
198 return nil, err
199 }
200 if interceptor == nil {
201 return srv.(KillSwitchServiceServer).GetKillSwitchStatus(ctx, in)
202 }
203 info := &grpc.UnaryServerInfo{
204 Server: srv,
205 FullMethod: "/KillSwitchService/GetKillSwitchStatus",
206 }
207 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
208 return srv.(KillSwitchServiceServer).GetKillSwitchStatus(ctx, req.(*GetKillSwitchStatusRequest))
209 }
210 return interceptor(ctx, in, info, handler)
211}
212
213func _KillSwitchService_GetKillSwitchOverview_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
214 in := new(GetKillSwitchOverviewRequest)
215 if err := dec(in); err != nil {
216 return nil, err
217 }
218 if interceptor == nil {
219 return srv.(KillSwitchServiceServer).GetKillSwitchOverview(ctx, in)
220 }
221 info := &grpc.UnaryServerInfo{
222 Server: srv,
223 FullMethod: "/KillSwitchService/GetKillSwitchOverview",
224 }
225 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
226 return srv.(KillSwitchServiceServer).GetKillSwitchOverview(ctx, req.(*GetKillSwitchOverviewRequest))
227 }
228 return interceptor(ctx, in, info, handler)
229}
230
231func _KillSwitchService_ListFeatures_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
232 in := new(ListFeaturesRequest)
233 if err := dec(in); err != nil {
234 return nil, err
235 }
236 if interceptor == nil {
237 return srv.(KillSwitchServiceServer).ListFeatures(ctx, in)
238 }
239 info := &grpc.UnaryServerInfo{
240 Server: srv,
241 FullMethod: "/KillSwitchService/ListFeatures",
242 }
243 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
244 return srv.(KillSwitchServiceServer).ListFeatures(ctx, req.(*ListFeaturesRequest))
245 }
246 return interceptor(ctx, in, info, handler)
247}
248
249func _KillSwitchService_SyncFeatures_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
250 in := new(SyncFeaturesRequest)
251 if err := dec(in); err != nil {
252 return nil, err
253 }
254 if interceptor == nil {
255 return srv.(KillSwitchServiceServer).SyncFeatures(ctx, in)
256 }
257 info := &grpc.UnaryServerInfo{
258 Server: srv,
259 FullMethod: "/KillSwitchService/SyncFeatures",
260 }
261 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
262 return srv.(KillSwitchServiceServer).SyncFeatures(ctx, req.(*SyncFeaturesRequest))
263 }
264 return interceptor(ctx, in, info, handler)
265}
266
267func _KillSwitchService_EnableKillSwitch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
268 in := new(EnableKillSwitchRequest)
269 if err := dec(in); err != nil {
270 return nil, err
271 }
272 if interceptor == nil {
273 return srv.(KillSwitchServiceServer).EnableKillSwitch(ctx, in)
274 }
275 info := &grpc.UnaryServerInfo{
276 Server: srv,
277 FullMethod: "/KillSwitchService/EnableKillSwitch",
278 }
279 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
280 return srv.(KillSwitchServiceServer).EnableKillSwitch(ctx, req.(*EnableKillSwitchRequest))
281 }
282 return interceptor(ctx, in, info, handler)
283}
284
285func _KillSwitchService_DisableKillSwitch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
286 in := new(DisableKillSwitchRequest)
287 if err := dec(in); err != nil {
288 return nil, err
289 }
290 if interceptor == nil {
291 return srv.(KillSwitchServiceServer).DisableKillSwitch(ctx, in)
292 }
293 info := &grpc.UnaryServerInfo{
294 Server: srv,
295 FullMethod: "/KillSwitchService/DisableKillSwitch",
296 }
297 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
298 return srv.(KillSwitchServiceServer).DisableKillSwitch(ctx, req.(*DisableKillSwitchRequest))
299 }
300 return interceptor(ctx, in, info, handler)
301}
302
303func _KillSwitchService_ListAuthorizedUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
304 in := new(ListAuthorizedUsersRequest)
305 if err := dec(in); err != nil {
306 return nil, err
307 }
308 if interceptor == nil {
309 return srv.(KillSwitchServiceServer).ListAuthorizedUsers(ctx, in)
310 }
311 info := &grpc.UnaryServerInfo{
312 Server: srv,
313 FullMethod: "/KillSwitchService/ListAuthorizedUsers",
314 }
315 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
316 return srv.(KillSwitchServiceServer).ListAuthorizedUsers(ctx, req.(*ListAuthorizedUsersRequest))
317 }
318 return interceptor(ctx, in, info, handler)
319}
320
321func _KillSwitchService_AddAuthorizedUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
322 in := new(AddAuthorizedUserRequest)
323 if err := dec(in); err != nil {
324 return nil, err
325 }
326 if interceptor == nil {
327 return srv.(KillSwitchServiceServer).AddAuthorizedUser(ctx, in)
328 }
329 info := &grpc.UnaryServerInfo{
330 Server: srv,
331 FullMethod: "/KillSwitchService/AddAuthorizedUser",
332 }
333 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
334 return srv.(KillSwitchServiceServer).AddAuthorizedUser(ctx, req.(*AddAuthorizedUserRequest))
335 }
336 return interceptor(ctx, in, info, handler)
337}
338
339func _KillSwitchService_UpdateAuthorizedUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
340 in := new(UpdateAuthorizedUserRequest)
341 if err := dec(in); err != nil {
342 return nil, err
343 }
344 if interceptor == nil {
345 return srv.(KillSwitchServiceServer).UpdateAuthorizedUser(ctx, in)
346 }
347 info := &grpc.UnaryServerInfo{
348 Server: srv,
349 FullMethod: "/KillSwitchService/UpdateAuthorizedUser",
350 }
351 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
352 return srv.(KillSwitchServiceServer).UpdateAuthorizedUser(ctx, req.(*UpdateAuthorizedUserRequest))
353 }
354 return interceptor(ctx, in, info, handler)
355}
356
357func _KillSwitchService_DeleteAuthorizedUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
358 in := new(DeleteAuthorizedUserRequest)
359 if err := dec(in); err != nil {
360 return nil, err
361 }
362 if interceptor == nil {
363 return srv.(KillSwitchServiceServer).DeleteAuthorizedUser(ctx, in)
364 }
365 info := &grpc.UnaryServerInfo{
366 Server: srv,
367 FullMethod: "/KillSwitchService/DeleteAuthorizedUser",
368 }
369 handler := func(ctx context.Context, req interface{}) (interface{}, error) {
370 return srv.(KillSwitchServiceServer).DeleteAuthorizedUser(ctx, req.(*DeleteAuthorizedUserRequest))
371 }
372 return interceptor(ctx, in, info, handler)
373}
374
375// KillSwitchService_ServiceDesc is the grpc.ServiceDesc for KillSwitchService service.
376// It's only intended for direct use with grpc.RegisterService,
377// and not to be introspected or modified (even as a copy)
378var KillSwitchService_ServiceDesc = grpc.ServiceDesc{
379 ServiceName: "KillSwitchService",
380 HandlerType: (*KillSwitchServiceServer)(nil),
381 Methods: []grpc.MethodDesc{
382 {
383 MethodName: "GetKillSwitchStatus",
384 Handler: _KillSwitchService_GetKillSwitchStatus_Handler,
385 },
386 {
387 MethodName: "GetKillSwitchOverview",
388 Handler: _KillSwitchService_GetKillSwitchOverview_Handler,
389 },
390 {
391 MethodName: "ListFeatures",
392 Handler: _KillSwitchService_ListFeatures_Handler,
393 },
394 {
395 MethodName: "SyncFeatures",
396 Handler: _KillSwitchService_SyncFeatures_Handler,
397 },
398 {
399 MethodName: "EnableKillSwitch",
400 Handler: _KillSwitchService_EnableKillSwitch_Handler,
401 },
402 {
403 MethodName: "DisableKillSwitch",
404 Handler: _KillSwitchService_DisableKillSwitch_Handler,
405 },
406 {
407 MethodName: "ListAuthorizedUsers",
408 Handler: _KillSwitchService_ListAuthorizedUsers_Handler,
409 },
410 {
411 MethodName: "AddAuthorizedUser",
412 Handler: _KillSwitchService_AddAuthorizedUser_Handler,
413 },
414 {
415 MethodName: "UpdateAuthorizedUser",
416 Handler: _KillSwitchService_UpdateAuthorizedUser_Handler,
417 },
418 {
419 MethodName: "DeleteAuthorizedUser",
420 Handler: _KillSwitchService_DeleteAuthorizedUser_Handler,
421 },
422 },
423 Streams: []grpc.StreamDesc{},
424 Metadata: "api_proto/kill_switch.proto",
425}