Initial commit.

This commit is contained in:
Orne Brocaar
2022-04-06 21:18:32 +01:00
commit 96fe672fc7
709 changed files with 335482 additions and 0 deletions

33
api/go/Makefile Normal file
View File

@ -0,0 +1,33 @@
.PHONY: requirements common gw api integration meta
PROTOC_ARGS := -I=/googleapis -I=../proto --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative
all: requirements common gw api integration meta
requirements:
go mod download
go install google.golang.org/protobuf/cmd/protoc-gen-go
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc
common:
protoc ${PROTOC_ARGS} common/common.proto
gw:
protoc ${PROTOC_ARGS} gw/gw.proto
api:
protoc ${PROTOC_ARGS} api/internal.proto
protoc ${PROTOC_ARGS} api/user.proto
protoc ${PROTOC_ARGS} api/tenant.proto
protoc ${PROTOC_ARGS} api/application.proto
protoc ${PROTOC_ARGS} api/device_profile.proto
protoc ${PROTOC_ARGS} api/device.proto
protoc ${PROTOC_ARGS} api/gateway.proto
protoc ${PROTOC_ARGS} api/frame_log.proto
protoc ${PROTOC_ARGS} api/multicast_group.proto
integration:
protoc ${PROTOC_ARGS} integration/integration.proto
meta:
protoc ${PROTOC_ARGS} meta/meta.proto

6082
api/go/api/application.pb.go Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

3059
api/go/api/device.pb.go Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,754 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.18.1
// source: api/device.proto
package v4
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// DeviceServiceClient is the client API for DeviceService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type DeviceServiceClient interface {
// Create the given device.
Create(ctx context.Context, in *CreateDeviceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Get returns the device for the given DevEUI.
Get(ctx context.Context, in *GetDeviceRequest, opts ...grpc.CallOption) (*GetDeviceResponse, error)
// Update the given device.
Update(ctx context.Context, in *UpdateDeviceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Delete the device with the given DevEUI.
Delete(ctx context.Context, in *DeleteDeviceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Get the list of devices.
List(ctx context.Context, in *ListDevicesRequest, opts ...grpc.CallOption) (*ListDevicesResponse, error)
// Create the given device-keys.
CreateKeys(ctx context.Context, in *CreateDeviceKeysRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Get the device-keys for the given DevEUI.
GetKeys(ctx context.Context, in *GetDeviceKeysRequest, opts ...grpc.CallOption) (*GetDeviceKeysResponse, error)
// Update the given device-keys.
UpdateKeys(ctx context.Context, in *UpdateDeviceKeysRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Delete the device-keys for the given DevEUI.
DeleteKeys(ctx context.Context, in *DeleteDeviceKeysRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// FlushDevNonces flushes the OTAA device nonces.
FlushDevNonces(ctx context.Context, in *FlushDevNoncesRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Activate (re)activates the device with the given parameters (for ABP or for importing OTAA activations).
Activate(ctx context.Context, in *ActivateDeviceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Deactivate de-activates the device.
Deactivate(ctx context.Context, in *DeactivateDeviceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// GetActivation returns the current activation details of the device (OTAA or ABP).
GetActivation(ctx context.Context, in *GetDeviceActivationRequest, opts ...grpc.CallOption) (*GetDeviceActivationResponse, error)
// GetRandomDevAddr returns a random DevAddr taking the NwkID prefix into account.
GetRandomDevAddr(ctx context.Context, in *GetRandomDevAddrRequest, opts ...grpc.CallOption) (*GetRandomDevAddrResponse, error)
// GetStats returns the device stats.
GetStats(ctx context.Context, in *GetDeviceStatsRequest, opts ...grpc.CallOption) (*GetDeviceStatsResponse, error)
// Enqueue adds the given item to the downlink queue.
Enqueue(ctx context.Context, in *EnqueueDeviceQueueItemRequest, opts ...grpc.CallOption) (*EnqueueDeviceQueueItemResponse, error)
// FlushQueue flushes the downlink device-queue.
FlushQueue(ctx context.Context, in *FlushDeviceQueueRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// GetQueue returns the downlink device-queue.
GetQueue(ctx context.Context, in *GetDeviceQueueItemsRequest, opts ...grpc.CallOption) (*GetDeviceQueueItemsResponse, error)
}
type deviceServiceClient struct {
cc grpc.ClientConnInterface
}
func NewDeviceServiceClient(cc grpc.ClientConnInterface) DeviceServiceClient {
return &deviceServiceClient{cc}
}
func (c *deviceServiceClient) Create(ctx context.Context, in *CreateDeviceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.DeviceService/Create", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *deviceServiceClient) Get(ctx context.Context, in *GetDeviceRequest, opts ...grpc.CallOption) (*GetDeviceResponse, error) {
out := new(GetDeviceResponse)
err := c.cc.Invoke(ctx, "/api.DeviceService/Get", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *deviceServiceClient) Update(ctx context.Context, in *UpdateDeviceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.DeviceService/Update", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *deviceServiceClient) Delete(ctx context.Context, in *DeleteDeviceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.DeviceService/Delete", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *deviceServiceClient) List(ctx context.Context, in *ListDevicesRequest, opts ...grpc.CallOption) (*ListDevicesResponse, error) {
out := new(ListDevicesResponse)
err := c.cc.Invoke(ctx, "/api.DeviceService/List", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *deviceServiceClient) CreateKeys(ctx context.Context, in *CreateDeviceKeysRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.DeviceService/CreateKeys", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *deviceServiceClient) GetKeys(ctx context.Context, in *GetDeviceKeysRequest, opts ...grpc.CallOption) (*GetDeviceKeysResponse, error) {
out := new(GetDeviceKeysResponse)
err := c.cc.Invoke(ctx, "/api.DeviceService/GetKeys", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *deviceServiceClient) UpdateKeys(ctx context.Context, in *UpdateDeviceKeysRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.DeviceService/UpdateKeys", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *deviceServiceClient) DeleteKeys(ctx context.Context, in *DeleteDeviceKeysRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.DeviceService/DeleteKeys", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *deviceServiceClient) FlushDevNonces(ctx context.Context, in *FlushDevNoncesRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.DeviceService/FlushDevNonces", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *deviceServiceClient) Activate(ctx context.Context, in *ActivateDeviceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.DeviceService/Activate", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *deviceServiceClient) Deactivate(ctx context.Context, in *DeactivateDeviceRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.DeviceService/Deactivate", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *deviceServiceClient) GetActivation(ctx context.Context, in *GetDeviceActivationRequest, opts ...grpc.CallOption) (*GetDeviceActivationResponse, error) {
out := new(GetDeviceActivationResponse)
err := c.cc.Invoke(ctx, "/api.DeviceService/GetActivation", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *deviceServiceClient) GetRandomDevAddr(ctx context.Context, in *GetRandomDevAddrRequest, opts ...grpc.CallOption) (*GetRandomDevAddrResponse, error) {
out := new(GetRandomDevAddrResponse)
err := c.cc.Invoke(ctx, "/api.DeviceService/GetRandomDevAddr", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *deviceServiceClient) GetStats(ctx context.Context, in *GetDeviceStatsRequest, opts ...grpc.CallOption) (*GetDeviceStatsResponse, error) {
out := new(GetDeviceStatsResponse)
err := c.cc.Invoke(ctx, "/api.DeviceService/GetStats", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *deviceServiceClient) Enqueue(ctx context.Context, in *EnqueueDeviceQueueItemRequest, opts ...grpc.CallOption) (*EnqueueDeviceQueueItemResponse, error) {
out := new(EnqueueDeviceQueueItemResponse)
err := c.cc.Invoke(ctx, "/api.DeviceService/Enqueue", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *deviceServiceClient) FlushQueue(ctx context.Context, in *FlushDeviceQueueRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.DeviceService/FlushQueue", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *deviceServiceClient) GetQueue(ctx context.Context, in *GetDeviceQueueItemsRequest, opts ...grpc.CallOption) (*GetDeviceQueueItemsResponse, error) {
out := new(GetDeviceQueueItemsResponse)
err := c.cc.Invoke(ctx, "/api.DeviceService/GetQueue", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// DeviceServiceServer is the server API for DeviceService service.
// All implementations must embed UnimplementedDeviceServiceServer
// for forward compatibility
type DeviceServiceServer interface {
// Create the given device.
Create(context.Context, *CreateDeviceRequest) (*emptypb.Empty, error)
// Get returns the device for the given DevEUI.
Get(context.Context, *GetDeviceRequest) (*GetDeviceResponse, error)
// Update the given device.
Update(context.Context, *UpdateDeviceRequest) (*emptypb.Empty, error)
// Delete the device with the given DevEUI.
Delete(context.Context, *DeleteDeviceRequest) (*emptypb.Empty, error)
// Get the list of devices.
List(context.Context, *ListDevicesRequest) (*ListDevicesResponse, error)
// Create the given device-keys.
CreateKeys(context.Context, *CreateDeviceKeysRequest) (*emptypb.Empty, error)
// Get the device-keys for the given DevEUI.
GetKeys(context.Context, *GetDeviceKeysRequest) (*GetDeviceKeysResponse, error)
// Update the given device-keys.
UpdateKeys(context.Context, *UpdateDeviceKeysRequest) (*emptypb.Empty, error)
// Delete the device-keys for the given DevEUI.
DeleteKeys(context.Context, *DeleteDeviceKeysRequest) (*emptypb.Empty, error)
// FlushDevNonces flushes the OTAA device nonces.
FlushDevNonces(context.Context, *FlushDevNoncesRequest) (*emptypb.Empty, error)
// Activate (re)activates the device with the given parameters (for ABP or for importing OTAA activations).
Activate(context.Context, *ActivateDeviceRequest) (*emptypb.Empty, error)
// Deactivate de-activates the device.
Deactivate(context.Context, *DeactivateDeviceRequest) (*emptypb.Empty, error)
// GetActivation returns the current activation details of the device (OTAA or ABP).
GetActivation(context.Context, *GetDeviceActivationRequest) (*GetDeviceActivationResponse, error)
// GetRandomDevAddr returns a random DevAddr taking the NwkID prefix into account.
GetRandomDevAddr(context.Context, *GetRandomDevAddrRequest) (*GetRandomDevAddrResponse, error)
// GetStats returns the device stats.
GetStats(context.Context, *GetDeviceStatsRequest) (*GetDeviceStatsResponse, error)
// Enqueue adds the given item to the downlink queue.
Enqueue(context.Context, *EnqueueDeviceQueueItemRequest) (*EnqueueDeviceQueueItemResponse, error)
// FlushQueue flushes the downlink device-queue.
FlushQueue(context.Context, *FlushDeviceQueueRequest) (*emptypb.Empty, error)
// GetQueue returns the downlink device-queue.
GetQueue(context.Context, *GetDeviceQueueItemsRequest) (*GetDeviceQueueItemsResponse, error)
mustEmbedUnimplementedDeviceServiceServer()
}
// UnimplementedDeviceServiceServer must be embedded to have forward compatible implementations.
type UnimplementedDeviceServiceServer struct {
}
func (UnimplementedDeviceServiceServer) Create(context.Context, *CreateDeviceRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedDeviceServiceServer) Get(context.Context, *GetDeviceRequest) (*GetDeviceResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedDeviceServiceServer) Update(context.Context, *UpdateDeviceRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
}
func (UnimplementedDeviceServiceServer) Delete(context.Context, *DeleteDeviceRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedDeviceServiceServer) List(context.Context, *ListDevicesRequest) (*ListDevicesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedDeviceServiceServer) CreateKeys(context.Context, *CreateDeviceKeysRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateKeys not implemented")
}
func (UnimplementedDeviceServiceServer) GetKeys(context.Context, *GetDeviceKeysRequest) (*GetDeviceKeysResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetKeys not implemented")
}
func (UnimplementedDeviceServiceServer) UpdateKeys(context.Context, *UpdateDeviceKeysRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateKeys not implemented")
}
func (UnimplementedDeviceServiceServer) DeleteKeys(context.Context, *DeleteDeviceKeysRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteKeys not implemented")
}
func (UnimplementedDeviceServiceServer) FlushDevNonces(context.Context, *FlushDevNoncesRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method FlushDevNonces not implemented")
}
func (UnimplementedDeviceServiceServer) Activate(context.Context, *ActivateDeviceRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Activate not implemented")
}
func (UnimplementedDeviceServiceServer) Deactivate(context.Context, *DeactivateDeviceRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Deactivate not implemented")
}
func (UnimplementedDeviceServiceServer) GetActivation(context.Context, *GetDeviceActivationRequest) (*GetDeviceActivationResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetActivation not implemented")
}
func (UnimplementedDeviceServiceServer) GetRandomDevAddr(context.Context, *GetRandomDevAddrRequest) (*GetRandomDevAddrResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetRandomDevAddr not implemented")
}
func (UnimplementedDeviceServiceServer) GetStats(context.Context, *GetDeviceStatsRequest) (*GetDeviceStatsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetStats not implemented")
}
func (UnimplementedDeviceServiceServer) Enqueue(context.Context, *EnqueueDeviceQueueItemRequest) (*EnqueueDeviceQueueItemResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Enqueue not implemented")
}
func (UnimplementedDeviceServiceServer) FlushQueue(context.Context, *FlushDeviceQueueRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method FlushQueue not implemented")
}
func (UnimplementedDeviceServiceServer) GetQueue(context.Context, *GetDeviceQueueItemsRequest) (*GetDeviceQueueItemsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetQueue not implemented")
}
func (UnimplementedDeviceServiceServer) mustEmbedUnimplementedDeviceServiceServer() {}
// UnsafeDeviceServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to DeviceServiceServer will
// result in compilation errors.
type UnsafeDeviceServiceServer interface {
mustEmbedUnimplementedDeviceServiceServer()
}
func RegisterDeviceServiceServer(s grpc.ServiceRegistrar, srv DeviceServiceServer) {
s.RegisterService(&DeviceService_ServiceDesc, srv)
}
func _DeviceService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateDeviceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DeviceServiceServer).Create(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.DeviceService/Create",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DeviceServiceServer).Create(ctx, req.(*CreateDeviceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _DeviceService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetDeviceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DeviceServiceServer).Get(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.DeviceService/Get",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DeviceServiceServer).Get(ctx, req.(*GetDeviceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _DeviceService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateDeviceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DeviceServiceServer).Update(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.DeviceService/Update",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DeviceServiceServer).Update(ctx, req.(*UpdateDeviceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _DeviceService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteDeviceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DeviceServiceServer).Delete(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.DeviceService/Delete",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DeviceServiceServer).Delete(ctx, req.(*DeleteDeviceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _DeviceService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListDevicesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DeviceServiceServer).List(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.DeviceService/List",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DeviceServiceServer).List(ctx, req.(*ListDevicesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _DeviceService_CreateKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateDeviceKeysRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DeviceServiceServer).CreateKeys(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.DeviceService/CreateKeys",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DeviceServiceServer).CreateKeys(ctx, req.(*CreateDeviceKeysRequest))
}
return interceptor(ctx, in, info, handler)
}
func _DeviceService_GetKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetDeviceKeysRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DeviceServiceServer).GetKeys(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.DeviceService/GetKeys",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DeviceServiceServer).GetKeys(ctx, req.(*GetDeviceKeysRequest))
}
return interceptor(ctx, in, info, handler)
}
func _DeviceService_UpdateKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateDeviceKeysRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DeviceServiceServer).UpdateKeys(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.DeviceService/UpdateKeys",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DeviceServiceServer).UpdateKeys(ctx, req.(*UpdateDeviceKeysRequest))
}
return interceptor(ctx, in, info, handler)
}
func _DeviceService_DeleteKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteDeviceKeysRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DeviceServiceServer).DeleteKeys(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.DeviceService/DeleteKeys",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DeviceServiceServer).DeleteKeys(ctx, req.(*DeleteDeviceKeysRequest))
}
return interceptor(ctx, in, info, handler)
}
func _DeviceService_FlushDevNonces_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FlushDevNoncesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DeviceServiceServer).FlushDevNonces(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.DeviceService/FlushDevNonces",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DeviceServiceServer).FlushDevNonces(ctx, req.(*FlushDevNoncesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _DeviceService_Activate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ActivateDeviceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DeviceServiceServer).Activate(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.DeviceService/Activate",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DeviceServiceServer).Activate(ctx, req.(*ActivateDeviceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _DeviceService_Deactivate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeactivateDeviceRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DeviceServiceServer).Deactivate(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.DeviceService/Deactivate",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DeviceServiceServer).Deactivate(ctx, req.(*DeactivateDeviceRequest))
}
return interceptor(ctx, in, info, handler)
}
func _DeviceService_GetActivation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetDeviceActivationRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DeviceServiceServer).GetActivation(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.DeviceService/GetActivation",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DeviceServiceServer).GetActivation(ctx, req.(*GetDeviceActivationRequest))
}
return interceptor(ctx, in, info, handler)
}
func _DeviceService_GetRandomDevAddr_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetRandomDevAddrRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DeviceServiceServer).GetRandomDevAddr(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.DeviceService/GetRandomDevAddr",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DeviceServiceServer).GetRandomDevAddr(ctx, req.(*GetRandomDevAddrRequest))
}
return interceptor(ctx, in, info, handler)
}
func _DeviceService_GetStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetDeviceStatsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DeviceServiceServer).GetStats(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.DeviceService/GetStats",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DeviceServiceServer).GetStats(ctx, req.(*GetDeviceStatsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _DeviceService_Enqueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(EnqueueDeviceQueueItemRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DeviceServiceServer).Enqueue(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.DeviceService/Enqueue",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DeviceServiceServer).Enqueue(ctx, req.(*EnqueueDeviceQueueItemRequest))
}
return interceptor(ctx, in, info, handler)
}
func _DeviceService_FlushQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FlushDeviceQueueRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DeviceServiceServer).FlushQueue(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.DeviceService/FlushQueue",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DeviceServiceServer).FlushQueue(ctx, req.(*FlushDeviceQueueRequest))
}
return interceptor(ctx, in, info, handler)
}
func _DeviceService_GetQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetDeviceQueueItemsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DeviceServiceServer).GetQueue(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.DeviceService/GetQueue",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DeviceServiceServer).GetQueue(ctx, req.(*GetDeviceQueueItemsRequest))
}
return interceptor(ctx, in, info, handler)
}
// DeviceService_ServiceDesc is the grpc.ServiceDesc for DeviceService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var DeviceService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "api.DeviceService",
HandlerType: (*DeviceServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Create",
Handler: _DeviceService_Create_Handler,
},
{
MethodName: "Get",
Handler: _DeviceService_Get_Handler,
},
{
MethodName: "Update",
Handler: _DeviceService_Update_Handler,
},
{
MethodName: "Delete",
Handler: _DeviceService_Delete_Handler,
},
{
MethodName: "List",
Handler: _DeviceService_List_Handler,
},
{
MethodName: "CreateKeys",
Handler: _DeviceService_CreateKeys_Handler,
},
{
MethodName: "GetKeys",
Handler: _DeviceService_GetKeys_Handler,
},
{
MethodName: "UpdateKeys",
Handler: _DeviceService_UpdateKeys_Handler,
},
{
MethodName: "DeleteKeys",
Handler: _DeviceService_DeleteKeys_Handler,
},
{
MethodName: "FlushDevNonces",
Handler: _DeviceService_FlushDevNonces_Handler,
},
{
MethodName: "Activate",
Handler: _DeviceService_Activate_Handler,
},
{
MethodName: "Deactivate",
Handler: _DeviceService_Deactivate_Handler,
},
{
MethodName: "GetActivation",
Handler: _DeviceService_GetActivation_Handler,
},
{
MethodName: "GetRandomDevAddr",
Handler: _DeviceService_GetRandomDevAddr_Handler,
},
{
MethodName: "GetStats",
Handler: _DeviceService_GetStats_Handler,
},
{
MethodName: "Enqueue",
Handler: _DeviceService_Enqueue_Handler,
},
{
MethodName: "FlushQueue",
Handler: _DeviceService_FlushQueue_Handler,
},
{
MethodName: "GetQueue",
Handler: _DeviceService_GetQueue_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "api/device.proto",
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,298 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.18.1
// source: api/device_profile.proto
package v4
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// DeviceProfileServiceClient is the client API for DeviceProfileService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type DeviceProfileServiceClient interface {
// Create the given device-profile.
Create(ctx context.Context, in *CreateDeviceProfileRequest, opts ...grpc.CallOption) (*CreateDeviceProfileResponse, error)
// Get the device-profile for the given ID.
Get(ctx context.Context, in *GetDeviceProfileRequest, opts ...grpc.CallOption) (*GetDeviceProfileResponse, error)
// Update the given device-profile.
Update(ctx context.Context, in *UpdateDeviceProfileRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Delete the device-profile with the given ID.
Delete(ctx context.Context, in *DeleteDeviceProfileRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// List the available device-profiles.
List(ctx context.Context, in *ListDeviceProfilesRequest, opts ...grpc.CallOption) (*ListDeviceProfilesResponse, error)
// List available ADR algorithms.
ListAdrAlgorithms(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListDeviceProfileAdrAlgorithmsResponse, error)
}
type deviceProfileServiceClient struct {
cc grpc.ClientConnInterface
}
func NewDeviceProfileServiceClient(cc grpc.ClientConnInterface) DeviceProfileServiceClient {
return &deviceProfileServiceClient{cc}
}
func (c *deviceProfileServiceClient) Create(ctx context.Context, in *CreateDeviceProfileRequest, opts ...grpc.CallOption) (*CreateDeviceProfileResponse, error) {
out := new(CreateDeviceProfileResponse)
err := c.cc.Invoke(ctx, "/api.DeviceProfileService/Create", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *deviceProfileServiceClient) Get(ctx context.Context, in *GetDeviceProfileRequest, opts ...grpc.CallOption) (*GetDeviceProfileResponse, error) {
out := new(GetDeviceProfileResponse)
err := c.cc.Invoke(ctx, "/api.DeviceProfileService/Get", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *deviceProfileServiceClient) Update(ctx context.Context, in *UpdateDeviceProfileRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.DeviceProfileService/Update", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *deviceProfileServiceClient) Delete(ctx context.Context, in *DeleteDeviceProfileRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.DeviceProfileService/Delete", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *deviceProfileServiceClient) List(ctx context.Context, in *ListDeviceProfilesRequest, opts ...grpc.CallOption) (*ListDeviceProfilesResponse, error) {
out := new(ListDeviceProfilesResponse)
err := c.cc.Invoke(ctx, "/api.DeviceProfileService/List", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *deviceProfileServiceClient) ListAdrAlgorithms(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListDeviceProfileAdrAlgorithmsResponse, error) {
out := new(ListDeviceProfileAdrAlgorithmsResponse)
err := c.cc.Invoke(ctx, "/api.DeviceProfileService/ListAdrAlgorithms", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// DeviceProfileServiceServer is the server API for DeviceProfileService service.
// All implementations must embed UnimplementedDeviceProfileServiceServer
// for forward compatibility
type DeviceProfileServiceServer interface {
// Create the given device-profile.
Create(context.Context, *CreateDeviceProfileRequest) (*CreateDeviceProfileResponse, error)
// Get the device-profile for the given ID.
Get(context.Context, *GetDeviceProfileRequest) (*GetDeviceProfileResponse, error)
// Update the given device-profile.
Update(context.Context, *UpdateDeviceProfileRequest) (*emptypb.Empty, error)
// Delete the device-profile with the given ID.
Delete(context.Context, *DeleteDeviceProfileRequest) (*emptypb.Empty, error)
// List the available device-profiles.
List(context.Context, *ListDeviceProfilesRequest) (*ListDeviceProfilesResponse, error)
// List available ADR algorithms.
ListAdrAlgorithms(context.Context, *emptypb.Empty) (*ListDeviceProfileAdrAlgorithmsResponse, error)
mustEmbedUnimplementedDeviceProfileServiceServer()
}
// UnimplementedDeviceProfileServiceServer must be embedded to have forward compatible implementations.
type UnimplementedDeviceProfileServiceServer struct {
}
func (UnimplementedDeviceProfileServiceServer) Create(context.Context, *CreateDeviceProfileRequest) (*CreateDeviceProfileResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedDeviceProfileServiceServer) Get(context.Context, *GetDeviceProfileRequest) (*GetDeviceProfileResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedDeviceProfileServiceServer) Update(context.Context, *UpdateDeviceProfileRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
}
func (UnimplementedDeviceProfileServiceServer) Delete(context.Context, *DeleteDeviceProfileRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedDeviceProfileServiceServer) List(context.Context, *ListDeviceProfilesRequest) (*ListDeviceProfilesResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedDeviceProfileServiceServer) ListAdrAlgorithms(context.Context, *emptypb.Empty) (*ListDeviceProfileAdrAlgorithmsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListAdrAlgorithms not implemented")
}
func (UnimplementedDeviceProfileServiceServer) mustEmbedUnimplementedDeviceProfileServiceServer() {}
// UnsafeDeviceProfileServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to DeviceProfileServiceServer will
// result in compilation errors.
type UnsafeDeviceProfileServiceServer interface {
mustEmbedUnimplementedDeviceProfileServiceServer()
}
func RegisterDeviceProfileServiceServer(s grpc.ServiceRegistrar, srv DeviceProfileServiceServer) {
s.RegisterService(&DeviceProfileService_ServiceDesc, srv)
}
func _DeviceProfileService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateDeviceProfileRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DeviceProfileServiceServer).Create(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.DeviceProfileService/Create",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DeviceProfileServiceServer).Create(ctx, req.(*CreateDeviceProfileRequest))
}
return interceptor(ctx, in, info, handler)
}
func _DeviceProfileService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetDeviceProfileRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DeviceProfileServiceServer).Get(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.DeviceProfileService/Get",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DeviceProfileServiceServer).Get(ctx, req.(*GetDeviceProfileRequest))
}
return interceptor(ctx, in, info, handler)
}
func _DeviceProfileService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateDeviceProfileRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DeviceProfileServiceServer).Update(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.DeviceProfileService/Update",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DeviceProfileServiceServer).Update(ctx, req.(*UpdateDeviceProfileRequest))
}
return interceptor(ctx, in, info, handler)
}
func _DeviceProfileService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteDeviceProfileRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DeviceProfileServiceServer).Delete(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.DeviceProfileService/Delete",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DeviceProfileServiceServer).Delete(ctx, req.(*DeleteDeviceProfileRequest))
}
return interceptor(ctx, in, info, handler)
}
func _DeviceProfileService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListDeviceProfilesRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DeviceProfileServiceServer).List(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.DeviceProfileService/List",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DeviceProfileServiceServer).List(ctx, req.(*ListDeviceProfilesRequest))
}
return interceptor(ctx, in, info, handler)
}
func _DeviceProfileService_ListAdrAlgorithms_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(emptypb.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(DeviceProfileServiceServer).ListAdrAlgorithms(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.DeviceProfileService/ListAdrAlgorithms",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(DeviceProfileServiceServer).ListAdrAlgorithms(ctx, req.(*emptypb.Empty))
}
return interceptor(ctx, in, info, handler)
}
// DeviceProfileService_ServiceDesc is the grpc.ServiceDesc for DeviceProfileService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var DeviceProfileService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "api.DeviceProfileService",
HandlerType: (*DeviceProfileServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Create",
Handler: _DeviceProfileService_Create_Handler,
},
{
MethodName: "Get",
Handler: _DeviceProfileService_Get_Handler,
},
{
MethodName: "Update",
Handler: _DeviceProfileService_Update_Handler,
},
{
MethodName: "Delete",
Handler: _DeviceProfileService_Delete_Handler,
},
{
MethodName: "List",
Handler: _DeviceProfileService_List_Handler,
},
{
MethodName: "ListAdrAlgorithms",
Handler: _DeviceProfileService_ListAdrAlgorithms_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "api/device_profile.proto",
}

