-
Notifications
You must be signed in to change notification settings - Fork 302
/
end_device_services.pb.go
516 lines (470 loc) · 22.2 KB
/
end_device_services.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
// Code generated by protoc-gen-gogo. DO NOT EDIT.
// source: lorawan-stack/api/end_device_services.proto
package ttnpb
import (
context "context"
fmt "fmt"
_ "github.com/gogo/protobuf/gogoproto"
proto "github.com/gogo/protobuf/proto"
types "github.com/gogo/protobuf/types"
golang_proto "github.com/golang/protobuf/proto"
_ "google.golang.org/genproto/googleapis/api/annotations"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = golang_proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
func init() {
proto.RegisterFile("lorawan-stack/api/end_device_services.proto", fileDescriptor_36b7c5a531ab03ac)
}
func init() {
golang_proto.RegisterFile("lorawan-stack/api/end_device_services.proto", fileDescriptor_36b7c5a531ab03ac)
}
var fileDescriptor_36b7c5a531ab03ac = []byte{
// 584 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xcf, 0x6b, 0x13, 0x4f,
0x14, 0xef, 0x7c, 0xbf, 0x92, 0xc2, 0x8a, 0x8a, 0x03, 0x15, 0x5d, 0x65, 0xc1, 0xad, 0x8a, 0x44,
0x3a, 0x23, 0x0d, 0x8a, 0xf4, 0xe0, 0xa1, 0x4d, 0x1a, 0x5a, 0x14, 0x44, 0xec, 0xc5, 0x4b, 0xba,
0xd9, 0x7d, 0xd9, 0x0c, 0x49, 0x66, 0xd6, 0x9d, 0x97, 0x94, 0x50, 0x0a, 0xe2, 0xcd, 0x9b, 0xe8,
0xd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0xf9, 0x13, 0xe8, 0x44, 0x6d, 0x0f, 0x61, 0x43, 0xc9, 0x1e, 0xc4, 0x08, 0x31, 0x6d, 0x58,
0xa7, 0x87, 0x7b, 0xbc, 0xa9, 0xe2, 0x8e, 0x87, 0x9a, 0xce, 0x48, 0x64, 0xdf, 0x9c, 0x59, 0xcf,
0x48, 0x32, 0x55, 0x70, 0x97, 0x4c, 0xf6, 0x73, 0xf4, 0x0c, 0x87, 0x00, 0x7d, 0xde, 0x48, 0x85,
0xfb, 0xd6, 0x62, 0x6a, 0x4a, 0x79, 0xee, 0xa9, 0x48, 0x16, 0x72, 0x92, 0xa3, 0xfd, 0xbd, 0xfa,
0x47, 0x73, 0xf7, 0xa2, 0x71, 0xa5, 0x6e, 0xea, 0xea, 0x27, 0x8a, 0x6b, 0xa4, 0x78, 0x9b, 0xac,
0x3f, 0xfc, 0xf2, 0xd5, 0x59, 0x78, 0x3e, 0x70, 0xc8, 0xbb, 0x81, 0x43, 0xbe, 0x0f, 0x9c, 0x85,
0x1f, 0x03, 0x87, 0xbc, 0x3a, 0x74, 0x16, 0x3e, 0x1d, 0x3a, 0xe4, 0x29, 0x0f, 0x15, 0xc3, 0x26,
0x60, 0x53, 0xc8, 0x50, 0x33, 0x09, 0xb8, 0xa7, 0xe2, 0x16, 0x3f, 0xfa, 0x26, 0xf6, 0x4a, 0x3c,
0x6a, 0x85, 0x1c, 0x51, 0x46, 0xf5, 0x7a, 0xc1, 0xb4, 0xa6, 0xf4, 0x2b, 0x00, 0x00, 0xff, 0xff,
0xc3, 0x58, 0xc9, 0x3d, 0x03, 0x06, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// EndDeviceRegistryClient is the client API for EndDeviceRegistry service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type EndDeviceRegistryClient interface {
// Create a new end device within an application.
//
// After registering an end device, it also needs to be registered in
// the NsEndDeviceRegistry that is exposed by the Network Server,
// the AsEndDeviceRegistry that is exposed by the Application Server,
// and the JsEndDeviceRegistry that is exposed by the Join Server.
Create(ctx context.Context, in *CreateEndDeviceRequest, opts ...grpc.CallOption) (*EndDevice, error)
// Get the end device with the given identifiers, selecting the fields specified
// in the field mask.
// More or less fields may be returned, depending on the rights of the caller.
Get(ctx context.Context, in *GetEndDeviceRequest, opts ...grpc.CallOption) (*EndDevice, error)
// Get the identifiers of the end device that has the given EUIs registered.
GetIdentifiersForEUIs(ctx context.Context, in *GetEndDeviceIdentifiersForEUIsRequest, opts ...grpc.CallOption) (*EndDeviceIdentifiers, error)
// List end devices in the given application.
// Similar to Get, this selects the fields given by the field mask.
// More or less fields may be returned, depending on the rights of the caller.
List(ctx context.Context, in *ListEndDevicesRequest, opts ...grpc.CallOption) (*EndDevices, error)
// Update the end device, changing the fields specified by the field mask to the provided values.
Update(ctx context.Context, in *UpdateEndDeviceRequest, opts ...grpc.CallOption) (*EndDevice, error)
// Delete the end device with the given IDs.
//
// Before deleting an end device it first needs to be deleted from the
// NsEndDeviceRegistry, the AsEndDeviceRegistry and the JsEndDeviceRegistry.
// This is NOT done automatically.
Delete(ctx context.Context, in *EndDeviceIdentifiers, opts ...grpc.CallOption) (*types.Empty, error)
}
type endDeviceRegistryClient struct {
cc *grpc.ClientConn
}
func NewEndDeviceRegistryClient(cc *grpc.ClientConn) EndDeviceRegistryClient {
return &endDeviceRegistryClient{cc}
}
func (c *endDeviceRegistryClient) Create(ctx context.Context, in *CreateEndDeviceRequest, opts ...grpc.CallOption) (*EndDevice, error) {
out := new(EndDevice)
err := c.cc.Invoke(ctx, "/ttn.lorawan.v3.EndDeviceRegistry/Create", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *endDeviceRegistryClient) Get(ctx context.Context, in *GetEndDeviceRequest, opts ...grpc.CallOption) (*EndDevice, error) {
out := new(EndDevice)
err := c.cc.Invoke(ctx, "/ttn.lorawan.v3.EndDeviceRegistry/Get", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *endDeviceRegistryClient) GetIdentifiersForEUIs(ctx context.Context, in *GetEndDeviceIdentifiersForEUIsRequest, opts ...grpc.CallOption) (*EndDeviceIdentifiers, error) {
out := new(EndDeviceIdentifiers)
err := c.cc.Invoke(ctx, "/ttn.lorawan.v3.EndDeviceRegistry/GetIdentifiersForEUIs", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *endDeviceRegistryClient) List(ctx context.Context, in *ListEndDevicesRequest, opts ...grpc.CallOption) (*EndDevices, error) {
out := new(EndDevices)
err := c.cc.Invoke(ctx, "/ttn.lorawan.v3.EndDeviceRegistry/List", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *endDeviceRegistryClient) Update(ctx context.Context, in *UpdateEndDeviceRequest, opts ...grpc.CallOption) (*EndDevice, error) {
out := new(EndDevice)
err := c.cc.Invoke(ctx, "/ttn.lorawan.v3.EndDeviceRegistry/Update", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *endDeviceRegistryClient) Delete(ctx context.Context, in *EndDeviceIdentifiers, opts ...grpc.CallOption) (*types.Empty, error) {
out := new(types.Empty)
err := c.cc.Invoke(ctx, "/ttn.lorawan.v3.EndDeviceRegistry/Delete", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// EndDeviceRegistryServer is the server API for EndDeviceRegistry service.
type EndDeviceRegistryServer interface {
// Create a new end device within an application.
//
// After registering an end device, it also needs to be registered in
// the NsEndDeviceRegistry that is exposed by the Network Server,
// the AsEndDeviceRegistry that is exposed by the Application Server,
// and the JsEndDeviceRegistry that is exposed by the Join Server.
Create(context.Context, *CreateEndDeviceRequest) (*EndDevice, error)
// Get the end device with the given identifiers, selecting the fields specified
// in the field mask.
// More or less fields may be returned, depending on the rights of the caller.
Get(context.Context, *GetEndDeviceRequest) (*EndDevice, error)
// Get the identifiers of the end device that has the given EUIs registered.
GetIdentifiersForEUIs(context.Context, *GetEndDeviceIdentifiersForEUIsRequest) (*EndDeviceIdentifiers, error)
// List end devices in the given application.
// Similar to Get, this selects the fields given by the field mask.
// More or less fields may be returned, depending on the rights of the caller.
List(context.Context, *ListEndDevicesRequest) (*EndDevices, error)
// Update the end device, changing the fields specified by the field mask to the provided values.
Update(context.Context, *UpdateEndDeviceRequest) (*EndDevice, error)
// Delete the end device with the given IDs.
//
// Before deleting an end device it first needs to be deleted from the
// NsEndDeviceRegistry, the AsEndDeviceRegistry and the JsEndDeviceRegistry.
// This is NOT done automatically.
Delete(context.Context, *EndDeviceIdentifiers) (*types.Empty, error)
}
// UnimplementedEndDeviceRegistryServer can be embedded to have forward compatible implementations.
type UnimplementedEndDeviceRegistryServer struct {
}
func (*UnimplementedEndDeviceRegistryServer) Create(ctx context.Context, req *CreateEndDeviceRequest) (*EndDevice, error) {
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
}
func (*UnimplementedEndDeviceRegistryServer) Get(ctx context.Context, req *GetEndDeviceRequest) (*EndDevice, error) {
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (*UnimplementedEndDeviceRegistryServer) GetIdentifiersForEUIs(ctx context.Context, req *GetEndDeviceIdentifiersForEUIsRequest) (*EndDeviceIdentifiers, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetIdentifiersForEUIs not implemented")
}
func (*UnimplementedEndDeviceRegistryServer) List(ctx context.Context, req *ListEndDevicesRequest) (*EndDevices, error) {
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
}
func (*UnimplementedEndDeviceRegistryServer) Update(ctx context.Context, req *UpdateEndDeviceRequest) (*EndDevice, error) {
return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
}
func (*UnimplementedEndDeviceRegistryServer) Delete(ctx context.Context, req *EndDeviceIdentifiers) (*types.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
}
func RegisterEndDeviceRegistryServer(s *grpc.Server, srv EndDeviceRegistryServer) {
s.RegisterService(&_EndDeviceRegistry_serviceDesc, srv)
}
func _EndDeviceRegistry_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateEndDeviceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EndDeviceRegistryServer).Create(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ttn.lorawan.v3.EndDeviceRegistry/Create",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EndDeviceRegistryServer).Create(ctx, req.(*CreateEndDeviceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _EndDeviceRegistry_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetEndDeviceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EndDeviceRegistryServer).Get(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ttn.lorawan.v3.EndDeviceRegistry/Get",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EndDeviceRegistryServer).Get(ctx, req.(*GetEndDeviceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _EndDeviceRegistry_GetIdentifiersForEUIs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetEndDeviceIdentifiersForEUIsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EndDeviceRegistryServer).GetIdentifiersForEUIs(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ttn.lorawan.v3.EndDeviceRegistry/GetIdentifiersForEUIs",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EndDeviceRegistryServer).GetIdentifiersForEUIs(ctx, req.(*GetEndDeviceIdentifiersForEUIsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _EndDeviceRegistry_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListEndDevicesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EndDeviceRegistryServer).List(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ttn.lorawan.v3.EndDeviceRegistry/List",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EndDeviceRegistryServer).List(ctx, req.(*ListEndDevicesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _EndDeviceRegistry_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateEndDeviceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EndDeviceRegistryServer).Update(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ttn.lorawan.v3.EndDeviceRegistry/Update",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EndDeviceRegistryServer).Update(ctx, req.(*UpdateEndDeviceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _EndDeviceRegistry_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(EndDeviceIdentifiers)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EndDeviceRegistryServer).Delete(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ttn.lorawan.v3.EndDeviceRegistry/Delete",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EndDeviceRegistryServer).Delete(ctx, req.(*EndDeviceIdentifiers))
}
return interceptor(ctx, in, info, handler)
}
var _EndDeviceRegistry_serviceDesc = grpc.ServiceDesc{
ServiceName: "ttn.lorawan.v3.EndDeviceRegistry",
HandlerType: (*EndDeviceRegistryServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Create",
Handler: _EndDeviceRegistry_Create_Handler,
},
{
MethodName: "Get",
Handler: _EndDeviceRegistry_Get_Handler,
},
{
MethodName: "GetIdentifiersForEUIs",
Handler: _EndDeviceRegistry_GetIdentifiersForEUIs_Handler,
},
{
MethodName: "List",
Handler: _EndDeviceRegistry_List_Handler,
},
{
MethodName: "Update",
Handler: _EndDeviceRegistry_Update_Handler,
},
{
MethodName: "Delete",
Handler: _EndDeviceRegistry_Delete_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "lorawan-stack/api/end_device_services.proto",
}
// EndDeviceTemplateConverterClient is the client API for EndDeviceTemplateConverter service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type EndDeviceTemplateConverterClient interface {
// Returns the configured formats to convert from.
ListFormats(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*EndDeviceTemplateFormats, error)
// Converts the binary data to a stream of end device templates.
Convert(ctx context.Context, in *ConvertEndDeviceTemplateRequest, opts ...grpc.CallOption) (EndDeviceTemplateConverter_ConvertClient, error)
}
type endDeviceTemplateConverterClient struct {
cc *grpc.ClientConn
}
func NewEndDeviceTemplateConverterClient(cc *grpc.ClientConn) EndDeviceTemplateConverterClient {
return &endDeviceTemplateConverterClient{cc}
}
func (c *endDeviceTemplateConverterClient) ListFormats(ctx context.Context, in *types.Empty, opts ...grpc.CallOption) (*EndDeviceTemplateFormats, error) {
out := new(EndDeviceTemplateFormats)
err := c.cc.Invoke(ctx, "/ttn.lorawan.v3.EndDeviceTemplateConverter/ListFormats", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *endDeviceTemplateConverterClient) Convert(ctx context.Context, in *ConvertEndDeviceTemplateRequest, opts ...grpc.CallOption) (EndDeviceTemplateConverter_ConvertClient, error) {
stream, err := c.cc.NewStream(ctx, &_EndDeviceTemplateConverter_serviceDesc.Streams[0], "/ttn.lorawan.v3.EndDeviceTemplateConverter/Convert", opts...)
if err != nil {
return nil, err
}
x := &endDeviceTemplateConverterConvertClient{stream}
if err := x.ClientStream.SendMsg(in); err != nil {
return nil, err
}
if err := x.ClientStream.CloseSend(); err != nil {
return nil, err
}
return x, nil
}
type EndDeviceTemplateConverter_ConvertClient interface {
Recv() (*EndDeviceTemplate, error)
grpc.ClientStream
}
type endDeviceTemplateConverterConvertClient struct {
grpc.ClientStream
}
func (x *endDeviceTemplateConverterConvertClient) Recv() (*EndDeviceTemplate, error) {
m := new(EndDeviceTemplate)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// EndDeviceTemplateConverterServer is the server API for EndDeviceTemplateConverter service.
type EndDeviceTemplateConverterServer interface {
// Returns the configured formats to convert from.
ListFormats(context.Context, *types.Empty) (*EndDeviceTemplateFormats, error)
// Converts the binary data to a stream of end device templates.
Convert(*ConvertEndDeviceTemplateRequest, EndDeviceTemplateConverter_ConvertServer) error
}
// UnimplementedEndDeviceTemplateConverterServer can be embedded to have forward compatible implementations.
type UnimplementedEndDeviceTemplateConverterServer struct {
}
func (*UnimplementedEndDeviceTemplateConverterServer) ListFormats(ctx context.Context, req *types.Empty) (*EndDeviceTemplateFormats, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListFormats not implemented")
}
func (*UnimplementedEndDeviceTemplateConverterServer) Convert(req *ConvertEndDeviceTemplateRequest, srv EndDeviceTemplateConverter_ConvertServer) error {
return status.Errorf(codes.Unimplemented, "method Convert not implemented")
}
func RegisterEndDeviceTemplateConverterServer(s *grpc.Server, srv EndDeviceTemplateConverterServer) {
s.RegisterService(&_EndDeviceTemplateConverter_serviceDesc, srv)
}
func _EndDeviceTemplateConverter_ListFormats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(types.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EndDeviceTemplateConverterServer).ListFormats(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/ttn.lorawan.v3.EndDeviceTemplateConverter/ListFormats",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EndDeviceTemplateConverterServer).ListFormats(ctx, req.(*types.Empty))
}
return interceptor(ctx, in, info, handler)
}
func _EndDeviceTemplateConverter_Convert_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(ConvertEndDeviceTemplateRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(EndDeviceTemplateConverterServer).Convert(m, &endDeviceTemplateConverterConvertServer{stream})
}
type EndDeviceTemplateConverter_ConvertServer interface {
Send(*EndDeviceTemplate) error
grpc.ServerStream
}
type endDeviceTemplateConverterConvertServer struct {
grpc.ServerStream
}
func (x *endDeviceTemplateConverterConvertServer) Send(m *EndDeviceTemplate) error {
return x.ServerStream.SendMsg(m)
}
var _EndDeviceTemplateConverter_serviceDesc = grpc.ServiceDesc{
ServiceName: "ttn.lorawan.v3.EndDeviceTemplateConverter",
HandlerType: (*EndDeviceTemplateConverterServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ListFormats",
Handler: _EndDeviceTemplateConverter_ListFormats_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "Convert",
Handler: _EndDeviceTemplateConverter_Convert_Handler,
ServerStreams: true,
},
},
Metadata: "lorawan-stack/api/end_device_services.proto",
}