378
api/go/api/frame_log.pb.go Normal file
View File

@ -0,0 +1,378 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.18.1
// source: api/frame_log.proto
package v4
import (
gw "github.com/chirpstack/chirpstack-api/go/v4/gw"
common "github.com/chirpstack/chirpstack/api/go/v4/common"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type UplinkFrameLog struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// PHYPayload.
PhyPayload []byte `protobuf:"bytes,1,opt,name=phy_payload,json=phyPayload,proto3" json:"phy_payload,omitempty"`
// TX meta-data.
TxInfo *gw.UplinkTXInfo `protobuf:"bytes,2,opt,name=tx_info,json=txInfo,proto3" json:"tx_info,omitempty"`
// RX meta-data.
RxInfo []*gw.UplinkRXInfo `protobuf:"bytes,3,rep,name=rx_info,json=rxInfo,proto3" json:"rx_info,omitempty"`
// Message type.
MType common.MType `protobuf:"varint,4,opt,name=m_type,json=mType,proto3,enum=common.MType" json:"m_type,omitempty"`
// Device address (optional).
DevAddr string `protobuf:"bytes,5,opt,name=dev_addr,json=devAddr,proto3" json:"dev_addr,omitempty"`
// Device EUI (optional).
DevEui string `protobuf:"bytes,6,opt,name=dev_eui,json=devEui,proto3" json:"dev_eui,omitempty"`
// Time.
Time *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=time,proto3" json:"time,omitempty"`
}
func (x *UplinkFrameLog) Reset() {
*x = UplinkFrameLog{}
if protoimpl.UnsafeEnabled {
mi := &file_api_frame_log_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UplinkFrameLog) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UplinkFrameLog) ProtoMessage() {}
func (x *UplinkFrameLog) ProtoReflect() protoreflect.Message {
mi := &file_api_frame_log_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UplinkFrameLog.ProtoReflect.Descriptor instead.
func (*UplinkFrameLog) Descriptor() ([]byte, []int) {
return file_api_frame_log_proto_rawDescGZIP(), []int{0}
}
func (x *UplinkFrameLog) GetPhyPayload() []byte {
if x != nil {
return x.PhyPayload
}
return nil
}
func (x *UplinkFrameLog) GetTxInfo() *gw.UplinkTXInfo {
if x != nil {
return x.TxInfo
}
return nil
}
func (x *UplinkFrameLog) GetRxInfo() []*gw.UplinkRXInfo {
if x != nil {
return x.RxInfo
}
return nil
}
func (x *UplinkFrameLog) GetMType() common.MType {
if x != nil {
return x.MType
}
return common.MType(0)
}
func (x *UplinkFrameLog) GetDevAddr() string {
if x != nil {
return x.DevAddr
}
return ""
}
func (x *UplinkFrameLog) GetDevEui() string {
if x != nil {
return x.DevEui
}
return ""
}
func (x *UplinkFrameLog) GetTime() *timestamppb.Timestamp {
if x != nil {
return x.Time
}
return nil
}
type DownlinkFrameLog struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Time.
Time *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=time,proto3" json:"time,omitempty"`
// PHYPayload.
PhyPayload []byte `protobuf:"bytes,2,opt,name=phy_payload,json=phyPayload,proto3" json:"phy_payload,omitempty"`
// TX meta-data.
TxInfo *gw.DownlinkTXInfo `protobuf:"bytes,3,opt,name=tx_info,json=txInfo,proto3" json:"tx_info,omitempty"`
// Downlink ID (UUID).
DownlinkId string `protobuf:"bytes,4,opt,name=downlink_id,json=downlinkId,proto3" json:"downlink_id,omitempty"`
// Gateway ID (EUI64).
GatewayId string `protobuf:"bytes,5,opt,name=gateway_id,json=gatewayId,proto3" json:"gateway_id,omitempty"`
// Message type.
MType common.MType `protobuf:"varint,6,opt,name=m_type,json=mType,proto3,enum=common.MType" json:"m_type,omitempty"`
// Device address (optional).
DevAddr string `protobuf:"bytes,7,opt,name=dev_addr,json=devAddr,proto3" json:"dev_addr,omitempty"`
// Device EUI (optional).
DevEui string `protobuf:"bytes,8,opt,name=dev_eui,json=devEui,proto3" json:"dev_eui,omitempty"`
}
func (x *DownlinkFrameLog) Reset() {
*x = DownlinkFrameLog{}
if protoimpl.UnsafeEnabled {
mi := &file_api_frame_log_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DownlinkFrameLog) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DownlinkFrameLog) ProtoMessage() {}
func (x *DownlinkFrameLog) ProtoReflect() protoreflect.Message {
mi := &file_api_frame_log_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DownlinkFrameLog.ProtoReflect.Descriptor instead.
func (*DownlinkFrameLog) Descriptor() ([]byte, []int) {
return file_api_frame_log_proto_rawDescGZIP(), []int{1}
}
func (x *DownlinkFrameLog) GetTime() *timestamppb.Timestamp {
if x != nil {
return x.Time
}
return nil
}
func (x *DownlinkFrameLog) GetPhyPayload() []byte {
if x != nil {
return x.PhyPayload
}
return nil
}
func (x *DownlinkFrameLog) GetTxInfo() *gw.DownlinkTXInfo {
if x != nil {
return x.TxInfo
}
return nil
}
func (x *DownlinkFrameLog) GetDownlinkId() string {
if x != nil {
return x.DownlinkId
}
return ""
}
func (x *DownlinkFrameLog) GetGatewayId() string {
if x != nil {
return x.GatewayId
}
return ""
}
func (x *DownlinkFrameLog) GetMType() common.MType {
if x != nil {
return x.MType
}
return common.MType(0)
}
func (x *DownlinkFrameLog) GetDevAddr() string {
if x != nil {
return x.DevAddr
}
return ""
}
func (x *DownlinkFrameLog) GetDevEui() string {
if x != nil {
return x.DevEui
}
return ""
}
var File_api_frame_log_proto protoreflect.FileDescriptor
var file_api_frame_log_proto_rawDesc = []byte{
0x0a, 0x13, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x5f, 0x6c, 0x6f, 0x67, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x03, 0x61, 0x70, 0x69, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67,
0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65,
0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x13, 0x63, 0x6f, 0x6d,
0x6d, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
0x1a, 0x0b, 0x67, 0x77, 0x2f, 0x67, 0x77, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x91, 0x02,
0x0a, 0x0e, 0x55, 0x70, 0x6c, 0x69, 0x6e, 0x6b, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x4c, 0x6f, 0x67,
0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x68, 0x79, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18,
0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x70, 0x68, 0x79, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61,
0x64, 0x12, 0x29, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x77, 0x2e, 0x55, 0x70, 0x6c, 0x69, 0x6e, 0x6b, 0x54, 0x58,
0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x74, 0x78, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x29, 0x0a, 0x07,
0x72, 0x78, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e,
0x67, 0x77, 0x2e, 0x55, 0x70, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x58, 0x49, 0x6e, 0x66, 0x6f, 0x52,
0x06, 0x72, 0x78, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x24, 0x0a, 0x06, 0x6d, 0x5f, 0x74, 0x79, 0x70,
0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
0x2e, 0x4d, 0x54, 0x79, 0x70, 0x65, 0x52, 0x05, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a,
0x08, 0x64, 0x65, 0x76, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
0x07, 0x64, 0x65, 0x76, 0x41, 0x64, 0x64, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x65, 0x76, 0x5f,
0x65, 0x75, 0x69, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x76, 0x45, 0x75,
0x69, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32,
0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, 0x74, 0x69, 0x6d,
0x65, 0x22, 0xaa, 0x02, 0x0a, 0x10, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x46, 0x72,
0x61, 0x6d, 0x65, 0x4c, 0x6f, 0x67, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01,
0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,
0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x68, 0x79, 0x5f, 0x70, 0x61,
0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x70, 0x68, 0x79,
0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x2b, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x69, 0x6e,
0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x77, 0x2e, 0x44, 0x6f,
0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x54, 0x58, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x74, 0x78,
0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b,
0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x6f, 0x77, 0x6e, 0x6c,
0x69, 0x6e, 0x6b, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79,
0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x61, 0x74, 0x65, 0x77,
0x61, 0x79, 0x49, 0x64, 0x12, 0x24, 0x0a, 0x06, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06,
0x20, 0x01, 0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x54,
0x79, 0x70, 0x65, 0x52, 0x05, 0x6d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x64, 0x65,
0x76, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65,
0x76, 0x41, 0x64, 0x64, 0x72, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x65, 0x76, 0x5f, 0x65, 0x75, 0x69,
0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x76, 0x45, 0x75, 0x69, 0x42, 0x50,
0x0a, 0x11, 0x69, 0x6f, 0x2e, 0x63, 0x68, 0x69, 0x72, 0x70, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e,
0x61, 0x70, 0x69, 0x42, 0x0d, 0x46, 0x72, 0x61, 0x6d, 0x65, 0x4c, 0x6f, 0x67, 0x50, 0x72, 0x6f,
0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
0x2f, 0x63, 0x68, 0x69, 0x72, 0x70, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2f, 0x63, 0x68, 0x69, 0x72,
0x70, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x34,
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_api_frame_log_proto_rawDescOnce sync.Once
file_api_frame_log_proto_rawDescData = file_api_frame_log_proto_rawDesc
)
func file_api_frame_log_proto_rawDescGZIP() []byte {
file_api_frame_log_proto_rawDescOnce.Do(func() {
file_api_frame_log_proto_rawDescData = protoimpl.X.CompressGZIP(file_api_frame_log_proto_rawDescData)
})
return file_api_frame_log_proto_rawDescData
}
var file_api_frame_log_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_api_frame_log_proto_goTypes = []interface{}{
(*UplinkFrameLog)(nil), // 0: api.UplinkFrameLog
(*DownlinkFrameLog)(nil), // 1: api.DownlinkFrameLog
(*gw.UplinkTXInfo)(nil), // 2: gw.UplinkTXInfo
(*gw.UplinkRXInfo)(nil), // 3: gw.UplinkRXInfo
(common.MType)(0), // 4: common.MType
(*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp
(*gw.DownlinkTXInfo)(nil), // 6: gw.DownlinkTXInfo
}
var file_api_frame_log_proto_depIdxs = []int32{
2, // 0: api.UplinkFrameLog.tx_info:type_name -> gw.UplinkTXInfo
3, // 1: api.UplinkFrameLog.rx_info:type_name -> gw.UplinkRXInfo
4, // 2: api.UplinkFrameLog.m_type:type_name -> common.MType
5, // 3: api.UplinkFrameLog.time:type_name -> google.protobuf.Timestamp
5, // 4: api.DownlinkFrameLog.time:type_name -> google.protobuf.Timestamp
6, // 5: api.DownlinkFrameLog.tx_info:type_name -> gw.DownlinkTXInfo
4, // 6: api.DownlinkFrameLog.m_type:type_name -> common.MType
7, // [7:7] is the sub-list for method output_type
7, // [7:7] is the sub-list for method input_type
7, // [7:7] is the sub-list for extension type_name
7, // [7:7] is the sub-list for extension extendee
0, // [0:7] is the sub-list for field type_name
}
func init() { file_api_frame_log_proto_init() }
func file_api_frame_log_proto_init() {
if File_api_frame_log_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_api_frame_log_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UplinkFrameLog); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_api_frame_log_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DownlinkFrameLog); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_api_frame_log_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_api_frame_log_proto_goTypes,
DependencyIndexes: file_api_frame_log_proto_depIdxs,
MessageInfos: file_api_frame_log_proto_msgTypes,
}.Build()
File_api_frame_log_proto = out.File
file_api_frame_log_proto_rawDesc = nil
file_api_frame_log_proto_goTypes = nil
file_api_frame_log_proto_depIdxs = nil
}

1514
api/go/api/gateway.pb.go Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,336 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.18.1
// source: api/gateway.proto
package v4
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// GatewayServiceClient is the client API for GatewayService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type GatewayServiceClient interface {
// Create creates the given gateway.
Create(ctx context.Context, in *CreateGatewayRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Get returns the gateway for the given Gateway ID.
Get(ctx context.Context, in *GetGatewayRequest, opts ...grpc.CallOption) (*GetGatewayResponse, error)
// Update updates the given gateway.
Update(ctx context.Context, in *UpdateGatewayRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Delete deletes the gateway matching the given Gateway ID.
Delete(ctx context.Context, in *DeleteGatewayRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Get the list of gateways.
List(ctx context.Context, in *ListGatewaysRequest, opts ...grpc.CallOption) (*ListGatewaysResponse, error)
// Generate client-certificate for the gateway.
GenerateClientCertificate(ctx context.Context, in *GenerateGatewayClientCertificateRequest, opts ...grpc.CallOption) (*GenerateGatewayClientCertificateResponse, error)
// GetStats returns the gateway stats.
GetStats(ctx context.Context, in *GetGatewayStatsRequest, opts ...grpc.CallOption) (*GetGatewayStatsResponse, error)
}
type gatewayServiceClient struct {
cc grpc.ClientConnInterface
}
func NewGatewayServiceClient(cc grpc.ClientConnInterface) GatewayServiceClient {
return &gatewayServiceClient{cc}
}
func (c *gatewayServiceClient) Create(ctx context.Context, in *CreateGatewayRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.GatewayService/Create", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *gatewayServiceClient) Get(ctx context.Context, in *GetGatewayRequest, opts ...grpc.CallOption) (*GetGatewayResponse, error) {
out := new(GetGatewayResponse)
err := c.cc.Invoke(ctx, "/api.GatewayService/Get", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *gatewayServiceClient) Update(ctx context.Context, in *UpdateGatewayRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.GatewayService/Update", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *gatewayServiceClient) Delete(ctx context.Context, in *DeleteGatewayRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.GatewayService/Delete", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *gatewayServiceClient) List(ctx context.Context, in *ListGatewaysRequest, opts ...grpc.CallOption) (*ListGatewaysResponse, error) {
out := new(ListGatewaysResponse)
err := c.cc.Invoke(ctx, "/api.GatewayService/List", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *gatewayServiceClient) GenerateClientCertificate(ctx context.Context, in *GenerateGatewayClientCertificateRequest, opts ...grpc.CallOption) (*GenerateGatewayClientCertificateResponse, error) {
out := new(GenerateGatewayClientCertificateResponse)
err := c.cc.Invoke(ctx, "/api.GatewayService/GenerateClientCertificate", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *gatewayServiceClient) GetStats(ctx context.Context, in *GetGatewayStatsRequest, opts ...grpc.CallOption) (*GetGatewayStatsResponse, error) {
out := new(GetGatewayStatsResponse)
err := c.cc.Invoke(ctx, "/api.GatewayService/GetStats", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// GatewayServiceServer is the server API for GatewayService service.
// All implementations must embed UnimplementedGatewayServiceServer
// for forward compatibility
type GatewayServiceServer interface {
// Create creates the given gateway.
Create(context.Context, *CreateGatewayRequest) (*emptypb.Empty, error)
// Get returns the gateway for the given Gateway ID.
Get(context.Context, *GetGatewayRequest) (*GetGatewayResponse, error)
// Update updates the given gateway.
Update(context.Context, *UpdateGatewayRequest) (*emptypb.Empty, error)
// Delete deletes the gateway matching the given Gateway ID.
Delete(context.Context, *DeleteGatewayRequest) (*emptypb.Empty, error)
// Get the list of gateways.
List(context.Context, *ListGatewaysRequest) (*ListGatewaysResponse, error)
// Generate client-certificate for the gateway.
GenerateClientCertificate(context.Context, *GenerateGatewayClientCertificateRequest) (*GenerateGatewayClientCertificateResponse, error)
// GetStats returns the gateway stats.
GetStats(context.Context, *GetGatewayStatsRequest) (*GetGatewayStatsResponse, error)
mustEmbedUnimplementedGatewayServiceServer()
}
// UnimplementedGatewayServiceServer must be embedded to have forward compatible implementations.
type UnimplementedGatewayServiceServer struct {
}
func (UnimplementedGatewayServiceServer) Create(context.Context, *CreateGatewayRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedGatewayServiceServer) Get(context.Context, *GetGatewayRequest) (*GetGatewayResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedGatewayServiceServer) Update(context.Context, *UpdateGatewayRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
}
func (UnimplementedGatewayServiceServer) Delete(context.Context, *DeleteGatewayRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedGatewayServiceServer) List(context.Context, *ListGatewaysRequest) (*ListGatewaysResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedGatewayServiceServer) GenerateClientCertificate(context.Context, *GenerateGatewayClientCertificateRequest) (*GenerateGatewayClientCertificateResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GenerateClientCertificate not implemented")
}
func (UnimplementedGatewayServiceServer) GetStats(context.Context, *GetGatewayStatsRequest) (*GetGatewayStatsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetStats not implemented")
}
func (UnimplementedGatewayServiceServer) mustEmbedUnimplementedGatewayServiceServer() {}
// UnsafeGatewayServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to GatewayServiceServer will
// result in compilation errors.
type UnsafeGatewayServiceServer interface {
mustEmbedUnimplementedGatewayServiceServer()
}
func RegisterGatewayServiceServer(s grpc.ServiceRegistrar, srv GatewayServiceServer) {
s.RegisterService(&GatewayService_ServiceDesc, srv)
}
func _GatewayService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateGatewayRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(GatewayServiceServer).Create(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.GatewayService/Create",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(GatewayServiceServer).Create(ctx, req.(*CreateGatewayRequest))
}
return interceptor(ctx, in, info, handler)
}
func _GatewayService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetGatewayRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(GatewayServiceServer).Get(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.GatewayService/Get",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(GatewayServiceServer).Get(ctx, req.(*GetGatewayRequest))
}
return interceptor(ctx, in, info, handler)
}
func _GatewayService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateGatewayRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(GatewayServiceServer).Update(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.GatewayService/Update",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(GatewayServiceServer).Update(ctx, req.(*UpdateGatewayRequest))
}
return interceptor(ctx, in, info, handler)
}
func _GatewayService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteGatewayRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(GatewayServiceServer).Delete(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.GatewayService/Delete",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(GatewayServiceServer).Delete(ctx, req.(*DeleteGatewayRequest))
}
return interceptor(ctx, in, info, handler)
}
func _GatewayService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListGatewaysRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(GatewayServiceServer).List(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.GatewayService/List",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(GatewayServiceServer).List(ctx, req.(*ListGatewaysRequest))
}
return interceptor(ctx, in, info, handler)
}
func _GatewayService_GenerateClientCertificate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GenerateGatewayClientCertificateRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(GatewayServiceServer).GenerateClientCertificate(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.GatewayService/GenerateClientCertificate",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(GatewayServiceServer).GenerateClientCertificate(ctx, req.(*GenerateGatewayClientCertificateRequest))
}
return interceptor(ctx, in, info, handler)
}
func _GatewayService_GetStats_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetGatewayStatsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(GatewayServiceServer).GetStats(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.GatewayService/GetStats",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(GatewayServiceServer).GetStats(ctx, req.(*GetGatewayStatsRequest))
}
return interceptor(ctx, in, info, handler)
}
// GatewayService_ServiceDesc is the grpc.ServiceDesc for GatewayService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var GatewayService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "api.GatewayService",
HandlerType: (*GatewayServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Create",
Handler: _GatewayService_Create_Handler,
},
{
MethodName: "Get",
Handler: _GatewayService_Get_Handler,
},
{
MethodName: "Update",
Handler: _GatewayService_Update_Handler,
},
{
MethodName: "Delete",
Handler: _GatewayService_Delete_Handler,
},
{
MethodName: "List",
Handler: _GatewayService_List_Handler,
},
{
MethodName: "GenerateClientCertificate",
Handler: _GatewayService_GenerateClientCertificate_Handler,
},
{
MethodName: "GetStats",
Handler: _GatewayService_GetStats_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "api/gateway.proto",
}

2246
api/go/api/internal.pb.go Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,646 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.18.1
// source: api/internal.proto
package v4
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// InternalServiceClient is the client API for InternalService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type InternalServiceClient interface {
// Log in a user
Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error)
// Get the current user's profile
Profile(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ProfileResponse, error)
// Perform a global search.
GlobalSearch(ctx context.Context, in *GlobalSearchRequest, opts ...grpc.CallOption) (*GlobalSearchResponse, error)
// CreateApiKey creates the given API key.
CreateApiKey(ctx context.Context, in *CreateApiKeyRequest, opts ...grpc.CallOption) (*CreateApiKeyResponse, error)
// DeleteApiKey deletes the API key.
DeleteApiKey(ctx context.Context, in *DeleteApiKeyRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// ListApiKeys lists the available API keys.
ListApiKeys(ctx context.Context, in *ListApiKeysRequest, opts ...grpc.CallOption) (*ListApiKeysResponse, error)
// Get the global settings.
Settings(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*SettingsResponse, error)
// OpenId Connect login.
OpenIdConnectLogin(ctx context.Context, in *OpenIdConnectLoginRequest, opts ...grpc.CallOption) (*OpenIdConnectLoginResponse, error)
// GetDevicesSummary returns an aggregated summary of the devices.
GetDevicesSummary(ctx context.Context, in *GetDevicesSummaryRequest, opts ...grpc.CallOption) (*GetDevicesSummaryResponse, error)
// GetGatewaysSummary returns an aggregated summary of the gateways.
GetGatewaysSummary(ctx context.Context, in *GetGatewaysSummaryRequest, opts ...grpc.CallOption) (*GetGatewaysSummaryResponse, error)
// Stream frame for the given Gateway ID.
StreamGatewayFrames(ctx context.Context, in *StreamGatewayFramesRequest, opts ...grpc.CallOption) (InternalService_StreamGatewayFramesClient, error)
// Stream frames for the given Device EUI.
StreamDeviceFrames(ctx context.Context, in *StreamDeviceFramesRequest, opts ...grpc.CallOption) (InternalService_StreamDeviceFramesClient, error)
// Stream events for the given Device EUI.
StreamDeviceEvents(ctx context.Context, in *StreamDeviceEventsRequest, opts ...grpc.CallOption) (InternalService_StreamDeviceEventsClient, error)
}
type internalServiceClient struct {
cc grpc.ClientConnInterface
}
func NewInternalServiceClient(cc grpc.ClientConnInterface) InternalServiceClient {
return &internalServiceClient{cc}
}
func (c *internalServiceClient) Login(ctx context.Context, in *LoginRequest, opts ...grpc.CallOption) (*LoginResponse, error) {
out := new(LoginResponse)
err := c.cc.Invoke(ctx, "/api.InternalService/Login", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *internalServiceClient) Profile(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ProfileResponse, error) {
out := new(ProfileResponse)
err := c.cc.Invoke(ctx, "/api.InternalService/Profile", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *internalServiceClient) GlobalSearch(ctx context.Context, in *GlobalSearchRequest, opts ...grpc.CallOption) (*GlobalSearchResponse, error) {
out := new(GlobalSearchResponse)
err := c.cc.Invoke(ctx, "/api.InternalService/GlobalSearch", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *internalServiceClient) CreateApiKey(ctx context.Context, in *CreateApiKeyRequest, opts ...grpc.CallOption) (*CreateApiKeyResponse, error) {
out := new(CreateApiKeyResponse)
err := c.cc.Invoke(ctx, "/api.InternalService/CreateApiKey", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *internalServiceClient) DeleteApiKey(ctx context.Context, in *DeleteApiKeyRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.InternalService/DeleteApiKey", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *internalServiceClient) ListApiKeys(ctx context.Context, in *ListApiKeysRequest, opts ...grpc.CallOption) (*ListApiKeysResponse, error) {
out := new(ListApiKeysResponse)
err := c.cc.Invoke(ctx, "/api.InternalService/ListApiKeys", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *internalServiceClient) Settings(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*SettingsResponse, error) {
out := new(SettingsResponse)
err := c.cc.Invoke(ctx, "/api.InternalService/Settings", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *internalServiceClient) OpenIdConnectLogin(ctx context.Context, in *OpenIdConnectLoginRequest, opts ...grpc.CallOption) (*OpenIdConnectLoginResponse, error) {
out := new(OpenIdConnectLoginResponse)
err := c.cc.Invoke(ctx, "/api.InternalService/OpenIdConnectLogin", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *internalServiceClient) GetDevicesSummary(ctx context.Context, in *GetDevicesSummaryRequest, opts ...grpc.CallOption) (*GetDevicesSummaryResponse, error) {
out := new(GetDevicesSummaryResponse)
err := c.cc.Invoke(ctx, "/api.InternalService/GetDevicesSummary", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *internalServiceClient) GetGatewaysSummary(ctx context.Context, in *GetGatewaysSummaryRequest, opts ...grpc.CallOption) (*GetGatewaysSummaryResponse, error) {
out := new(GetGatewaysSummaryResponse)
err := c.cc.Invoke(ctx, "/api.InternalService/GetGatewaysSummary", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *internalServiceClient) StreamGatewayFrames(ctx context.Context, in *StreamGatewayFramesRequest, opts ...grpc.CallOption) (InternalService_StreamGatewayFramesClient, error) {
stream, err := c.cc.NewStream(ctx, &InternalService_ServiceDesc.Streams[0], "/api.InternalService/StreamGatewayFrames", opts...)
if err != nil {
return nil, err
}
x := &internalServiceStreamGatewayFramesClient{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 InternalService_StreamGatewayFramesClient interface {
Recv() (*LogItem, error)
grpc.ClientStream
}
type internalServiceStreamGatewayFramesClient struct {
grpc.ClientStream
}
func (x *internalServiceStreamGatewayFramesClient) Recv() (*LogItem, error) {
m := new(LogItem)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *internalServiceClient) StreamDeviceFrames(ctx context.Context, in *StreamDeviceFramesRequest, opts ...grpc.CallOption) (InternalService_StreamDeviceFramesClient, error) {
stream, err := c.cc.NewStream(ctx, &InternalService_ServiceDesc.Streams[1], "/api.InternalService/StreamDeviceFrames", opts...)
if err != nil {
return nil, err
}
x := &internalServiceStreamDeviceFramesClient{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 InternalService_StreamDeviceFramesClient interface {
Recv() (*LogItem, error)
grpc.ClientStream
}
type internalServiceStreamDeviceFramesClient struct {
grpc.ClientStream
}
func (x *internalServiceStreamDeviceFramesClient) Recv() (*LogItem, error) {
m := new(LogItem)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
func (c *internalServiceClient) StreamDeviceEvents(ctx context.Context, in *StreamDeviceEventsRequest, opts ...grpc.CallOption) (InternalService_StreamDeviceEventsClient, error) {
stream, err := c.cc.NewStream(ctx, &InternalService_ServiceDesc.Streams[2], "/api.InternalService/StreamDeviceEvents", opts...)
if err != nil {
return nil, err
}
x := &internalServiceStreamDeviceEventsClient{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 InternalService_StreamDeviceEventsClient interface {
Recv() (*LogItem, error)
grpc.ClientStream
}
type internalServiceStreamDeviceEventsClient struct {
grpc.ClientStream
}
func (x *internalServiceStreamDeviceEventsClient) Recv() (*LogItem, error) {
m := new(LogItem)
if err := x.ClientStream.RecvMsg(m); err != nil {
return nil, err
}
return m, nil
}
// InternalServiceServer is the server API for InternalService service.
// All implementations must embed UnimplementedInternalServiceServer
// for forward compatibility
type InternalServiceServer interface {
// Log in a user
Login(context.Context, *LoginRequest) (*LoginResponse, error)
// Get the current user's profile
Profile(context.Context, *emptypb.Empty) (*ProfileResponse, error)
// Perform a global search.
GlobalSearch(context.Context, *GlobalSearchRequest) (*GlobalSearchResponse, error)
// CreateApiKey creates the given API key.
CreateApiKey(context.Context, *CreateApiKeyRequest) (*CreateApiKeyResponse, error)
// DeleteApiKey deletes the API key.
DeleteApiKey(context.Context, *DeleteApiKeyRequest) (*emptypb.Empty, error)
// ListApiKeys lists the available API keys.
ListApiKeys(context.Context, *ListApiKeysRequest) (*ListApiKeysResponse, error)
// Get the global settings.
Settings(context.Context, *emptypb.Empty) (*SettingsResponse, error)
// OpenId Connect login.
OpenIdConnectLogin(context.Context, *OpenIdConnectLoginRequest) (*OpenIdConnectLoginResponse, error)
// GetDevicesSummary returns an aggregated summary of the devices.
GetDevicesSummary(context.Context, *GetDevicesSummaryRequest) (*GetDevicesSummaryResponse, error)
// GetGatewaysSummary returns an aggregated summary of the gateways.
GetGatewaysSummary(context.Context, *GetGatewaysSummaryRequest) (*GetGatewaysSummaryResponse, error)
// Stream frame for the given Gateway ID.
StreamGatewayFrames(*StreamGatewayFramesRequest, InternalService_StreamGatewayFramesServer) error
// Stream frames for the given Device EUI.
StreamDeviceFrames(*StreamDeviceFramesRequest, InternalService_StreamDeviceFramesServer) error
// Stream events for the given Device EUI.
StreamDeviceEvents(*StreamDeviceEventsRequest, InternalService_StreamDeviceEventsServer) error
mustEmbedUnimplementedInternalServiceServer()
}
// UnimplementedInternalServiceServer must be embedded to have forward compatible implementations.
type UnimplementedInternalServiceServer struct {
}
func (UnimplementedInternalServiceServer) Login(context.Context, *LoginRequest) (*LoginResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Login not implemented")
}
func (UnimplementedInternalServiceServer) Profile(context.Context, *emptypb.Empty) (*ProfileResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Profile not implemented")
}
func (UnimplementedInternalServiceServer) GlobalSearch(context.Context, *GlobalSearchRequest) (*GlobalSearchResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GlobalSearch not implemented")
}
func (UnimplementedInternalServiceServer) CreateApiKey(context.Context, *CreateApiKeyRequest) (*CreateApiKeyResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method CreateApiKey not implemented")
}
func (UnimplementedInternalServiceServer) DeleteApiKey(context.Context, *DeleteApiKeyRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteApiKey not implemented")
}
func (UnimplementedInternalServiceServer) ListApiKeys(context.Context, *ListApiKeysRequest) (*ListApiKeysResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListApiKeys not implemented")
}
func (UnimplementedInternalServiceServer) Settings(context.Context, *emptypb.Empty) (*SettingsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Settings not implemented")
}
func (UnimplementedInternalServiceServer) OpenIdConnectLogin(context.Context, *OpenIdConnectLoginRequest) (*OpenIdConnectLoginResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method OpenIdConnectLogin not implemented")
}
func (UnimplementedInternalServiceServer) GetDevicesSummary(context.Context, *GetDevicesSummaryRequest) (*GetDevicesSummaryResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetDevicesSummary not implemented")
}
func (UnimplementedInternalServiceServer) GetGatewaysSummary(context.Context, *GetGatewaysSummaryRequest) (*GetGatewaysSummaryResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetGatewaysSummary not implemented")
}
func (UnimplementedInternalServiceServer) StreamGatewayFrames(*StreamGatewayFramesRequest, InternalService_StreamGatewayFramesServer) error {
return status.Errorf(codes.Unimplemented, "method StreamGatewayFrames not implemented")
}
func (UnimplementedInternalServiceServer) StreamDeviceFrames(*StreamDeviceFramesRequest, InternalService_StreamDeviceFramesServer) error {
return status.Errorf(codes.Unimplemented, "method StreamDeviceFrames not implemented")
}
func (UnimplementedInternalServiceServer) StreamDeviceEvents(*StreamDeviceEventsRequest, InternalService_StreamDeviceEventsServer) error {
return status.Errorf(codes.Unimplemented, "method StreamDeviceEvents not implemented")
}
func (UnimplementedInternalServiceServer) mustEmbedUnimplementedInternalServiceServer() {}
// UnsafeInternalServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to InternalServiceServer will
// result in compilation errors.
type UnsafeInternalServiceServer interface {
mustEmbedUnimplementedInternalServiceServer()
}
func RegisterInternalServiceServer(s grpc.ServiceRegistrar, srv InternalServiceServer) {
s.RegisterService(&InternalService_ServiceDesc, srv)
}
func _InternalService_Login_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(LoginRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(InternalServiceServer).Login(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.InternalService/Login",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(InternalServiceServer).Login(ctx, req.(*LoginRequest))
}
return interceptor(ctx, in, info, handler)
}
func _InternalService_Profile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(emptypb.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(InternalServiceServer).Profile(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.InternalService/Profile",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(InternalServiceServer).Profile(ctx, req.(*emptypb.Empty))
}
return interceptor(ctx, in, info, handler)
}
func _InternalService_GlobalSearch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GlobalSearchRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(InternalServiceServer).GlobalSearch(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.InternalService/GlobalSearch",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(InternalServiceServer).GlobalSearch(ctx, req.(*GlobalSearchRequest))
}
return interceptor(ctx, in, info, handler)
}
func _InternalService_CreateApiKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateApiKeyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(InternalServiceServer).CreateApiKey(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.InternalService/CreateApiKey",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(InternalServiceServer).CreateApiKey(ctx, req.(*CreateApiKeyRequest))
}
return interceptor(ctx, in, info, handler)
}
func _InternalService_DeleteApiKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteApiKeyRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(InternalServiceServer).DeleteApiKey(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.InternalService/DeleteApiKey",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(InternalServiceServer).DeleteApiKey(ctx, req.(*DeleteApiKeyRequest))
}
return interceptor(ctx, in, info, handler)
}
func _InternalService_ListApiKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListApiKeysRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(InternalServiceServer).ListApiKeys(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.InternalService/ListApiKeys",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(InternalServiceServer).ListApiKeys(ctx, req.(*ListApiKeysRequest))
}
return interceptor(ctx, in, info, handler)
}
func _InternalService_Settings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(emptypb.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(InternalServiceServer).Settings(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.InternalService/Settings",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(InternalServiceServer).Settings(ctx, req.(*emptypb.Empty))
}
return interceptor(ctx, in, info, handler)
}
func _InternalService_OpenIdConnectLogin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(OpenIdConnectLoginRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(InternalServiceServer).OpenIdConnectLogin(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.InternalService/OpenIdConnectLogin",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(InternalServiceServer).OpenIdConnectLogin(ctx, req.(*OpenIdConnectLoginRequest))
}
return interceptor(ctx, in, info, handler)
}
func _InternalService_GetDevicesSummary_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetDevicesSummaryRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(InternalServiceServer).GetDevicesSummary(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.InternalService/GetDevicesSummary",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(InternalServiceServer).GetDevicesSummary(ctx, req.(*GetDevicesSummaryRequest))
}
return interceptor(ctx, in, info, handler)
}
func _InternalService_GetGatewaysSummary_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetGatewaysSummaryRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(InternalServiceServer).GetGatewaysSummary(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.InternalService/GetGatewaysSummary",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(InternalServiceServer).GetGatewaysSummary(ctx, req.(*GetGatewaysSummaryRequest))
}
return interceptor(ctx, in, info, handler)
}
func _InternalService_StreamGatewayFrames_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(StreamGatewayFramesRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(InternalServiceServer).StreamGatewayFrames(m, &internalServiceStreamGatewayFramesServer{stream})
}
type InternalService_StreamGatewayFramesServer interface {
Send(*LogItem) error
grpc.ServerStream
}
type internalServiceStreamGatewayFramesServer struct {
grpc.ServerStream
}
func (x *internalServiceStreamGatewayFramesServer) Send(m *LogItem) error {
return x.ServerStream.SendMsg(m)
}
func _InternalService_StreamDeviceFrames_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(StreamDeviceFramesRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(InternalServiceServer).StreamDeviceFrames(m, &internalServiceStreamDeviceFramesServer{stream})
}
type InternalService_StreamDeviceFramesServer interface {
Send(*LogItem) error
grpc.ServerStream
}
type internalServiceStreamDeviceFramesServer struct {
grpc.ServerStream
}
func (x *internalServiceStreamDeviceFramesServer) Send(m *LogItem) error {
return x.ServerStream.SendMsg(m)
}
func _InternalService_StreamDeviceEvents_Handler(srv interface{}, stream grpc.ServerStream) error {
m := new(StreamDeviceEventsRequest)
if err := stream.RecvMsg(m); err != nil {
return err
}
return srv.(InternalServiceServer).StreamDeviceEvents(m, &internalServiceStreamDeviceEventsServer{stream})
}
type InternalService_StreamDeviceEventsServer interface {
Send(*LogItem) error
grpc.ServerStream
}
type internalServiceStreamDeviceEventsServer struct {
grpc.ServerStream
}
func (x *internalServiceStreamDeviceEventsServer) Send(m *LogItem) error {
return x.ServerStream.SendMsg(m)
}
// InternalService_ServiceDesc is the grpc.ServiceDesc for InternalService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var InternalService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "api.InternalService",
HandlerType: (*InternalServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Login",
Handler: _InternalService_Login_Handler,
},
{
MethodName: "Profile",
Handler: _InternalService_Profile_Handler,
},
{
MethodName: "GlobalSearch",
Handler: _InternalService_GlobalSearch_Handler,
},
{
MethodName: "CreateApiKey",
Handler: _InternalService_CreateApiKey_Handler,
},
{
MethodName: "DeleteApiKey",
Handler: _InternalService_DeleteApiKey_Handler,
},
{
MethodName: "ListApiKeys",
Handler: _InternalService_ListApiKeys_Handler,
},
{
MethodName: "Settings",
Handler: _InternalService_Settings_Handler,
},
{
MethodName: "OpenIdConnectLogin",
Handler: _InternalService_OpenIdConnectLogin_Handler,
},
{
MethodName: "GetDevicesSummary",
Handler: _InternalService_GetDevicesSummary_Handler,
},
{
MethodName: "GetGatewaysSummary",
Handler: _InternalService_GetGatewaysSummary_Handler,
},
},
Streams: []grpc.StreamDesc{
{
StreamName: "StreamGatewayFrames",
Handler: _InternalService_StreamGatewayFrames_Handler,
ServerStreams: true,
},
{
StreamName: "StreamDeviceFrames",
Handler: _InternalService_StreamDeviceFrames_Handler,
ServerStreams: true,
},
{
StreamName: "StreamDeviceEvents",
Handler: _InternalService_StreamDeviceEvents_Handler,
ServerStreams: true,
},
},
Metadata: "api/internal.proto",
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,450 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.18.1
// source: api/multicast_group.proto
package v4
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// MulticastGroupServiceClient is the client API for MulticastGroupService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type MulticastGroupServiceClient interface {
// Create the given multicast group.
Create(ctx context.Context, in *CreateMulticastGroupRequest, opts ...grpc.CallOption) (*CreateMulticastGroupResponse, error)
// Get returns the multicast group for the given ID.
Get(ctx context.Context, in *GetMulticastGroupRequest, opts ...grpc.CallOption) (*GetMulticastGroupResponse, error)
// Update the given multicast group.
Update(ctx context.Context, in *UpdateMulticastGroupRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Delete the multicast-group with the given ID.
Delete(ctx context.Context, in *DeleteMulticastGroupRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// List the available multicast groups.
List(ctx context.Context, in *ListMulticastGroupsRequest, opts ...grpc.CallOption) (*ListMulticastGroupsResponse, error)
// Add a device to the multicast group.
AddDevice(ctx context.Context, in *AddDeviceToMulticastGroupRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Remove a device from the multicast group.
RemoveDevice(ctx context.Context, in *RemoveDeviceFromMulticastGroupRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Add the given item to the multcast group queue.
Enqueue(ctx context.Context, in *EnqueueMulticastGroupQueueItemRequest, opts ...grpc.CallOption) (*EnqueueMulticastGroupQueueItemResponse, error)
// Flush the queue for the given multicast group.
FlushQueue(ctx context.Context, in *FlushMulticastGroupQueueRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// List the items in the multicast group queue.
ListQueue(ctx context.Context, in *ListMulticastGroupQueueRequest, opts ...grpc.CallOption) (*ListMulticastGroupQueueResponse, error)
}
type multicastGroupServiceClient struct {
cc grpc.ClientConnInterface
}
func NewMulticastGroupServiceClient(cc grpc.ClientConnInterface) MulticastGroupServiceClient {
return &multicastGroupServiceClient{cc}
}
func (c *multicastGroupServiceClient) Create(ctx context.Context, in *CreateMulticastGroupRequest, opts ...grpc.CallOption) (*CreateMulticastGroupResponse, error) {
out := new(CreateMulticastGroupResponse)
err := c.cc.Invoke(ctx, "/api.MulticastGroupService/Create", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *multicastGroupServiceClient) Get(ctx context.Context, in *GetMulticastGroupRequest, opts ...grpc.CallOption) (*GetMulticastGroupResponse, error) {
out := new(GetMulticastGroupResponse)
err := c.cc.Invoke(ctx, "/api.MulticastGroupService/Get", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *multicastGroupServiceClient) Update(ctx context.Context, in *UpdateMulticastGroupRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.MulticastGroupService/Update", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *multicastGroupServiceClient) Delete(ctx context.Context, in *DeleteMulticastGroupRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.MulticastGroupService/Delete", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *multicastGroupServiceClient) List(ctx context.Context, in *ListMulticastGroupsRequest, opts ...grpc.CallOption) (*ListMulticastGroupsResponse, error) {
out := new(ListMulticastGroupsResponse)
err := c.cc.Invoke(ctx, "/api.MulticastGroupService/List", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *multicastGroupServiceClient) AddDevice(ctx context.Context, in *AddDeviceToMulticastGroupRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.MulticastGroupService/AddDevice", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *multicastGroupServiceClient) RemoveDevice(ctx context.Context, in *RemoveDeviceFromMulticastGroupRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.MulticastGroupService/RemoveDevice", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *multicastGroupServiceClient) Enqueue(ctx context.Context, in *EnqueueMulticastGroupQueueItemRequest, opts ...grpc.CallOption) (*EnqueueMulticastGroupQueueItemResponse, error) {
out := new(EnqueueMulticastGroupQueueItemResponse)
err := c.cc.Invoke(ctx, "/api.MulticastGroupService/Enqueue", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *multicastGroupServiceClient) FlushQueue(ctx context.Context, in *FlushMulticastGroupQueueRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.MulticastGroupService/FlushQueue", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *multicastGroupServiceClient) ListQueue(ctx context.Context, in *ListMulticastGroupQueueRequest, opts ...grpc.CallOption) (*ListMulticastGroupQueueResponse, error) {
out := new(ListMulticastGroupQueueResponse)
err := c.cc.Invoke(ctx, "/api.MulticastGroupService/ListQueue", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// MulticastGroupServiceServer is the server API for MulticastGroupService service.
// All implementations must embed UnimplementedMulticastGroupServiceServer
// for forward compatibility
type MulticastGroupServiceServer interface {
// Create the given multicast group.
Create(context.Context, *CreateMulticastGroupRequest) (*CreateMulticastGroupResponse, error)
// Get returns the multicast group for the given ID.
Get(context.Context, *GetMulticastGroupRequest) (*GetMulticastGroupResponse, error)
// Update the given multicast group.
Update(context.Context, *UpdateMulticastGroupRequest) (*emptypb.Empty, error)
// Delete the multicast-group with the given ID.
Delete(context.Context, *DeleteMulticastGroupRequest) (*emptypb.Empty, error)
// List the available multicast groups.
List(context.Context, *ListMulticastGroupsRequest) (*ListMulticastGroupsResponse, error)
// Add a device to the multicast group.
AddDevice(context.Context, *AddDeviceToMulticastGroupRequest) (*emptypb.Empty, error)
// Remove a device from the multicast group.
RemoveDevice(context.Context, *RemoveDeviceFromMulticastGroupRequest) (*emptypb.Empty, error)
// Add the given item to the multcast group queue.
Enqueue(context.Context, *EnqueueMulticastGroupQueueItemRequest) (*EnqueueMulticastGroupQueueItemResponse, error)
// Flush the queue for the given multicast group.
FlushQueue(context.Context, *FlushMulticastGroupQueueRequest) (*emptypb.Empty, error)
// List the items in the multicast group queue.
ListQueue(context.Context, *ListMulticastGroupQueueRequest) (*ListMulticastGroupQueueResponse, error)
mustEmbedUnimplementedMulticastGroupServiceServer()
}
// UnimplementedMulticastGroupServiceServer must be embedded to have forward compatible implementations.
type UnimplementedMulticastGroupServiceServer struct {
}
func (UnimplementedMulticastGroupServiceServer) Create(context.Context, *CreateMulticastGroupRequest) (*CreateMulticastGroupResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedMulticastGroupServiceServer) Get(context.Context, *GetMulticastGroupRequest) (*GetMulticastGroupResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedMulticastGroupServiceServer) Update(context.Context, *UpdateMulticastGroupRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
}
func (UnimplementedMulticastGroupServiceServer) Delete(context.Context, *DeleteMulticastGroupRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedMulticastGroupServiceServer) List(context.Context, *ListMulticastGroupsRequest) (*ListMulticastGroupsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedMulticastGroupServiceServer) AddDevice(context.Context, *AddDeviceToMulticastGroupRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method AddDevice not implemented")
}
func (UnimplementedMulticastGroupServiceServer) RemoveDevice(context.Context, *RemoveDeviceFromMulticastGroupRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method RemoveDevice not implemented")
}
func (UnimplementedMulticastGroupServiceServer) Enqueue(context.Context, *EnqueueMulticastGroupQueueItemRequest) (*EnqueueMulticastGroupQueueItemResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Enqueue not implemented")
}
func (UnimplementedMulticastGroupServiceServer) FlushQueue(context.Context, *FlushMulticastGroupQueueRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method FlushQueue not implemented")
}
func (UnimplementedMulticastGroupServiceServer) ListQueue(context.Context, *ListMulticastGroupQueueRequest) (*ListMulticastGroupQueueResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListQueue not implemented")
}
func (UnimplementedMulticastGroupServiceServer) mustEmbedUnimplementedMulticastGroupServiceServer() {}
// UnsafeMulticastGroupServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to MulticastGroupServiceServer will
// result in compilation errors.
type UnsafeMulticastGroupServiceServer interface {
mustEmbedUnimplementedMulticastGroupServiceServer()
}
func RegisterMulticastGroupServiceServer(s grpc.ServiceRegistrar, srv MulticastGroupServiceServer) {
s.RegisterService(&MulticastGroupService_ServiceDesc, srv)
}
func _MulticastGroupService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateMulticastGroupRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MulticastGroupServiceServer).Create(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.MulticastGroupService/Create",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MulticastGroupServiceServer).Create(ctx, req.(*CreateMulticastGroupRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MulticastGroupService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetMulticastGroupRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MulticastGroupServiceServer).Get(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.MulticastGroupService/Get",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MulticastGroupServiceServer).Get(ctx, req.(*GetMulticastGroupRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MulticastGroupService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateMulticastGroupRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MulticastGroupServiceServer).Update(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.MulticastGroupService/Update",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MulticastGroupServiceServer).Update(ctx, req.(*UpdateMulticastGroupRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MulticastGroupService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteMulticastGroupRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MulticastGroupServiceServer).Delete(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.MulticastGroupService/Delete",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MulticastGroupServiceServer).Delete(ctx, req.(*DeleteMulticastGroupRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MulticastGroupService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListMulticastGroupsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MulticastGroupServiceServer).List(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.MulticastGroupService/List",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MulticastGroupServiceServer).List(ctx, req.(*ListMulticastGroupsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MulticastGroupService_AddDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AddDeviceToMulticastGroupRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MulticastGroupServiceServer).AddDevice(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.MulticastGroupService/AddDevice",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MulticastGroupServiceServer).AddDevice(ctx, req.(*AddDeviceToMulticastGroupRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MulticastGroupService_RemoveDevice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(RemoveDeviceFromMulticastGroupRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MulticastGroupServiceServer).RemoveDevice(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.MulticastGroupService/RemoveDevice",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MulticastGroupServiceServer).RemoveDevice(ctx, req.(*RemoveDeviceFromMulticastGroupRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MulticastGroupService_Enqueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(EnqueueMulticastGroupQueueItemRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MulticastGroupServiceServer).Enqueue(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.MulticastGroupService/Enqueue",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MulticastGroupServiceServer).Enqueue(ctx, req.(*EnqueueMulticastGroupQueueItemRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MulticastGroupService_FlushQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(FlushMulticastGroupQueueRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MulticastGroupServiceServer).FlushQueue(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.MulticastGroupService/FlushQueue",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MulticastGroupServiceServer).FlushQueue(ctx, req.(*FlushMulticastGroupQueueRequest))
}
return interceptor(ctx, in, info, handler)
}
func _MulticastGroupService_ListQueue_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListMulticastGroupQueueRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MulticastGroupServiceServer).ListQueue(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.MulticastGroupService/ListQueue",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MulticastGroupServiceServer).ListQueue(ctx, req.(*ListMulticastGroupQueueRequest))
}
return interceptor(ctx, in, info, handler)
}
// MulticastGroupService_ServiceDesc is the grpc.ServiceDesc for MulticastGroupService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var MulticastGroupService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "api.MulticastGroupService",
HandlerType: (*MulticastGroupServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Create",
Handler: _MulticastGroupService_Create_Handler,
},
{
MethodName: "Get",
Handler: _MulticastGroupService_Get_Handler,
},
{
MethodName: "Update",
Handler: _MulticastGroupService_Update_Handler,
},
{
MethodName: "Delete",
Handler: _MulticastGroupService_Delete_Handler,
},
{
MethodName: "List",
Handler: _MulticastGroupService_List_Handler,
},
{
MethodName: "AddDevice",
Handler: _MulticastGroupService_AddDevice_Handler,
},
{
MethodName: "RemoveDevice",
Handler: _MulticastGroupService_RemoveDevice_Handler,
},
{
MethodName: "Enqueue",
Handler: _MulticastGroupService_Enqueue_Handler,
},
{
MethodName: "FlushQueue",
Handler: _MulticastGroupService_FlushQueue_Handler,
},
{
MethodName: "ListQueue",
Handler: _MulticastGroupService_ListQueue_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "api/multicast_group.proto",
}

1824
api/go/api/tenant.pb.go Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,452 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.18.1
// source: api/tenant.proto
package v4
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// TenantServiceClient is the client API for TenantService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type TenantServiceClient interface {
// Create a new tenant.
Create(ctx context.Context, in *CreateTenantRequest, opts ...grpc.CallOption) (*CreateTenantResponse, error)
// Get the tenant for the given ID.
Get(ctx context.Context, in *GetTenantRequest, opts ...grpc.CallOption) (*GetTenantResponse, error)
// Update the given tenant.
Update(ctx context.Context, in *UpdateTenantRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Delete the tenant with the given ID.
Delete(ctx context.Context, in *DeleteTenantRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Get the list of tenants.
List(ctx context.Context, in *ListTenantsRequest, opts ...grpc.CallOption) (*ListTenantsResponse, error)
// Add an user to the tenant.
// Note: the user must already exist.
AddUser(ctx context.Context, in *AddTenantUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Get the the tenant user for the given tenant and user IDs.
GetUser(ctx context.Context, in *GetTenantUserRequest, opts ...grpc.CallOption) (*GetTenantUserResponse, error)
// Update the given tenant user.
UpdateUser(ctx context.Context, in *UpdateTenantUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Delete the given tenant user.
DeleteUser(ctx context.Context, in *DeleteTenantUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Get the list of tenant users.
ListUsers(ctx context.Context, in *ListTenantUsersRequest, opts ...grpc.CallOption) (*ListTenantUsersResponse, error)
}
type tenantServiceClient struct {
cc grpc.ClientConnInterface
}
func NewTenantServiceClient(cc grpc.ClientConnInterface) TenantServiceClient {
return &tenantServiceClient{cc}
}
func (c *tenantServiceClient) Create(ctx context.Context, in *CreateTenantRequest, opts ...grpc.CallOption) (*CreateTenantResponse, error) {
out := new(CreateTenantResponse)
err := c.cc.Invoke(ctx, "/api.TenantService/Create", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *tenantServiceClient) Get(ctx context.Context, in *GetTenantRequest, opts ...grpc.CallOption) (*GetTenantResponse, error) {
out := new(GetTenantResponse)
err := c.cc.Invoke(ctx, "/api.TenantService/Get", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *tenantServiceClient) Update(ctx context.Context, in *UpdateTenantRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.TenantService/Update", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *tenantServiceClient) Delete(ctx context.Context, in *DeleteTenantRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.TenantService/Delete", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *tenantServiceClient) List(ctx context.Context, in *ListTenantsRequest, opts ...grpc.CallOption) (*ListTenantsResponse, error) {
out := new(ListTenantsResponse)
err := c.cc.Invoke(ctx, "/api.TenantService/List", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *tenantServiceClient) AddUser(ctx context.Context, in *AddTenantUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.TenantService/AddUser", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *tenantServiceClient) GetUser(ctx context.Context, in *GetTenantUserRequest, opts ...grpc.CallOption) (*GetTenantUserResponse, error) {
out := new(GetTenantUserResponse)
err := c.cc.Invoke(ctx, "/api.TenantService/GetUser", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *tenantServiceClient) UpdateUser(ctx context.Context, in *UpdateTenantUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.TenantService/UpdateUser", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *tenantServiceClient) DeleteUser(ctx context.Context, in *DeleteTenantUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.TenantService/DeleteUser", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *tenantServiceClient) ListUsers(ctx context.Context, in *ListTenantUsersRequest, opts ...grpc.CallOption) (*ListTenantUsersResponse, error) {
out := new(ListTenantUsersResponse)
err := c.cc.Invoke(ctx, "/api.TenantService/ListUsers", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// TenantServiceServer is the server API for TenantService service.
// All implementations must embed UnimplementedTenantServiceServer
// for forward compatibility
type TenantServiceServer interface {
// Create a new tenant.
Create(context.Context, *CreateTenantRequest) (*CreateTenantResponse, error)
// Get the tenant for the given ID.
Get(context.Context, *GetTenantRequest) (*GetTenantResponse, error)
// Update the given tenant.
Update(context.Context, *UpdateTenantRequest) (*emptypb.Empty, error)
// Delete the tenant with the given ID.
Delete(context.Context, *DeleteTenantRequest) (*emptypb.Empty, error)
// Get the list of tenants.
List(context.Context, *ListTenantsRequest) (*ListTenantsResponse, error)
// Add an user to the tenant.
// Note: the user must already exist.
AddUser(context.Context, *AddTenantUserRequest) (*emptypb.Empty, error)
// Get the the tenant user for the given tenant and user IDs.
GetUser(context.Context, *GetTenantUserRequest) (*GetTenantUserResponse, error)
// Update the given tenant user.
UpdateUser(context.Context, *UpdateTenantUserRequest) (*emptypb.Empty, error)
// Delete the given tenant user.
DeleteUser(context.Context, *DeleteTenantUserRequest) (*emptypb.Empty, error)
// Get the list of tenant users.
ListUsers(context.Context, *ListTenantUsersRequest) (*ListTenantUsersResponse, error)
mustEmbedUnimplementedTenantServiceServer()
}
// UnimplementedTenantServiceServer must be embedded to have forward compatible implementations.
type UnimplementedTenantServiceServer struct {
}
func (UnimplementedTenantServiceServer) Create(context.Context, *CreateTenantRequest) (*CreateTenantResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedTenantServiceServer) Get(context.Context, *GetTenantRequest) (*GetTenantResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedTenantServiceServer) Update(context.Context, *UpdateTenantRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
}
func (UnimplementedTenantServiceServer) Delete(context.Context, *DeleteTenantRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedTenantServiceServer) List(context.Context, *ListTenantsRequest) (*ListTenantsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedTenantServiceServer) AddUser(context.Context, *AddTenantUserRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method AddUser not implemented")
}
func (UnimplementedTenantServiceServer) GetUser(context.Context, *GetTenantUserRequest) (*GetTenantUserResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetUser not implemented")
}
func (UnimplementedTenantServiceServer) UpdateUser(context.Context, *UpdateTenantUserRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateUser not implemented")
}
func (UnimplementedTenantServiceServer) DeleteUser(context.Context, *DeleteTenantUserRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method DeleteUser not implemented")
}
func (UnimplementedTenantServiceServer) ListUsers(context.Context, *ListTenantUsersRequest) (*ListTenantUsersResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListUsers not implemented")
}
func (UnimplementedTenantServiceServer) mustEmbedUnimplementedTenantServiceServer() {}
// UnsafeTenantServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to TenantServiceServer will
// result in compilation errors.
type UnsafeTenantServiceServer interface {
mustEmbedUnimplementedTenantServiceServer()
}
func RegisterTenantServiceServer(s grpc.ServiceRegistrar, srv TenantServiceServer) {
s.RegisterService(&TenantService_ServiceDesc, srv)
}
func _TenantService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateTenantRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TenantServiceServer).Create(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.TenantService/Create",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TenantServiceServer).Create(ctx, req.(*CreateTenantRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TenantService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetTenantRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TenantServiceServer).Get(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.TenantService/Get",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TenantServiceServer).Get(ctx, req.(*GetTenantRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TenantService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateTenantRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TenantServiceServer).Update(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.TenantService/Update",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TenantServiceServer).Update(ctx, req.(*UpdateTenantRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TenantService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteTenantRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TenantServiceServer).Delete(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.TenantService/Delete",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TenantServiceServer).Delete(ctx, req.(*DeleteTenantRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TenantService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListTenantsRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TenantServiceServer).List(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.TenantService/List",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TenantServiceServer).List(ctx, req.(*ListTenantsRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TenantService_AddUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(AddTenantUserRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TenantServiceServer).AddUser(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.TenantService/AddUser",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TenantServiceServer).AddUser(ctx, req.(*AddTenantUserRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TenantService_GetUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetTenantUserRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TenantServiceServer).GetUser(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.TenantService/GetUser",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TenantServiceServer).GetUser(ctx, req.(*GetTenantUserRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TenantService_UpdateUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateTenantUserRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TenantServiceServer).UpdateUser(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.TenantService/UpdateUser",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TenantServiceServer).UpdateUser(ctx, req.(*UpdateTenantUserRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TenantService_DeleteUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteTenantUserRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TenantServiceServer).DeleteUser(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.TenantService/DeleteUser",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TenantServiceServer).DeleteUser(ctx, req.(*DeleteTenantUserRequest))
}
return interceptor(ctx, in, info, handler)
}
func _TenantService_ListUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListTenantUsersRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(TenantServiceServer).ListUsers(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.TenantService/ListUsers",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(TenantServiceServer).ListUsers(ctx, req.(*ListTenantUsersRequest))
}
return interceptor(ctx, in, info, handler)
}
// TenantService_ServiceDesc is the grpc.ServiceDesc for TenantService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var TenantService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "api.TenantService",
HandlerType: (*TenantServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Create",
Handler: _TenantService_Create_Handler,
},
{
MethodName: "Get",
Handler: _TenantService_Get_Handler,
},
{
MethodName: "Update",
Handler: _TenantService_Update_Handler,
},
{
MethodName: "Delete",
Handler: _TenantService_Delete_Handler,
},
{
MethodName: "List",
Handler: _TenantService_List_Handler,
},
{
MethodName: "AddUser",
Handler: _TenantService_AddUser_Handler,
},
{
MethodName: "GetUser",
Handler: _TenantService_GetUser_Handler,
},
{
MethodName: "UpdateUser",
Handler: _TenantService_UpdateUser_Handler,
},
{
MethodName: "DeleteUser",
Handler: _TenantService_DeleteUser_Handler,
},
{
MethodName: "ListUsers",
Handler: _TenantService_ListUsers_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "api/tenant.proto",
}

1117
api/go/api/user.pb.go Normal file

File diff suppressed because it is too large Load Diff

298
api/go/api/user_grpc.pb.go Normal file
View File

@ -0,0 +1,298 @@
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.2.0
// - protoc v3.18.1
// source: api/user.proto
package v4
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
emptypb "google.golang.org/protobuf/types/known/emptypb"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
// UserServiceClient is the client API for UserService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type UserServiceClient interface {
// Create a new user.
Create(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*CreateUserResponse, error)
// Get the user for the given ID.
Get(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error)
// Update the given user.
Update(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Delete the user with the given ID.
Delete(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
// Get the list of users.
List(ctx context.Context, in *ListUsersRequest, opts ...grpc.CallOption) (*ListUsersResponse, error)
// Update the password for the given user.
UpdatePassword(ctx context.Context, in *UpdateUserPasswordRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
}
type userServiceClient struct {
cc grpc.ClientConnInterface
}
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient {
return &userServiceClient{cc}
}
func (c *userServiceClient) Create(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*CreateUserResponse, error) {
out := new(CreateUserResponse)
err := c.cc.Invoke(ctx, "/api.UserService/Create", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userServiceClient) Get(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*GetUserResponse, error) {
out := new(GetUserResponse)
err := c.cc.Invoke(ctx, "/api.UserService/Get", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userServiceClient) Update(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.UserService/Update", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userServiceClient) Delete(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.UserService/Delete", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userServiceClient) List(ctx context.Context, in *ListUsersRequest, opts ...grpc.CallOption) (*ListUsersResponse, error) {
out := new(ListUsersResponse)
err := c.cc.Invoke(ctx, "/api.UserService/List", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *userServiceClient) UpdatePassword(ctx context.Context, in *UpdateUserPasswordRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
out := new(emptypb.Empty)
err := c.cc.Invoke(ctx, "/api.UserService/UpdatePassword", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// UserServiceServer is the server API for UserService service.
// All implementations must embed UnimplementedUserServiceServer
// for forward compatibility
type UserServiceServer interface {
// Create a new user.
Create(context.Context, *CreateUserRequest) (*CreateUserResponse, error)
// Get the user for the given ID.
Get(context.Context, *GetUserRequest) (*GetUserResponse, error)
// Update the given user.
Update(context.Context, *UpdateUserRequest) (*emptypb.Empty, error)
// Delete the user with the given ID.
Delete(context.Context, *DeleteUserRequest) (*emptypb.Empty, error)
// Get the list of users.
List(context.Context, *ListUsersRequest) (*ListUsersResponse, error)
// Update the password for the given user.
UpdatePassword(context.Context, *UpdateUserPasswordRequest) (*emptypb.Empty, error)
mustEmbedUnimplementedUserServiceServer()
}
// UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
type UnimplementedUserServiceServer struct {
}
func (UnimplementedUserServiceServer) Create(context.Context, *CreateUserRequest) (*CreateUserResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Create not implemented")
}
func (UnimplementedUserServiceServer) Get(context.Context, *GetUserRequest) (*GetUserResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Get not implemented")
}
func (UnimplementedUserServiceServer) Update(context.Context, *UpdateUserRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Update not implemented")
}
func (UnimplementedUserServiceServer) Delete(context.Context, *DeleteUserRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method Delete not implemented")
}
func (UnimplementedUserServiceServer) List(context.Context, *ListUsersRequest) (*ListUsersResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method List not implemented")
}
func (UnimplementedUserServiceServer) UpdatePassword(context.Context, *UpdateUserPasswordRequest) (*emptypb.Empty, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdatePassword not implemented")
}
func (UnimplementedUserServiceServer) mustEmbedUnimplementedUserServiceServer() {}
// UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to UserServiceServer will
// result in compilation errors.
type UnsafeUserServiceServer interface {
mustEmbedUnimplementedUserServiceServer()
}
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer) {
s.RegisterService(&UserService_ServiceDesc, srv)
}
func _UserService_Create_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateUserRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserServiceServer).Create(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.UserService/Create",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserServiceServer).Create(ctx, req.(*CreateUserRequest))
}
return interceptor(ctx, in, info, handler)
}
func _UserService_Get_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetUserRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserServiceServer).Get(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.UserService/Get",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserServiceServer).Get(ctx, req.(*GetUserRequest))
}
return interceptor(ctx, in, info, handler)
}
func _UserService_Update_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateUserRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserServiceServer).Update(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.UserService/Update",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserServiceServer).Update(ctx, req.(*UpdateUserRequest))
}
return interceptor(ctx, in, info, handler)
}
func _UserService_Delete_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(DeleteUserRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserServiceServer).Delete(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.UserService/Delete",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserServiceServer).Delete(ctx, req.(*DeleteUserRequest))
}
return interceptor(ctx, in, info, handler)
}
func _UserService_List_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListUsersRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserServiceServer).List(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.UserService/List",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserServiceServer).List(ctx, req.(*ListUsersRequest))
}
return interceptor(ctx, in, info, handler)
}
func _UserService_UpdatePassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateUserPasswordRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(UserServiceServer).UpdatePassword(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/api.UserService/UpdatePassword",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(UserServiceServer).UpdatePassword(ctx, req.(*UpdateUserPasswordRequest))
}
return interceptor(ctx, in, info, handler)
}
// UserService_ServiceDesc is the grpc.ServiceDesc for UserService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var UserService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "api.UserService",
HandlerType: (*UserServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Create",
Handler: _UserService_Create_Handler,
},
{
MethodName: "Get",
Handler: _UserService_Get_Handler,
},
{
MethodName: "Update",
Handler: _UserService_Update_Handler,
},
{
MethodName: "Delete",
Handler: _UserService_Delete_Handler,
},
{
MethodName: "List",
Handler: _UserService_List_Handler,
},
{
MethodName: "UpdatePassword",
Handler: _UserService_UpdatePassword_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "api/user.proto",
}

728
api/go/common/common.pb.go Normal file
View File

@ -0,0 +1,728 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.18.1
// source: common/common.proto
package common
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type Modulation int32
const (
// LoRa
Modulation_LORA Modulation = 0
// FSK
Modulation_FSK Modulation = 1
// LR-FHSS
Modulation_LR_FHSS Modulation = 2
)
// Enum value maps for Modulation.
var (
Modulation_name = map[int32]string{
0: "LORA",
1: "FSK",
2: "LR_FHSS",
}
Modulation_value = map[string]int32{
"LORA": 0,
"FSK": 1,
"LR_FHSS": 2,
}
)
func (x Modulation) Enum() *Modulation {
p := new(Modulation)
*p = x
return p
}
func (x Modulation) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Modulation) Descriptor() protoreflect.EnumDescriptor {
return file_common_common_proto_enumTypes[0].Descriptor()
}
func (Modulation) Type() protoreflect.EnumType {
return &file_common_common_proto_enumTypes[0]
}
func (x Modulation) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Modulation.Descriptor instead.
func (Modulation) EnumDescriptor() ([]byte, []int) {
return file_common_common_proto_rawDescGZIP(), []int{0}
}
type Region int32
const (
// EU868
Region_EU868 Region = 0
// US915
Region_US915 Region = 2
// CN779
Region_CN779 Region = 3
// EU433
Region_EU433 Region = 4
// AU915
Region_AU915 Region = 5
// CN470
Region_CN470 Region = 6
// AS923
Region_AS923 Region = 7
// AS923 with -1.80 MHz frequency offset
Region_AS923_2 Region = 12
// AS923 with -6.60 MHz frequency offset
Region_AS923_3 Region = 13
// (AS923 with -5.90 MHz frequency offset).
Region_AS923_4 Region = 14
// KR920
Region_KR920 Region = 8
// IN865
Region_IN865 Region = 9
// RU864
Region_RU864 Region = 10
// ISM2400 (LoRaWAN 2.4 GHz)
Region_ISM2400 Region = 11
)
// Enum value maps for Region.
var (
Region_name = map[int32]string{
0: "EU868",
2: "US915",
3: "CN779",
4: "EU433",
5: "AU915",
6: "CN470",
7: "AS923",
12: "AS923_2",
13: "AS923_3",
14: "AS923_4",
8: "KR920",
9: "IN865",
10: "RU864",
11: "ISM2400",
}
Region_value = map[string]int32{
"EU868": 0,
"US915": 2,
"CN779": 3,
"EU433": 4,
"AU915": 5,
"CN470": 6,
"AS923": 7,
"AS923_2": 12,
"AS923_3": 13,
"AS923_4": 14,
"KR920": 8,
"IN865": 9,
"RU864": 10,
"ISM2400": 11,
}
)
func (x Region) Enum() *Region {
p := new(Region)
*p = x
return p
}
func (x Region) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (Region) Descriptor() protoreflect.EnumDescriptor {
return file_common_common_proto_enumTypes[1].Descriptor()
}
func (Region) Type() protoreflect.EnumType {
return &file_common_common_proto_enumTypes[1]
}
func (x Region) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use Region.Descriptor instead.
func (Region) EnumDescriptor() ([]byte, []int) {
return file_common_common_proto_rawDescGZIP(), []int{1}
}
type MType int32
const (
// JoinRequest.
MType_JOIN_REQUEST MType = 0
// JoinAccept.
MType_JOIN_ACCEPT MType = 1
// UnconfirmedDataUp.
MType_UNCONFIRMED_DATA_UP MType = 2
// UnconfirmedDataDown.
MType_UNCONFIRMED_DATA_DOWN MType = 3
// ConfirmedDataUp.
MType_CONFIRMED_DATA_UP MType = 4
// ConfirmedDataDown.
MType_CONFIRMED_DATA_DOWN MType = 5
// RejoinRequest.
MType_REJOIN_REQUEST MType = 6
// Proprietary.
MType_PROPRIETARY MType = 7
)
// Enum value maps for MType.
var (
MType_name = map[int32]string{
0: "JOIN_REQUEST",
1: "JOIN_ACCEPT",
2: "UNCONFIRMED_DATA_UP",
3: "UNCONFIRMED_DATA_DOWN",
4: "CONFIRMED_DATA_UP",
5: "CONFIRMED_DATA_DOWN",
6: "REJOIN_REQUEST",
7: "PROPRIETARY",
}
MType_value = map[string]int32{
"JOIN_REQUEST": 0,
"JOIN_ACCEPT": 1,
"UNCONFIRMED_DATA_UP": 2,
"UNCONFIRMED_DATA_DOWN": 3,
"CONFIRMED_DATA_UP": 4,
"CONFIRMED_DATA_DOWN": 5,
"REJOIN_REQUEST": 6,
"PROPRIETARY": 7,
}
)
func (x MType) Enum() *MType {
p := new(MType)
*p = x
return p
}
func (x MType) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (MType) Descriptor() protoreflect.EnumDescriptor {
return file_common_common_proto_enumTypes[2].Descriptor()
}
func (MType) Type() protoreflect.EnumType {
return &file_common_common_proto_enumTypes[2]
}
func (x MType) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use MType.Descriptor instead.
func (MType) EnumDescriptor() ([]byte, []int) {
return file_common_common_proto_rawDescGZIP(), []int{2}
}
type MacVersion int32
const (
MacVersion_LORAWAN_1_0_0 MacVersion = 0
MacVersion_LORAWAN_1_0_1 MacVersion = 1
MacVersion_LORAWAN_1_0_2 MacVersion = 2
MacVersion_LORAWAN_1_0_3 MacVersion = 3
MacVersion_LORAWAN_1_0_4 MacVersion = 4
MacVersion_LORAWAN_1_1_0 MacVersion = 5
)
// Enum value maps for MacVersion.
var (
MacVersion_name = map[int32]string{
0: "LORAWAN_1_0_0",
1: "LORAWAN_1_0_1",
2: "LORAWAN_1_0_2",
3: "LORAWAN_1_0_3",
4: "LORAWAN_1_0_4",
5: "LORAWAN_1_1_0",
}
MacVersion_value = map[string]int32{
"LORAWAN_1_0_0": 0,
"LORAWAN_1_0_1": 1,
"LORAWAN_1_0_2": 2,
"LORAWAN_1_0_3": 3,
"LORAWAN_1_0_4": 4,
"LORAWAN_1_1_0": 5,
}
)
func (x MacVersion) Enum() *MacVersion {
p := new(MacVersion)
*p = x
return p
}
func (x MacVersion) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (MacVersion) Descriptor() protoreflect.EnumDescriptor {
return file_common_common_proto_enumTypes[3].Descriptor()
}
func (MacVersion) Type() protoreflect.EnumType {
return &file_common_common_proto_enumTypes[3]
}
func (x MacVersion) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use MacVersion.Descriptor instead.
func (MacVersion) EnumDescriptor() ([]byte, []int) {
return file_common_common_proto_rawDescGZIP(), []int{3}
}
type RegParamsRevision int32
const (
RegParamsRevision_A RegParamsRevision = 0
RegParamsRevision_B RegParamsRevision = 1
RegParamsRevision_RP002_1_0_0 RegParamsRevision = 2
RegParamsRevision_RP002_1_0_1 RegParamsRevision = 3
RegParamsRevision_RP002_1_0_2 RegParamsRevision = 4
RegParamsRevision_RP002_1_0_3 RegParamsRevision = 5
)
// Enum value maps for RegParamsRevision.
var (
RegParamsRevision_name = map[int32]string{
0: "A",
1: "B",
2: "RP002_1_0_0",
3: "RP002_1_0_1",
4: "RP002_1_0_2",
5: "RP002_1_0_3",
}
RegParamsRevision_value = map[string]int32{
"A": 0,
"B": 1,
"RP002_1_0_0": 2,
"RP002_1_0_1": 3,
"RP002_1_0_2": 4,
"RP002_1_0_3": 5,
}
)
func (x RegParamsRevision) Enum() *RegParamsRevision {
p := new(RegParamsRevision)
*p = x
return p
}
func (x RegParamsRevision) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (RegParamsRevision) Descriptor() protoreflect.EnumDescriptor {
return file_common_common_proto_enumTypes[4].Descriptor()
}
func (RegParamsRevision) Type() protoreflect.EnumType {
return &file_common_common_proto_enumTypes[4]
}
func (x RegParamsRevision) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use RegParamsRevision.Descriptor instead.
func (RegParamsRevision) EnumDescriptor() ([]byte, []int) {
return file_common_common_proto_rawDescGZIP(), []int{4}
}
type LocationSource int32
const (
// Unknown.
LocationSource_UNKNOWN LocationSource = 0
// GPS.
LocationSource_GPS LocationSource = 1
// Manually configured.
LocationSource_CONFIG LocationSource = 2
// Geo resolver (TDOA).
LocationSource_GEO_RESOLVER_TDOA LocationSource = 3
// Geo resolver (RSSI).
LocationSource_GEO_RESOLVER_RSSI LocationSource = 4
// Geo resolver (GNSS).
LocationSource_GEO_RESOLVER_GNSS LocationSource = 5
// Geo resolver (WIFI).
LocationSource_GEO_RESOLVER_WIFI LocationSource = 6
)
// Enum value maps for LocationSource.
var (
LocationSource_name = map[int32]string{
0: "UNKNOWN",
1: "GPS",
2: "CONFIG",
3: "GEO_RESOLVER_TDOA",
4: "GEO_RESOLVER_RSSI",
5: "GEO_RESOLVER_GNSS",
6: "GEO_RESOLVER_WIFI",
}
LocationSource_value = map[string]int32{
"UNKNOWN": 0,
"GPS": 1,
"CONFIG": 2,
"GEO_RESOLVER_TDOA": 3,
"GEO_RESOLVER_RSSI": 4,
"GEO_RESOLVER_GNSS": 5,
"GEO_RESOLVER_WIFI": 6,
}
)
func (x LocationSource) Enum() *LocationSource {
p := new(LocationSource)
*p = x
return p
}
func (x LocationSource) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (LocationSource) Descriptor() protoreflect.EnumDescriptor {
return file_common_common_proto_enumTypes[5].Descriptor()
}
func (LocationSource) Type() protoreflect.EnumType {
return &file_common_common_proto_enumTypes[5]
}
func (x LocationSource) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use LocationSource.Descriptor instead.
func (LocationSource) EnumDescriptor() ([]byte, []int) {
return file_common_common_proto_rawDescGZIP(), []int{5}
}
type Location struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Latitude.
Latitude float64 `protobuf:"fixed64,1,opt,name=latitude,proto3" json:"latitude,omitempty"`
// Longitude.
Longitude float64 `protobuf:"fixed64,2,opt,name=longitude,proto3" json:"longitude,omitempty"`
// Altitude.
Altitude float64 `protobuf:"fixed64,3,opt,name=altitude,proto3" json:"altitude,omitempty"`
// Location source.
Source LocationSource `protobuf:"varint,4,opt,name=source,proto3,enum=common.LocationSource" json:"source,omitempty"`
// Accuracy.
Accuracy float32 `protobuf:"fixed32,5,opt,name=accuracy,proto3" json:"accuracy,omitempty"`
}
func (x *Location) Reset() {
*x = Location{}
if protoimpl.UnsafeEnabled {
mi := &file_common_common_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *Location) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*Location) ProtoMessage() {}
func (x *Location) ProtoReflect() protoreflect.Message {
mi := &file_common_common_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use Location.ProtoReflect.Descriptor instead.
func (*Location) Descriptor() ([]byte, []int) {
return file_common_common_proto_rawDescGZIP(), []int{0}
}
func (x *Location) GetLatitude() float64 {
if x != nil {
return x.Latitude
}
return 0
}
func (x *Location) GetLongitude() float64 {
if x != nil {
return x.Longitude
}
return 0
}
func (x *Location) GetAltitude() float64 {
if x != nil {
return x.Altitude
}
return 0
}
func (x *Location) GetSource() LocationSource {
if x != nil {
return x.Source
}
return LocationSource_UNKNOWN
}
func (x *Location) GetAccuracy() float32 {
if x != nil {
return x.Accuracy
}
return 0
}
type KeyEnvelope struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// KEK label.
KekLabel string `protobuf:"bytes,1,opt,name=kek_label,json=kekLabel,proto3" json:"kek_label,omitempty"`
// AES key (when the kek_label is set, this value must first be decrypted).
AesKey []byte `protobuf:"bytes,2,opt,name=aes_key,json=aesKey,proto3" json:"aes_key,omitempty"`
}
func (x *KeyEnvelope) Reset() {
*x = KeyEnvelope{}
if protoimpl.UnsafeEnabled {
mi := &file_common_common_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *KeyEnvelope) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*KeyEnvelope) ProtoMessage() {}
func (x *KeyEnvelope) ProtoReflect() protoreflect.Message {
mi := &file_common_common_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use KeyEnvelope.ProtoReflect.Descriptor instead.
func (*KeyEnvelope) Descriptor() ([]byte, []int) {
return file_common_common_proto_rawDescGZIP(), []int{1}
}
func (x *KeyEnvelope) GetKekLabel() string {
if x != nil {
return x.KekLabel
}
return ""
}
func (x *KeyEnvelope) GetAesKey() []byte {
if x != nil {
return x.AesKey
}
return nil
}
var File_common_common_proto protoreflect.FileDescriptor
var file_common_common_proto_rawDesc = []byte{
0x0a, 0x13, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x22, 0xac, 0x01,
0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x6c, 0x61,
0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x6c, 0x61,
0x74, 0x69, 0x74, 0x75, 0x64, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x74,
0x75, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x01, 0x52, 0x09, 0x6c, 0x6f, 0x6e, 0x67, 0x69,
0x74, 0x75, 0x64, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x6c, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65,
0x18, 0x03, 0x20, 0x01, 0x28, 0x01, 0x52, 0x08, 0x61, 0x6c, 0x74, 0x69, 0x74, 0x75, 0x64, 0x65,
0x12, 0x2e, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e,
0x32, 0x16, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69,
0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
0x12, 0x1a, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x75, 0x72, 0x61, 0x63, 0x79, 0x18, 0x05, 0x20, 0x01,
0x28, 0x02, 0x52, 0x08, 0x61, 0x63, 0x63, 0x75, 0x72, 0x61, 0x63, 0x79, 0x22, 0x43, 0x0a, 0x0b,
0x4b, 0x65, 0x79, 0x45, 0x6e, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x6b,
0x65, 0x6b, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
0x6b, 0x65, 0x6b, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x17, 0x0a, 0x07, 0x61, 0x65, 0x73, 0x5f,
0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x61, 0x65, 0x73, 0x4b, 0x65,
0x79, 0x2a, 0x2c, 0x0a, 0x0a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12,
0x08, 0x0a, 0x04, 0x4c, 0x4f, 0x52, 0x41, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x46, 0x53, 0x4b,
0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x4c, 0x52, 0x5f, 0x46, 0x48, 0x53, 0x53, 0x10, 0x02, 0x2a,
0xaa, 0x01, 0x0a, 0x06, 0x52, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x55,
0x38, 0x36, 0x38, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x55, 0x53, 0x39, 0x31, 0x35, 0x10, 0x02,
0x12, 0x09, 0x0a, 0x05, 0x43, 0x4e, 0x37, 0x37, 0x39, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x45,
0x55, 0x34, 0x33, 0x33, 0x10, 0x04, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x55, 0x39, 0x31, 0x35, 0x10,
0x05, 0x12, 0x09, 0x0a, 0x05, 0x43, 0x4e, 0x34, 0x37, 0x30, 0x10, 0x06, 0x12, 0x09, 0x0a, 0x05,
0x41, 0x53, 0x39, 0x32, 0x33, 0x10, 0x07, 0x12, 0x0b, 0x0a, 0x07, 0x41, 0x53, 0x39, 0x32, 0x33,
0x5f, 0x32, 0x10, 0x0c, 0x12, 0x0b, 0x0a, 0x07, 0x41, 0x53, 0x39, 0x32, 0x33, 0x5f, 0x33, 0x10,
0x0d, 0x12, 0x0b, 0x0a, 0x07, 0x41, 0x53, 0x39, 0x32, 0x33, 0x5f, 0x34, 0x10, 0x0e, 0x12, 0x09,
0x0a, 0x05, 0x4b, 0x52, 0x39, 0x32, 0x30, 0x10, 0x08, 0x12, 0x09, 0x0a, 0x05, 0x49, 0x4e, 0x38,
0x36, 0x35, 0x10, 0x09, 0x12, 0x09, 0x0a, 0x05, 0x52, 0x55, 0x38, 0x36, 0x34, 0x10, 0x0a, 0x12,
0x0b, 0x0a, 0x07, 0x49, 0x53, 0x4d, 0x32, 0x34, 0x30, 0x30, 0x10, 0x0b, 0x2a, 0xb3, 0x01, 0x0a,
0x05, 0x4d, 0x54, 0x79, 0x70, 0x65, 0x12, 0x10, 0x0a, 0x0c, 0x4a, 0x4f, 0x49, 0x4e, 0x5f, 0x52,
0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10, 0x00, 0x12, 0x0f, 0x0a, 0x0b, 0x4a, 0x4f, 0x49, 0x4e,
0x5f, 0x41, 0x43, 0x43, 0x45, 0x50, 0x54, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x55, 0x4e, 0x43,
0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x55, 0x50,
0x10, 0x02, 0x12, 0x19, 0x0a, 0x15, 0x55, 0x4e, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45,
0x44, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x10, 0x03, 0x12, 0x15, 0x0a,
0x11, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f,
0x55, 0x50, 0x10, 0x04, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45,
0x44, 0x5f, 0x44, 0x41, 0x54, 0x41, 0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x10, 0x05, 0x12, 0x12, 0x0a,
0x0e, 0x52, 0x45, 0x4a, 0x4f, 0x49, 0x4e, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x45, 0x53, 0x54, 0x10,
0x06, 0x12, 0x0f, 0x0a, 0x0b, 0x50, 0x52, 0x4f, 0x50, 0x52, 0x49, 0x45, 0x54, 0x41, 0x52, 0x59,
0x10, 0x07, 0x2a, 0x7e, 0x0a, 0x0a, 0x4d, 0x61, 0x63, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
0x12, 0x11, 0x0a, 0x0d, 0x4c, 0x4f, 0x52, 0x41, 0x57, 0x41, 0x4e, 0x5f, 0x31, 0x5f, 0x30, 0x5f,
0x30, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x4c, 0x4f, 0x52, 0x41, 0x57, 0x41, 0x4e, 0x5f, 0x31,
0x5f, 0x30, 0x5f, 0x31, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x4c, 0x4f, 0x52, 0x41, 0x57, 0x41,
0x4e, 0x5f, 0x31, 0x5f, 0x30, 0x5f, 0x32, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x4c, 0x4f, 0x52,
0x41, 0x57, 0x41, 0x4e, 0x5f, 0x31, 0x5f, 0x30, 0x5f, 0x33, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d,
0x4c, 0x4f, 0x52, 0x41, 0x57, 0x41, 0x4e, 0x5f, 0x31, 0x5f, 0x30, 0x5f, 0x34, 0x10, 0x04, 0x12,
0x11, 0x0a, 0x0d, 0x4c, 0x4f, 0x52, 0x41, 0x57, 0x41, 0x4e, 0x5f, 0x31, 0x5f, 0x31, 0x5f, 0x30,
0x10, 0x05, 0x2a, 0x65, 0x0a, 0x11, 0x52, 0x65, 0x67, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52,
0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x05, 0x0a, 0x01, 0x41, 0x10, 0x00, 0x12, 0x05,
0x0a, 0x01, 0x42, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x50, 0x30, 0x30, 0x32, 0x5f, 0x31,
0x5f, 0x30, 0x5f, 0x30, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x50, 0x30, 0x30, 0x32, 0x5f,
0x31, 0x5f, 0x30, 0x5f, 0x31, 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x50, 0x30, 0x30, 0x32,
0x5f, 0x31, 0x5f, 0x30, 0x5f, 0x32, 0x10, 0x04, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x50, 0x30, 0x30,
0x32, 0x5f, 0x31, 0x5f, 0x30, 0x5f, 0x33, 0x10, 0x05, 0x2a, 0x8e, 0x01, 0x0a, 0x0e, 0x4c, 0x6f,
0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x0b, 0x0a, 0x07,
0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x47, 0x50, 0x53,
0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x47, 0x10, 0x02, 0x12, 0x15,
0x0a, 0x11, 0x47, 0x45, 0x4f, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x4c, 0x56, 0x45, 0x52, 0x5f, 0x54,
0x44, 0x4f, 0x41, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x47, 0x45, 0x4f, 0x5f, 0x52, 0x45, 0x53,
0x4f, 0x4c, 0x56, 0x45, 0x52, 0x5f, 0x52, 0x53, 0x53, 0x49, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11,
0x47, 0x45, 0x4f, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x4c, 0x56, 0x45, 0x52, 0x5f, 0x47, 0x4e, 0x53,
0x53, 0x10, 0x05, 0x12, 0x15, 0x0a, 0x11, 0x47, 0x45, 0x4f, 0x5f, 0x52, 0x45, 0x53, 0x4f, 0x4c,
0x56, 0x45, 0x52, 0x5f, 0x57, 0x49, 0x46, 0x49, 0x10, 0x06, 0x42, 0x55, 0x0a, 0x11, 0x69, 0x6f,
0x2e, 0x63, 0x68, 0x69, 0x72, 0x70, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x61, 0x70, 0x69, 0x42,
0x0b, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31,
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x68, 0x69, 0x72, 0x70,
0x73, 0x74, 0x61, 0x63, 0x6b, 0x2f, 0x63, 0x68, 0x69, 0x72, 0x70, 0x73, 0x74, 0x61, 0x63, 0x6b,
0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x34, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_common_common_proto_rawDescOnce sync.Once
file_common_common_proto_rawDescData = file_common_common_proto_rawDesc
)
func file_common_common_proto_rawDescGZIP() []byte {
file_common_common_proto_rawDescOnce.Do(func() {
file_common_common_proto_rawDescData = protoimpl.X.CompressGZIP(file_common_common_proto_rawDescData)
})
return file_common_common_proto_rawDescData
}
var file_common_common_proto_enumTypes = make([]protoimpl.EnumInfo, 6)
var file_common_common_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_common_common_proto_goTypes = []interface{}{
(Modulation)(0), // 0: common.Modulation
(Region)(0), // 1: common.Region
(MType)(0), // 2: common.MType
(MacVersion)(0), // 3: common.MacVersion
(RegParamsRevision)(0), // 4: common.RegParamsRevision
(LocationSource)(0), // 5: common.LocationSource
(*Location)(nil), // 6: common.Location
(*KeyEnvelope)(nil), // 7: common.KeyEnvelope
}
var file_common_common_proto_depIdxs = []int32{
5, // 0: common.Location.source:type_name -> common.LocationSource
1, // [1:1] is the sub-list for method output_type
1, // [1:1] is the sub-list for method input_type
1, // [1:1] is the sub-list for extension type_name
1, // [1:1] is the sub-list for extension extendee
0, // [0:1] is the sub-list for field type_name
}
func init() { file_common_common_proto_init() }
func file_common_common_proto_init() {
if File_common_common_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_common_common_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Location); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_common_common_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*KeyEnvelope); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_common_common_proto_rawDesc,
NumEnums: 6,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_common_common_proto_goTypes,
DependencyIndexes: file_common_common_proto_depIdxs,
EnumInfos: file_common_common_proto_enumTypes,
MessageInfos: file_common_common_proto_msgTypes,
}.Build()
File_common_common_proto = out.File
file_common_common_proto_rawDesc = nil
file_common_common_proto_goTypes = nil
file_common_common_proto_depIdxs = nil
}

9
api/go/go.mod Normal file
View File

@ -0,0 +1,9 @@
module github.com/chirpstack/api/go/v4
go 1.16
require (
google.golang.org/grpc v1.45.0 // indirect
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.2.0 // indirect
google.golang.org/protobuf v1.28.0 // indirect
)

122
api/go/go.sum Normal file
View File

@ -0,0 +1,122 @@
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw=
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20200822124328-c89045814202 h1:VvcQYSHwXgi7W+TpUR6A9g6Up98WAHf3f/ulnJ62IyA=
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd h1:xhmwyvizuTgC2qz7ZlMluP20uW+C3Rm0FD/WLDX8884=
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 h1:+kGHl1aib/qcwaRi1CbqBZ1rk19r85MNUf8HaBghugY=
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
google.golang.org/grpc v1.45.0 h1:NEpgUqV3Z+ZjkqMsxMg11IaDrXY4RY6CQukSGK0uI1M=
google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ=
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.2.0 h1:TLkBREm4nIsEcexnCjgQd5GQWaHcqMzwQV0TX9pq8S0=
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.2.0/go.mod h1:DNq5QpG7LJqD2AamLZ7zvKE0DEpVl2BSEVjFycAAjRY=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw=
google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=

3709
api/go/gw/gw.pb.go Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

382
api/go/meta/meta.pb.go Normal file
View File

@ -0,0 +1,382 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.28.0
// protoc v3.18.1
// source: meta/meta.proto
package meta
import (
gw "github.com/chirpstack/chirpstack-api/go/v4/gw"
common "github.com/chirpstack/chirpstack/api/go/v4/common"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type UplinkMeta struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Device EUI (EUI64).
DevEui string `protobuf:"bytes,1,opt,name=dev_eui,json=devEui,proto3" json:"dev_eui,omitempty"`
// TX meta-data.
TxInfo *gw.UplinkTXInfo `protobuf:"bytes,2,opt,name=tx_info,json=txInfo,proto3" json:"tx_info,omitempty"`
// RX meta-data.
RxInfo []*gw.UplinkRXInfo `protobuf:"bytes,3,rep,name=rx_info,json=rxInfo,proto3" json:"rx_info,omitempty"`
// PHYPayload byte count.
PhyPayloadByteCount uint32 `protobuf:"varint,4,opt,name=phy_payload_byte_count,json=phyPayloadByteCount,proto3" json:"phy_payload_byte_count,omitempty"`
// MAC-Command byte count.
MacCommandByteCount uint32 `protobuf:"varint,5,opt,name=mac_command_byte_count,json=macCommandByteCount,proto3" json:"mac_command_byte_count,omitempty"`
// Application payload byte count.
ApplicationPayloadByteCount uint32 `protobuf:"varint,6,opt,name=application_payload_byte_count,json=applicationPayloadByteCount,proto3" json:"application_payload_byte_count,omitempty"`
// Message type.
MessageType common.MType `protobuf:"varint,7,opt,name=message_type,json=messageType,proto3,enum=common.MType" json:"message_type,omitempty"`
}
func (x *UplinkMeta) Reset() {
*x = UplinkMeta{}
if protoimpl.UnsafeEnabled {
mi := &file_meta_meta_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *UplinkMeta) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*UplinkMeta) ProtoMessage() {}
func (x *UplinkMeta) ProtoReflect() protoreflect.Message {
mi := &file_meta_meta_proto_msgTypes[0]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use UplinkMeta.ProtoReflect.Descriptor instead.
func (*UplinkMeta) Descriptor() ([]byte, []int) {
return file_meta_meta_proto_rawDescGZIP(), []int{0}
}
func (x *UplinkMeta) GetDevEui() string {
if x != nil {
return x.DevEui
}
return ""
}
func (x *UplinkMeta) GetTxInfo() *gw.UplinkTXInfo {
if x != nil {
return x.TxInfo
}
return nil
}
func (x *UplinkMeta) GetRxInfo() []*gw.UplinkRXInfo {
if x != nil {
return x.RxInfo
}
return nil
}
func (x *UplinkMeta) GetPhyPayloadByteCount() uint32 {
if x != nil {
return x.PhyPayloadByteCount
}
return 0
}
func (x *UplinkMeta) GetMacCommandByteCount() uint32 {
if x != nil {
return x.MacCommandByteCount
}
return 0
}
func (x *UplinkMeta) GetApplicationPayloadByteCount() uint32 {
if x != nil {
return x.ApplicationPayloadByteCount
}
return 0
}
func (x *UplinkMeta) GetMessageType() common.MType {
if x != nil {
return x.MessageType
}
return common.MType(0)
}
type DownlinkMeta struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
// Device EUI (EUI64).
DevEui string `protobuf:"bytes,1,opt,name=dev_eui,json=devEui,proto3" json:"dev_eui,omitempty"`
// Multicast Group ID (UUID).
MulticastGroupId string `protobuf:"bytes,2,opt,name=multicast_group_id,json=multicastGroupId,proto3" json:"multicast_group_id,omitempty"`
// TX meta-data.
TxInfo *gw.DownlinkTXInfo `protobuf:"bytes,3,opt,name=tx_info,json=txInfo,proto3" json:"tx_info,omitempty"`
// PHYPayload byte count.
PhyPayloadByteCount uint32 `protobuf:"varint,4,opt,name=phy_payload_byte_count,json=phyPayloadByteCount,proto3" json:"phy_payload_byte_count,omitempty"`
// MAC-Command byte count.
MacCommandByteCount uint32 `protobuf:"varint,5,opt,name=mac_command_byte_count,json=macCommandByteCount,proto3" json:"mac_command_byte_count,omitempty"`
// Application payload byte count.
ApplicationPayloadByteCount uint32 `protobuf:"varint,6,opt,name=application_payload_byte_count,json=applicationPayloadByteCount,proto3" json:"application_payload_byte_count,omitempty"`
// Message type.
MessageType common.MType `protobuf:"varint,7,opt,name=message_type,json=messageType,proto3,enum=common.MType" json:"message_type,omitempty"`
// Gateway ID (EUI64).
GatewayId string `protobuf:"bytes,8,opt,name=gateway_id,json=gatewayId,proto3" json:"gateway_id,omitempty"`
}
func (x *DownlinkMeta) Reset() {
*x = DownlinkMeta{}
if protoimpl.UnsafeEnabled {
mi := &file_meta_meta_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *DownlinkMeta) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*DownlinkMeta) ProtoMessage() {}
func (x *DownlinkMeta) ProtoReflect() protoreflect.Message {
mi := &file_meta_meta_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use DownlinkMeta.ProtoReflect.Descriptor instead.
func (*DownlinkMeta) Descriptor() ([]byte, []int) {
return file_meta_meta_proto_rawDescGZIP(), []int{1}
}
func (x *DownlinkMeta) GetDevEui() string {
if x != nil {
return x.DevEui
}
return ""
}
func (x *DownlinkMeta) GetMulticastGroupId() string {
if x != nil {
return x.MulticastGroupId
}
return ""
}
func (x *DownlinkMeta) GetTxInfo() *gw.DownlinkTXInfo {
if x != nil {
return x.TxInfo
}
return nil
}
func (x *DownlinkMeta) GetPhyPayloadByteCount() uint32 {
if x != nil {
return x.PhyPayloadByteCount
}
return 0
}
func (x *DownlinkMeta) GetMacCommandByteCount() uint32 {
if x != nil {
return x.MacCommandByteCount
}
return 0
}
func (x *DownlinkMeta) GetApplicationPayloadByteCount() uint32 {
if x != nil {
return x.ApplicationPayloadByteCount
}
return 0
}
func (x *DownlinkMeta) GetMessageType() common.MType {
if x != nil {
return x.MessageType
}
return common.MType(0)
}
func (x *DownlinkMeta) GetGatewayId() string {
if x != nil {
return x.GatewayId
}
return ""
}
var File_meta_meta_proto protoreflect.FileDescriptor
var file_meta_meta_proto_rawDesc = []byte{
0x0a, 0x0f, 0x6d, 0x65, 0x74, 0x61, 0x2f, 0x6d, 0x65, 0x74, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74,
0x6f, 0x12, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x1a, 0x13, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f,
0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0b, 0x67, 0x77,
0x2f, 0x67, 0x77, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdc, 0x02, 0x0a, 0x0a, 0x55, 0x70,
0x6c, 0x69, 0x6e, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x65, 0x76, 0x5f,
0x65, 0x75, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x76, 0x45, 0x75,
0x69, 0x12, 0x29, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01,
0x28, 0x0b, 0x32, 0x10, 0x2e, 0x67, 0x77, 0x2e, 0x55, 0x70, 0x6c, 0x69, 0x6e, 0x6b, 0x54, 0x58,
0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x74, 0x78, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x29, 0x0a, 0x07,
0x72, 0x78, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e,
0x67, 0x77, 0x2e, 0x55, 0x70, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x58, 0x49, 0x6e, 0x66, 0x6f, 0x52,
0x06, 0x72, 0x78, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x33, 0x0a, 0x16, 0x70, 0x68, 0x79, 0x5f, 0x70,
0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e,
0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x13, 0x70, 0x68, 0x79, 0x50, 0x61, 0x79, 0x6c,
0x6f, 0x61, 0x64, 0x42, 0x79, 0x74, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x33, 0x0a, 0x16,
0x6d, 0x61, 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65,
0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x13, 0x6d, 0x61,
0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x42, 0x79, 0x74, 0x65, 0x43, 0x6f, 0x75, 0x6e,
0x74, 0x12, 0x43, 0x0a, 0x1e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x1b, 0x61, 0x70, 0x70, 0x6c, 0x69,
0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x79, 0x74,
0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x63,
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0b, 0x6d, 0x65, 0x73,
0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x22, 0x82, 0x03, 0x0a, 0x0c, 0x44, 0x6f, 0x77,
0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x65, 0x76,
0x5f, 0x65, 0x75, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x76, 0x45,
0x75, 0x69, 0x12, 0x2c, 0x0a, 0x12, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x5f,
0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10,
0x6d, 0x75, 0x6c, 0x74, 0x69, 0x63, 0x61, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64,
0x12, 0x2b, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28,
0x0b, 0x32, 0x12, 0x2e, 0x67, 0x77, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x54,
0x58, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x74, 0x78, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x33, 0x0a,
0x16, 0x70, 0x68, 0x79, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62, 0x79, 0x74,
0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x13, 0x70,
0x68, 0x79, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x79, 0x74, 0x65, 0x43, 0x6f, 0x75,
0x6e, 0x74, 0x12, 0x33, 0x0a, 0x16, 0x6d, 0x61, 0x63, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e,
0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01,
0x28, 0x0d, 0x52, 0x13, 0x6d, 0x61, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x42, 0x79,
0x74, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x43, 0x0a, 0x1e, 0x61, 0x70, 0x70, 0x6c, 0x69,
0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x62,
0x79, 0x74, 0x65, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52,
0x1b, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x61, 0x79, 0x6c,
0x6f, 0x61, 0x64, 0x42, 0x79, 0x74, 0x65, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x0c,
0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01,
0x28, 0x0e, 0x32, 0x0d, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x54, 0x79, 0x70,
0x65, 0x52, 0x0b, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1d,
0x0a, 0x0a, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01,
0x28, 0x09, 0x52, 0x09, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x49, 0x64, 0x42, 0x56, 0x0a,
0x16, 0x69, 0x6f, 0x2e, 0x63, 0x68, 0x69, 0x72, 0x70, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x61,
0x70, 0x69, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x42, 0x09, 0x4d, 0x65, 0x74, 0x61, 0x50, 0x72, 0x6f,
0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
0x2f, 0x63, 0x68, 0x69, 0x72, 0x70, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2f, 0x63, 0x68, 0x69, 0x72,
0x70, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2d, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x34,
0x2f, 0x6d, 0x65, 0x74, 0x61, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_meta_meta_proto_rawDescOnce sync.Once
file_meta_meta_proto_rawDescData = file_meta_meta_proto_rawDesc
)
func file_meta_meta_proto_rawDescGZIP() []byte {
file_meta_meta_proto_rawDescOnce.Do(func() {
file_meta_meta_proto_rawDescData = protoimpl.X.CompressGZIP(file_meta_meta_proto_rawDescData)
})
return file_meta_meta_proto_rawDescData
}
var file_meta_meta_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_meta_meta_proto_goTypes = []interface{}{
(*UplinkMeta)(nil), // 0: meta.UplinkMeta
(*DownlinkMeta)(nil), // 1: meta.DownlinkMeta
(*gw.UplinkTXInfo)(nil), // 2: gw.UplinkTXInfo
(*gw.UplinkRXInfo)(nil), // 3: gw.UplinkRXInfo
(common.MType)(0), // 4: common.MType
(*gw.DownlinkTXInfo)(nil), // 5: gw.DownlinkTXInfo
}
var file_meta_meta_proto_depIdxs = []int32{
2, // 0: meta.UplinkMeta.tx_info:type_name -> gw.UplinkTXInfo
3, // 1: meta.UplinkMeta.rx_info:type_name -> gw.UplinkRXInfo
4, // 2: meta.UplinkMeta.message_type:type_name -> common.MType
5, // 3: meta.DownlinkMeta.tx_info:type_name -> gw.DownlinkTXInfo
4, // 4: meta.DownlinkMeta.message_type:type_name -> common.MType
5, // [5:5] is the sub-list for method output_type
5, // [5:5] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name
5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
}
func init() { file_meta_meta_proto_init() }
func file_meta_meta_proto_init() {
if File_meta_meta_proto != nil {
return
}
if !protoimpl.UnsafeEnabled {
file_meta_meta_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*UplinkMeta); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_meta_meta_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*DownlinkMeta); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_meta_meta_proto_rawDesc,
NumEnums: 0,
NumMessages: 2,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_meta_meta_proto_goTypes,
DependencyIndexes: file_meta_meta_proto_depIdxs,
MessageInfos: file_meta_meta_proto_msgTypes,
}.Build()
File_meta_meta_proto = out.File
file_meta_meta_proto_rawDesc = nil
file_meta_meta_proto_goTypes = nil
file_meta_meta_proto_depIdxs = nil
}