mirror of
https://github.com/chirpstack/chirpstack.git
synced 2025-04-15 15:49:15 +00:00
Compare commits
130 Commits
queue_expi
...
v4.12.0-te
Author | SHA1 | Date | |
---|---|---|---|
e30a2e0e77 | |||
b2adac5a49 | |||
ca7b0a2e61 | |||
849d27f148 | |||
5ce35eef5e | |||
236b468aa4 | |||
c130be9dd0 | |||
4b77fa441d | |||
c137136d4d | |||
27689d172f | |||
730ed09840 | |||
105ea2806a | |||
8f34ea2ca5 | |||
447df411df | |||
e228125031 | |||
7c134a549d | |||
f97af991be | |||
293cfe2664 | |||
5bbd71ab3a | |||
f02256245c | |||
a0f07b5303 | |||
60547ff973 | |||
351406c363 | |||
8b59136942 | |||
b5e562aa64 | |||
5a7694a3a4 | |||
98ba2f3198 | |||
bbdf2dd781 | |||
71cc1aca74 | |||
27f6d2cf03 | |||
b8ab0182de | |||
b1e6c97942 | |||
e75b62f335 | |||
cac682c245 | |||
b61a684739 | |||
439a6b0542 | |||
f9efed2317 | |||
4984e8556d | |||
43753958ef | |||
1d76fabdb0 | |||
de7e0c619d | |||
38386b23f2 | |||
a3e27d8b65 | |||
9b735d6521 | |||
d000cd3385 | |||
ac52cce7ee | |||
bbce25efbf | |||
4e7ab31714 | |||
3c3c1f125d | |||
909eaed1ba | |||
b8c02b943c | |||
82ed66cf09 | |||
f3d3262006 | |||
ffe01d387c | |||
d1f4f42a79 | |||
bf21297a42 | |||
bcb8aaad4f | |||
f43c9154bc | |||
3e7f09db62 | |||
01246dd124 | |||
2fc762d932 | |||
24333f8b5d | |||
99239a82d4 | |||
317c1cb14d | |||
2e0d034a6b | |||
fb59f541b1 | |||
f6374f00f8 | |||
32a9aadbae | |||
99613014ad | |||
8cb2d4f383 | |||
96b544974e | |||
a71113db42 | |||
2e738e1f33 | |||
0487d6a7f0 | |||
6864f6ef2b | |||
9c25a5d48b | |||
de492a7e30 | |||
2028ccab9a | |||
724dfb138c | |||
b6763cc951 | |||
df3aafd1c4 | |||
64b2e82244 | |||
70e4afae54 | |||
922a83597f | |||
e50a1e3655 | |||
e5397ca43a | |||
a70afa223b | |||
7936955a19 | |||
092c119cdc | |||
661c4ed417 | |||
8aff4490f9 | |||
30b1e0301a | |||
d3692144fa | |||
91b9077ba8 | |||
532392abe1 | |||
41b3c6a4e4 | |||
4b6391f57e | |||
ed11c88307 | |||
0ed78a1d0a | |||
fdf168bd09 | |||
dddb471878 | |||
f265a815a6 | |||
9bf78eebfd | |||
3d470c6a14 | |||
2b5b54a7b7 | |||
905db6e9b7 | |||
1245386f38 | |||
49e7c1ccb9 | |||
eafda74526 | |||
3378a81a37 | |||
04e676cad6 | |||
e3b83066b7 | |||
dcf6ea14bd | |||
b1766e506d | |||
87c918bc35 | |||
d5929e0523 | |||
d69f18edad | |||
6621a23652 | |||
20ec2877f2 | |||
10cbdb1e00 | |||
d24b8241c5 | |||
eecdeeb092 | |||
20e9e087ed | |||
c9bdea87f1 | |||
11fdd33139 | |||
07364fb05d | |||
3b42b9ffdb | |||
af139ebabd | |||
bf74c9d91d | |||
4d7a4b22e1 |
13
.github/workflows/main.yml
vendored
13
.github/workflows/main.yml
vendored
@ -28,7 +28,7 @@ jobs:
|
||||
name: Install Nix
|
||||
uses: cachix/install-nix-action@v27
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-24.05
|
||||
nix_path: nixpkgs=channel:nixos-24.11
|
||||
-
|
||||
name: Cargo cache
|
||||
uses: actions/cache@v4
|
||||
@ -54,6 +54,13 @@ jobs:
|
||||
needs: tests
|
||||
runs-on: ubuntu-latest
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
strategy:
|
||||
matrix:
|
||||
database:
|
||||
- postgres
|
||||
- sqlite
|
||||
env:
|
||||
DATABASE: ${{ matrix.database }}
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
@ -62,7 +69,7 @@ jobs:
|
||||
name: Install Nix
|
||||
uses: cachix/install-nix-action@v27
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-24.05
|
||||
nix_path: nixpkgs=channel:nixos-24.11
|
||||
-
|
||||
name: Cargo cache
|
||||
uses: actions/cache@v4
|
||||
@ -101,7 +108,7 @@ jobs:
|
||||
uses: docker/metadata-action@v3
|
||||
with:
|
||||
images: |
|
||||
chirpstack/${{ github.event.repository.name }}
|
||||
chirpstack/${{ github.event.repository.name }}${{ matrix.database != 'postgres' && format('-{0}', matrix.database) || '' }}
|
||||
tags: |
|
||||
type=semver,pattern={{version}}
|
||||
type=semver,pattern={{major}}
|
||||
|
2352
Cargo.lock
generated
2352
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
# Copy binary stage
|
||||
FROM --platform=$BUILDPLATFORM alpine:3.18.0 as binary
|
||||
FROM --platform=$BUILDPLATFORM alpine:3.21.0 as binary
|
||||
|
||||
ARG TARGETPLATFORM
|
||||
|
||||
@ -20,11 +20,11 @@ RUN case "$TARGETPLATFORM" in \
|
||||
esac;
|
||||
|
||||
# Final stage
|
||||
FROM alpine:3.18.0
|
||||
FROM alpine:3.21.0
|
||||
|
||||
RUN apk --no-cache add \
|
||||
ca-certificates
|
||||
|
||||
COPY --from=binary /usr/bin/chirpstack /usr/bin/chirpstack
|
||||
USER nobody:nogroup
|
||||
ENTRYPOINT ["/usr/bin/chirpstack"]
|
||||
ENTRYPOINT ["/usr/bin/chirpstack"]
|
||||
|
11
Makefile
11
Makefile
@ -6,11 +6,10 @@ dist:
|
||||
cd chirpstack && make dist
|
||||
|
||||
# Install dev dependencies
|
||||
# TODO: test latest cargo-deb and move it to shell.nix.
|
||||
dev-dependencies:
|
||||
cargo install cross --version 0.2.5
|
||||
cargo install diesel_cli --version 2.2.1 --no-default-features --features postgres,sqlite
|
||||
cargo install cargo-deb --version 1.43.1
|
||||
cargo install cargo-generate-rpm --version 0.12.1
|
||||
cargo install cargo-deb --version 1.43.1 --locked
|
||||
cargo install cargo-generate-rpm --version 0.12.1 --locked
|
||||
|
||||
# Set the versions
|
||||
version:
|
||||
@ -53,10 +52,6 @@ devshell:
|
||||
docker-devshell:
|
||||
docker compose run --rm --service-ports --name chirpstack chirpstack
|
||||
|
||||
# Enters the devshell for ChirpStack UI development.
|
||||
docker-devshell-ui:
|
||||
docker compose run --rm --service-ports --name chirpstack-ui chirpstack-ui bash
|
||||
|
||||
# Runs the tests
|
||||
test:
|
||||
cd api && make rust
|
||||
|
16
api/Dockerfile-c
vendored
Normal file
16
api/Dockerfile-c
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
FROM alpine:latest
|
||||
|
||||
ENV PROJECT_PATH=/chirpstack/api
|
||||
RUN apk add --no-cache make git bash protobuf protobuf-dev pkgconfig autoconf automake libtool gcc g++
|
||||
|
||||
# Install protobuf implementation for C
|
||||
RUN git clone --depth=1 https://github.com/protobuf-c/protobuf-c.git /protobuf-c
|
||||
RUN cd /protobuf-c && ./autogen.sh && ./configure && make && make install
|
||||
|
||||
|
||||
# Proto dependencies stuff
|
||||
RUN git clone --depth=1 https://github.com/protocolbuffers/protobuf.git /protobuf
|
||||
RUN git clone --depth=1 https://github.com/googleapis/googleapis.git /googleapis
|
||||
|
||||
RUN mkdir -p PROJECT_PATH
|
||||
WORKDIR $PROJECT_PATH
|
9
api/Makefile
vendored
9
api/Makefile
vendored
@ -1,6 +1,6 @@
|
||||
.PHONY: rust grpc-web go js python md java kotlin csharp php
|
||||
.PHONY: rust grpc-web go js python md java kotlin csharp php c
|
||||
|
||||
all: rust grpc-web go js python md java kotlin csharp php
|
||||
all: rust grpc-web go js python md java kotlin csharp php c
|
||||
|
||||
rust:
|
||||
cd rust && make
|
||||
@ -30,4 +30,7 @@ csharp:
|
||||
docker compose run --rm chirpstack-csharp
|
||||
|
||||
php:
|
||||
docker compose run --rm chirpstack-api-php
|
||||
docker compose run --rm chirpstack-api-php
|
||||
|
||||
c:
|
||||
docker compose run --rm chirpstack-api-c
|
||||
|
2
api/c/.gitignore
vendored
Normal file
2
api/c/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
/src/
|
||||
/proto/
|
34
api/c/Makefile
vendored
Normal file
34
api/c/Makefile
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
.PHONY: all pre-build
|
||||
|
||||
PROTOC := protoc-c
|
||||
PROTOC_ARGS := -I=proto -I=proto/chirpstack-api --c_out=./src
|
||||
|
||||
GOOGLE_PROTOBUF_REQUIREMENTS =
|
||||
GOOGLE_PROTOBUF_REQUIREMENTS += timestamp.proto
|
||||
GOOGLE_PROTOBUF_REQUIREMENTS += duration.proto
|
||||
GOOGLE_PROTOBUF_REQUIREMENTS += struct.proto
|
||||
GOOGLE_PROTOBUF_REQUIREMENTS += empty.proto
|
||||
GOOGLE_PROTOBUF_REQUIREMENTS += descriptor.proto
|
||||
GOOGLE_PROTOBUF_OUTPUT = $(patsubst %.proto, src/google/protobuf/%.pb-c.h, $(GOOGLE_PROTOBUF_REQUIREMENTS))
|
||||
|
||||
all: pre-build $(GOOGLE_PROTOBUF_OUTPUT) build
|
||||
|
||||
pre-build:
|
||||
rm -rf proto src
|
||||
mkdir -p proto/chirpstack-api
|
||||
mkdir -p proto/google/protobuf
|
||||
cp -r ../proto/* proto/chirpstack-api/
|
||||
mv proto/chirpstack-api/google/api proto/google/api
|
||||
mkdir -p src
|
||||
sed -i \
|
||||
-r 's/(\s+bytes std)(in|out|err)(\s+=.*)/\1_\2\3/' \
|
||||
proto/chirpstack-api/gw/gw.proto
|
||||
|
||||
src/google/protobuf/%.pb-c.h: /protobuf/src/google/protobuf/%.proto
|
||||
cp $< proto/google/protobuf/
|
||||
|
||||
build:
|
||||
find proto \
|
||||
-name '*.proto' \
|
||||
-type f \
|
||||
-exec $(PROTOC) $(PROTOC_ARGS) {} \;
|
7
api/docker-compose.yml
vendored
7
api/docker-compose.yml
vendored
@ -49,3 +49,10 @@ services:
|
||||
command: bash -c "cd php && make all"
|
||||
volumes:
|
||||
- ./:/chirpstack/api
|
||||
chirpstack-api-c:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile-c
|
||||
command: bash -c "cd c && make all"
|
||||
volumes:
|
||||
- ./:/chirpstack/api
|
||||
|
3324
api/go/api/application.pb.go
vendored
3324
api/go/api/application.pb.go
vendored
File diff suppressed because it is too large
Load Diff
80
api/go/api/application_grpc.pb.go
vendored
80
api/go/api/application_grpc.pb.go
vendored
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc v4.24.4
|
||||
// - protoc v5.28.3
|
||||
// source: api/application.proto
|
||||
|
||||
package api
|
||||
@ -67,6 +67,8 @@ const (
|
||||
ApplicationService_UpdateIftttIntegration_FullMethodName = "/api.ApplicationService/UpdateIftttIntegration"
|
||||
ApplicationService_DeleteIftttIntegration_FullMethodName = "/api.ApplicationService/DeleteIftttIntegration"
|
||||
ApplicationService_GenerateMqttIntegrationClientCertificate_FullMethodName = "/api.ApplicationService/GenerateMqttIntegrationClientCertificate"
|
||||
ApplicationService_ListDeviceProfiles_FullMethodName = "/api.ApplicationService/ListDeviceProfiles"
|
||||
ApplicationService_ListDeviceTags_FullMethodName = "/api.ApplicationService/ListDeviceTags"
|
||||
)
|
||||
|
||||
// ApplicationServiceClient is the client API for ApplicationService service.
|
||||
@ -167,6 +169,10 @@ type ApplicationServiceClient interface {
|
||||
DeleteIftttIntegration(ctx context.Context, in *DeleteIftttIntegrationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||
// Generates application ID specific client-certificate.
|
||||
GenerateMqttIntegrationClientCertificate(ctx context.Context, in *GenerateMqttIntegrationClientCertificateRequest, opts ...grpc.CallOption) (*GenerateMqttIntegrationClientCertificateResponse, error)
|
||||
// List device-profiles used within the given application.
|
||||
ListDeviceProfiles(ctx context.Context, in *ListApplicationDeviceProfilesRequest, opts ...grpc.CallOption) (*ListApplicationDeviceProfilesResponse, error)
|
||||
// List device tags used within the given application.
|
||||
ListDeviceTags(ctx context.Context, in *ListApplicationDeviceTagsRequest, opts ...grpc.CallOption) (*ListApplicationDeviceTagsResponse, error)
|
||||
}
|
||||
|
||||
type applicationServiceClient struct {
|
||||
@ -600,6 +606,24 @@ func (c *applicationServiceClient) GenerateMqttIntegrationClientCertificate(ctx
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *applicationServiceClient) ListDeviceProfiles(ctx context.Context, in *ListApplicationDeviceProfilesRequest, opts ...grpc.CallOption) (*ListApplicationDeviceProfilesResponse, error) {
|
||||
out := new(ListApplicationDeviceProfilesResponse)
|
||||
err := c.cc.Invoke(ctx, ApplicationService_ListDeviceProfiles_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *applicationServiceClient) ListDeviceTags(ctx context.Context, in *ListApplicationDeviceTagsRequest, opts ...grpc.CallOption) (*ListApplicationDeviceTagsResponse, error) {
|
||||
out := new(ListApplicationDeviceTagsResponse)
|
||||
err := c.cc.Invoke(ctx, ApplicationService_ListDeviceTags_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// ApplicationServiceServer is the server API for ApplicationService service.
|
||||
// All implementations must embed UnimplementedApplicationServiceServer
|
||||
// for forward compatibility
|
||||
@ -698,6 +722,10 @@ type ApplicationServiceServer interface {
|
||||
DeleteIftttIntegration(context.Context, *DeleteIftttIntegrationRequest) (*emptypb.Empty, error)
|
||||
// Generates application ID specific client-certificate.
|
||||
GenerateMqttIntegrationClientCertificate(context.Context, *GenerateMqttIntegrationClientCertificateRequest) (*GenerateMqttIntegrationClientCertificateResponse, error)
|
||||
// List device-profiles used within the given application.
|
||||
ListDeviceProfiles(context.Context, *ListApplicationDeviceProfilesRequest) (*ListApplicationDeviceProfilesResponse, error)
|
||||
// List device tags used within the given application.
|
||||
ListDeviceTags(context.Context, *ListApplicationDeviceTagsRequest) (*ListApplicationDeviceTagsResponse, error)
|
||||
mustEmbedUnimplementedApplicationServiceServer()
|
||||
}
|
||||
|
||||
@ -846,6 +874,12 @@ func (UnimplementedApplicationServiceServer) DeleteIftttIntegration(context.Cont
|
||||
func (UnimplementedApplicationServiceServer) GenerateMqttIntegrationClientCertificate(context.Context, *GenerateMqttIntegrationClientCertificateRequest) (*GenerateMqttIntegrationClientCertificateResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GenerateMqttIntegrationClientCertificate not implemented")
|
||||
}
|
||||
func (UnimplementedApplicationServiceServer) ListDeviceProfiles(context.Context, *ListApplicationDeviceProfilesRequest) (*ListApplicationDeviceProfilesResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListDeviceProfiles not implemented")
|
||||
}
|
||||
func (UnimplementedApplicationServiceServer) ListDeviceTags(context.Context, *ListApplicationDeviceTagsRequest) (*ListApplicationDeviceTagsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method ListDeviceTags not implemented")
|
||||
}
|
||||
func (UnimplementedApplicationServiceServer) mustEmbedUnimplementedApplicationServiceServer() {}
|
||||
|
||||
// UnsafeApplicationServiceServer may be embedded to opt out of forward compatibility for this service.
|
||||
@ -1705,6 +1739,42 @@ func _ApplicationService_GenerateMqttIntegrationClientCertificate_Handler(srv in
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ApplicationService_ListDeviceProfiles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListApplicationDeviceProfilesRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ApplicationServiceServer).ListDeviceProfiles(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ApplicationService_ListDeviceProfiles_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ApplicationServiceServer).ListDeviceProfiles(ctx, req.(*ListApplicationDeviceProfilesRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _ApplicationService_ListDeviceTags_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(ListApplicationDeviceTagsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(ApplicationServiceServer).ListDeviceTags(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: ApplicationService_ListDeviceTags_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(ApplicationServiceServer).ListDeviceTags(ctx, req.(*ListApplicationDeviceTagsRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// ApplicationService_ServiceDesc is the grpc.ServiceDesc for ApplicationService service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
@ -1900,6 +1970,14 @@ var ApplicationService_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "GenerateMqttIntegrationClientCertificate",
|
||||
Handler: _ApplicationService_GenerateMqttIntegrationClientCertificate_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListDeviceProfiles",
|
||||
Handler: _ApplicationService_ListDeviceProfiles_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "ListDeviceTags",
|
||||
Handler: _ApplicationService_ListDeviceTags_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "api/application.proto",
|
||||
|
1699
api/go/api/device.pb.go
vendored
1699
api/go/api/device.pb.go
vendored
File diff suppressed because it is too large
Load Diff
2
api/go/api/device_grpc.pb.go
vendored
2
api/go/api/device_grpc.pb.go
vendored
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc v4.24.4
|
||||
// - protoc v5.28.3
|
||||
// source: api/device.proto
|
||||
|
||||
package api
|
||||
|
895
api/go/api/device_profile.pb.go
vendored
895
api/go/api/device_profile.pb.go
vendored
File diff suppressed because it is too large
Load Diff
2
api/go/api/device_profile_grpc.pb.go
vendored
2
api/go/api/device_profile_grpc.pb.go
vendored
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc v4.24.4
|
||||
// - protoc v5.28.3
|
||||
// source: api/device_profile.proto
|
||||
|
||||
package api
|
||||
|
207
api/go/api/device_profile_template.pb.go
vendored
207
api/go/api/device_profile_template.pb.go
vendored
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.34.1
|
||||
// protoc v4.24.4
|
||||
// protoc-gen-go v1.35.1
|
||||
// protoc v5.28.3
|
||||
// source: api/device_profile_template.proto
|
||||
|
||||
package api
|
||||
@ -105,11 +105,9 @@ type DeviceProfileTemplate struct {
|
||||
|
||||
func (x *DeviceProfileTemplate) Reset() {
|
||||
*x = DeviceProfileTemplate{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_device_profile_template_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_device_profile_template_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *DeviceProfileTemplate) String() string {
|
||||
@ -120,7 +118,7 @@ func (*DeviceProfileTemplate) ProtoMessage() {}
|
||||
|
||||
func (x *DeviceProfileTemplate) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_device_profile_template_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -371,11 +369,9 @@ type DeviceProfileTemplateListItem struct {
|
||||
|
||||
func (x *DeviceProfileTemplateListItem) Reset() {
|
||||
*x = DeviceProfileTemplateListItem{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_device_profile_template_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_device_profile_template_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *DeviceProfileTemplateListItem) String() string {
|
||||
@ -386,7 +382,7 @@ func (*DeviceProfileTemplateListItem) ProtoMessage() {}
|
||||
|
||||
func (x *DeviceProfileTemplateListItem) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_device_profile_template_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -496,11 +492,9 @@ type CreateDeviceProfileTemplateRequest struct {
|
||||
|
||||
func (x *CreateDeviceProfileTemplateRequest) Reset() {
|
||||
*x = CreateDeviceProfileTemplateRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_device_profile_template_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_device_profile_template_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CreateDeviceProfileTemplateRequest) String() string {
|
||||
@ -511,7 +505,7 @@ func (*CreateDeviceProfileTemplateRequest) ProtoMessage() {}
|
||||
|
||||
func (x *CreateDeviceProfileTemplateRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_device_profile_template_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -544,11 +538,9 @@ type GetDeviceProfileTemplateRequest struct {
|
||||
|
||||
func (x *GetDeviceProfileTemplateRequest) Reset() {
|
||||
*x = GetDeviceProfileTemplateRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_device_profile_template_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_device_profile_template_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetDeviceProfileTemplateRequest) String() string {
|
||||
@ -559,7 +551,7 @@ func (*GetDeviceProfileTemplateRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetDeviceProfileTemplateRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_device_profile_template_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -596,11 +588,9 @@ type GetDeviceProfileTemplateResponse struct {
|
||||
|
||||
func (x *GetDeviceProfileTemplateResponse) Reset() {
|
||||
*x = GetDeviceProfileTemplateResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_device_profile_template_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_device_profile_template_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetDeviceProfileTemplateResponse) String() string {
|
||||
@ -611,7 +601,7 @@ func (*GetDeviceProfileTemplateResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetDeviceProfileTemplateResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_device_profile_template_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -658,11 +648,9 @@ type UpdateDeviceProfileTemplateRequest struct {
|
||||
|
||||
func (x *UpdateDeviceProfileTemplateRequest) Reset() {
|
||||
*x = UpdateDeviceProfileTemplateRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_device_profile_template_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_device_profile_template_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *UpdateDeviceProfileTemplateRequest) String() string {
|
||||
@ -673,7 +661,7 @@ func (*UpdateDeviceProfileTemplateRequest) ProtoMessage() {}
|
||||
|
||||
func (x *UpdateDeviceProfileTemplateRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_device_profile_template_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -706,11 +694,9 @@ type DeleteDeviceProfileTemplateRequest struct {
|
||||
|
||||
func (x *DeleteDeviceProfileTemplateRequest) Reset() {
|
||||
*x = DeleteDeviceProfileTemplateRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_device_profile_template_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_device_profile_template_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *DeleteDeviceProfileTemplateRequest) String() string {
|
||||
@ -721,7 +707,7 @@ func (*DeleteDeviceProfileTemplateRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteDeviceProfileTemplateRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_device_profile_template_proto_msgTypes[6]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -749,6 +735,7 @@ type ListDeviceProfileTemplatesRequest struct {
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Max number of device-profile templates to return in the result-set.
|
||||
// If not set, it will be treated as 0, and the response will only return the total_count.
|
||||
Limit uint32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"`
|
||||
// Offset in the result-set (for pagination).
|
||||
Offset uint32 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
|
||||
@ -756,11 +743,9 @@ type ListDeviceProfileTemplatesRequest struct {
|
||||
|
||||
func (x *ListDeviceProfileTemplatesRequest) Reset() {
|
||||
*x = ListDeviceProfileTemplatesRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_device_profile_template_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_device_profile_template_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListDeviceProfileTemplatesRequest) String() string {
|
||||
@ -771,7 +756,7 @@ func (*ListDeviceProfileTemplatesRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ListDeviceProfileTemplatesRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_device_profile_template_proto_msgTypes[7]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -813,11 +798,9 @@ type ListDeviceProfileTemplatesResponse struct {
|
||||
|
||||
func (x *ListDeviceProfileTemplatesResponse) Reset() {
|
||||
*x = ListDeviceProfileTemplatesResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_device_profile_template_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_device_profile_template_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListDeviceProfileTemplatesResponse) String() string {
|
||||
@ -828,7 +811,7 @@ func (*ListDeviceProfileTemplatesResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListDeviceProfileTemplatesResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_device_profile_template_proto_msgTypes[8]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -1114,7 +1097,7 @@ func file_api_device_profile_template_proto_rawDescGZIP() []byte {
|
||||
}
|
||||
|
||||
var file_api_device_profile_template_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
|
||||
var file_api_device_profile_template_proto_goTypes = []interface{}{
|
||||
var file_api_device_profile_template_proto_goTypes = []any{
|
||||
(*DeviceProfileTemplate)(nil), // 0: api.DeviceProfileTemplate
|
||||
(*DeviceProfileTemplateListItem)(nil), // 1: api.DeviceProfileTemplateListItem
|
||||
(*CreateDeviceProfileTemplateRequest)(nil), // 2: api.CreateDeviceProfileTemplateRequest
|
||||
@ -1176,116 +1159,6 @@ func file_api_device_profile_template_proto_init() {
|
||||
return
|
||||
}
|
||||
file_api_device_profile_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_api_device_profile_template_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeviceProfileTemplate); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_device_profile_template_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeviceProfileTemplateListItem); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_device_profile_template_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CreateDeviceProfileTemplateRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_device_profile_template_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetDeviceProfileTemplateRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_device_profile_template_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetDeviceProfileTemplateResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_device_profile_template_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UpdateDeviceProfileTemplateRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_device_profile_template_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeleteDeviceProfileTemplateRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_device_profile_template_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListDeviceProfileTemplatesRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_device_profile_template_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListDeviceProfileTemplatesResponse); 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{
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc v4.24.4
|
||||
// - protoc v5.28.3
|
||||
// source: api/device_profile_template.proto
|
||||
|
||||
package api
|
||||
|
1337
api/go/api/gateway.pb.go
vendored
1337
api/go/api/gateway.pb.go
vendored
File diff suppressed because it is too large
Load Diff
2
api/go/api/gateway_grpc.pb.go
vendored
2
api/go/api/gateway_grpc.pb.go
vendored
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc v4.24.4
|
||||
// - protoc v5.28.3
|
||||
// source: api/gateway.proto
|
||||
|
||||
package api
|
||||
|
758
api/go/api/internal.pb.go
vendored
758
api/go/api/internal.pb.go
vendored
File diff suppressed because it is too large
Load Diff
2
api/go/api/internal_grpc.pb.go
vendored
2
api/go/api/internal_grpc.pb.go
vendored
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc v4.24.4
|
||||
// - protoc v5.28.3
|
||||
// source: api/internal.proto
|
||||
|
||||
package api
|
||||
|
800
api/go/api/multicast_group.pb.go
vendored
800
api/go/api/multicast_group.pb.go
vendored
File diff suppressed because it is too large
Load Diff
2
api/go/api/multicast_group_grpc.pb.go
vendored
2
api/go/api/multicast_group_grpc.pb.go
vendored
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc v4.24.4
|
||||
// - protoc v5.28.3
|
||||
// source: api/multicast_group.proto
|
||||
|
||||
package api
|
||||
|
186
api/go/api/relay.pb.go
vendored
186
api/go/api/relay.pb.go
vendored
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.34.1
|
||||
// protoc v4.24.4
|
||||
// protoc-gen-go v1.35.1
|
||||
// protoc v5.28.3
|
||||
// source: api/relay.proto
|
||||
|
||||
package api
|
||||
@ -36,11 +36,9 @@ type RelayListItem struct {
|
||||
|
||||
func (x *RelayListItem) Reset() {
|
||||
*x = RelayListItem{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_relay_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_relay_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *RelayListItem) String() string {
|
||||
@ -51,7 +49,7 @@ func (*RelayListItem) ProtoMessage() {}
|
||||
|
||||
func (x *RelayListItem) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_relay_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -86,6 +84,7 @@ type ListRelaysRequest struct {
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Max number of devices to return in the result-set.
|
||||
// If not set, it will be treated as 0, and the response will only return the total_count.
|
||||
Limit uint32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"`
|
||||
// Offset in the result-set (for pagination).
|
||||
Offset uint32 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
|
||||
@ -95,11 +94,9 @@ type ListRelaysRequest struct {
|
||||
|
||||
func (x *ListRelaysRequest) Reset() {
|
||||
*x = ListRelaysRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_relay_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_relay_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListRelaysRequest) String() string {
|
||||
@ -110,7 +107,7 @@ func (*ListRelaysRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ListRelaysRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_relay_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -159,11 +156,9 @@ type ListRelaysResponse struct {
|
||||
|
||||
func (x *ListRelaysResponse) Reset() {
|
||||
*x = ListRelaysResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_relay_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_relay_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListRelaysResponse) String() string {
|
||||
@ -174,7 +169,7 @@ func (*ListRelaysResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListRelaysResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_relay_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -216,11 +211,9 @@ type AddRelayDeviceRequest struct {
|
||||
|
||||
func (x *AddRelayDeviceRequest) Reset() {
|
||||
*x = AddRelayDeviceRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_relay_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_relay_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *AddRelayDeviceRequest) String() string {
|
||||
@ -231,7 +224,7 @@ func (*AddRelayDeviceRequest) ProtoMessage() {}
|
||||
|
||||
func (x *AddRelayDeviceRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_relay_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -273,11 +266,9 @@ type RemoveRelayDeviceRequest struct {
|
||||
|
||||
func (x *RemoveRelayDeviceRequest) Reset() {
|
||||
*x = RemoveRelayDeviceRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_relay_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_relay_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *RemoveRelayDeviceRequest) String() string {
|
||||
@ -288,7 +279,7 @@ func (*RemoveRelayDeviceRequest) ProtoMessage() {}
|
||||
|
||||
func (x *RemoveRelayDeviceRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_relay_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -323,6 +314,7 @@ type ListRelayDevicesRequest struct {
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Max number of multicast groups to return in the result-set.
|
||||
// If not set, it will be treated as 0, and the response will only return the total_count.
|
||||
Limit uint32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"`
|
||||
// Offset in the result-set (for pagination).
|
||||
Offset uint32 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
|
||||
@ -332,11 +324,9 @@ type ListRelayDevicesRequest struct {
|
||||
|
||||
func (x *ListRelayDevicesRequest) Reset() {
|
||||
*x = ListRelayDevicesRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_relay_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_relay_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListRelayDevicesRequest) String() string {
|
||||
@ -347,7 +337,7 @@ func (*ListRelayDevicesRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ListRelayDevicesRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_relay_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -398,11 +388,9 @@ type RelayDeviceListItem struct {
|
||||
|
||||
func (x *RelayDeviceListItem) Reset() {
|
||||
*x = RelayDeviceListItem{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_relay_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_relay_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *RelayDeviceListItem) String() string {
|
||||
@ -413,7 +401,7 @@ func (*RelayDeviceListItem) ProtoMessage() {}
|
||||
|
||||
func (x *RelayDeviceListItem) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_relay_proto_msgTypes[6]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -462,11 +450,9 @@ type ListRelayDevicesResponse struct {
|
||||
|
||||
func (x *ListRelayDevicesResponse) Reset() {
|
||||
*x = ListRelayDevicesResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_relay_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_relay_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListRelayDevicesResponse) String() string {
|
||||
@ -477,7 +463,7 @@ func (*ListRelayDevicesResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListRelayDevicesResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_relay_proto_msgTypes[7]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -621,7 +607,7 @@ func file_api_relay_proto_rawDescGZIP() []byte {
|
||||
}
|
||||
|
||||
var file_api_relay_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
|
||||
var file_api_relay_proto_goTypes = []interface{}{
|
||||
var file_api_relay_proto_goTypes = []any{
|
||||
(*RelayListItem)(nil), // 0: api.RelayListItem
|
||||
(*ListRelaysRequest)(nil), // 1: api.ListRelaysRequest
|
||||
(*ListRelaysResponse)(nil), // 2: api.ListRelaysResponse
|
||||
@ -657,104 +643,6 @@ func file_api_relay_proto_init() {
|
||||
if File_api_relay_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_api_relay_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RelayListItem); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_relay_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListRelaysRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_relay_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListRelaysResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_relay_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*AddRelayDeviceRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_relay_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RemoveRelayDeviceRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_relay_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListRelayDevicesRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_relay_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*RelayDeviceListItem); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_relay_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListRelayDevicesResponse); 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{
|
||||
|
2
api/go/api/relay_grpc.pb.go
vendored
2
api/go/api/relay_grpc.pb.go
vendored
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc v4.24.4
|
||||
// - protoc v5.28.3
|
||||
// source: api/relay.proto
|
||||
|
||||
package api
|
||||
|
428
api/go/api/tenant.pb.go
vendored
428
api/go/api/tenant.pb.go
vendored
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.34.1
|
||||
// protoc v4.24.4
|
||||
// protoc-gen-go v1.35.1
|
||||
// protoc v5.28.3
|
||||
// source: api/tenant.proto
|
||||
|
||||
package api
|
||||
@ -60,11 +60,9 @@ type Tenant struct {
|
||||
|
||||
func (x *Tenant) Reset() {
|
||||
*x = Tenant{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_tenant_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_tenant_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *Tenant) String() string {
|
||||
@ -75,7 +73,7 @@ func (*Tenant) ProtoMessage() {}
|
||||
|
||||
func (x *Tenant) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_tenant_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -182,11 +180,9 @@ type TenantListItem struct {
|
||||
|
||||
func (x *TenantListItem) Reset() {
|
||||
*x = TenantListItem{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_tenant_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_tenant_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *TenantListItem) String() string {
|
||||
@ -197,7 +193,7 @@ func (*TenantListItem) ProtoMessage() {}
|
||||
|
||||
func (x *TenantListItem) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_tenant_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -286,11 +282,9 @@ type CreateTenantRequest struct {
|
||||
|
||||
func (x *CreateTenantRequest) Reset() {
|
||||
*x = CreateTenantRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_tenant_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_tenant_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CreateTenantRequest) String() string {
|
||||
@ -301,7 +295,7 @@ func (*CreateTenantRequest) ProtoMessage() {}
|
||||
|
||||
func (x *CreateTenantRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_tenant_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -334,11 +328,9 @@ type CreateTenantResponse struct {
|
||||
|
||||
func (x *CreateTenantResponse) Reset() {
|
||||
*x = CreateTenantResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_tenant_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_tenant_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CreateTenantResponse) String() string {
|
||||
@ -349,7 +341,7 @@ func (*CreateTenantResponse) ProtoMessage() {}
|
||||
|
||||
func (x *CreateTenantResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_tenant_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -382,11 +374,9 @@ type GetTenantRequest struct {
|
||||
|
||||
func (x *GetTenantRequest) Reset() {
|
||||
*x = GetTenantRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_tenant_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_tenant_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetTenantRequest) String() string {
|
||||
@ -397,7 +387,7 @@ func (*GetTenantRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetTenantRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_tenant_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -434,11 +424,9 @@ type GetTenantResponse struct {
|
||||
|
||||
func (x *GetTenantResponse) Reset() {
|
||||
*x = GetTenantResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_tenant_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_tenant_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetTenantResponse) String() string {
|
||||
@ -449,7 +437,7 @@ func (*GetTenantResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetTenantResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_tenant_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -496,11 +484,9 @@ type UpdateTenantRequest struct {
|
||||
|
||||
func (x *UpdateTenantRequest) Reset() {
|
||||
*x = UpdateTenantRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_tenant_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_tenant_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *UpdateTenantRequest) String() string {
|
||||
@ -511,7 +497,7 @@ func (*UpdateTenantRequest) ProtoMessage() {}
|
||||
|
||||
func (x *UpdateTenantRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_tenant_proto_msgTypes[6]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -544,11 +530,9 @@ type DeleteTenantRequest struct {
|
||||
|
||||
func (x *DeleteTenantRequest) Reset() {
|
||||
*x = DeleteTenantRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_tenant_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_tenant_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *DeleteTenantRequest) String() string {
|
||||
@ -559,7 +543,7 @@ func (*DeleteTenantRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteTenantRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_tenant_proto_msgTypes[7]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -587,6 +571,7 @@ type ListTenantsRequest struct {
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Max number of tenants to return in the result-set.
|
||||
// If not set, it will be treated as 0, and the response will only return the total_count.
|
||||
Limit uint32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"`
|
||||
// Offset in the result-set (for pagination).
|
||||
Offset uint32 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
|
||||
@ -599,11 +584,9 @@ type ListTenantsRequest struct {
|
||||
|
||||
func (x *ListTenantsRequest) Reset() {
|
||||
*x = ListTenantsRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_tenant_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_tenant_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListTenantsRequest) String() string {
|
||||
@ -614,7 +597,7 @@ func (*ListTenantsRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ListTenantsRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_tenant_proto_msgTypes[8]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -670,11 +653,9 @@ type ListTenantsResponse struct {
|
||||
|
||||
func (x *ListTenantsResponse) Reset() {
|
||||
*x = ListTenantsResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_tenant_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_tenant_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListTenantsResponse) String() string {
|
||||
@ -685,7 +666,7 @@ func (*ListTenantsResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListTenantsResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_tenant_proto_msgTypes[9]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -737,11 +718,9 @@ type TenantUser struct {
|
||||
|
||||
func (x *TenantUser) Reset() {
|
||||
*x = TenantUser{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_tenant_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_tenant_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *TenantUser) String() string {
|
||||
@ -752,7 +731,7 @@ func (*TenantUser) ProtoMessage() {}
|
||||
|
||||
func (x *TenantUser) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_tenant_proto_msgTypes[10]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -836,11 +815,9 @@ type TenantUserListItem struct {
|
||||
|
||||
func (x *TenantUserListItem) Reset() {
|
||||
*x = TenantUserListItem{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_tenant_proto_msgTypes[11]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_tenant_proto_msgTypes[11]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *TenantUserListItem) String() string {
|
||||
@ -851,7 +828,7 @@ func (*TenantUserListItem) ProtoMessage() {}
|
||||
|
||||
func (x *TenantUserListItem) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_tenant_proto_msgTypes[11]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -933,11 +910,9 @@ type AddTenantUserRequest struct {
|
||||
|
||||
func (x *AddTenantUserRequest) Reset() {
|
||||
*x = AddTenantUserRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_tenant_proto_msgTypes[12]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_tenant_proto_msgTypes[12]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *AddTenantUserRequest) String() string {
|
||||
@ -948,7 +923,7 @@ func (*AddTenantUserRequest) ProtoMessage() {}
|
||||
|
||||
func (x *AddTenantUserRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_tenant_proto_msgTypes[12]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -983,11 +958,9 @@ type GetTenantUserRequest struct {
|
||||
|
||||
func (x *GetTenantUserRequest) Reset() {
|
||||
*x = GetTenantUserRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_tenant_proto_msgTypes[13]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_tenant_proto_msgTypes[13]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetTenantUserRequest) String() string {
|
||||
@ -998,7 +971,7 @@ func (*GetTenantUserRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetTenantUserRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_tenant_proto_msgTypes[13]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -1042,11 +1015,9 @@ type GetTenantUserResponse struct {
|
||||
|
||||
func (x *GetTenantUserResponse) Reset() {
|
||||
*x = GetTenantUserResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_tenant_proto_msgTypes[14]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_tenant_proto_msgTypes[14]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetTenantUserResponse) String() string {
|
||||
@ -1057,7 +1028,7 @@ func (*GetTenantUserResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetTenantUserResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_tenant_proto_msgTypes[14]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -1104,11 +1075,9 @@ type UpdateTenantUserRequest struct {
|
||||
|
||||
func (x *UpdateTenantUserRequest) Reset() {
|
||||
*x = UpdateTenantUserRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_tenant_proto_msgTypes[15]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_tenant_proto_msgTypes[15]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *UpdateTenantUserRequest) String() string {
|
||||
@ -1119,7 +1088,7 @@ func (*UpdateTenantUserRequest) ProtoMessage() {}
|
||||
|
||||
func (x *UpdateTenantUserRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_tenant_proto_msgTypes[15]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -1154,11 +1123,9 @@ type DeleteTenantUserRequest struct {
|
||||
|
||||
func (x *DeleteTenantUserRequest) Reset() {
|
||||
*x = DeleteTenantUserRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_tenant_proto_msgTypes[16]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_tenant_proto_msgTypes[16]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *DeleteTenantUserRequest) String() string {
|
||||
@ -1169,7 +1136,7 @@ func (*DeleteTenantUserRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteTenantUserRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_tenant_proto_msgTypes[16]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -1206,6 +1173,7 @@ type ListTenantUsersRequest struct {
|
||||
// Tenant ID (UUID).
|
||||
TenantId string `protobuf:"bytes,1,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`
|
||||
// Max number of tenants to return in the result-set.
|
||||
// If not set, it will be treated as 0, and the response will only return the total_count.
|
||||
Limit uint32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
|
||||
// Offset in the result-set (for pagination).
|
||||
Offset uint32 `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"`
|
||||
@ -1213,11 +1181,9 @@ type ListTenantUsersRequest struct {
|
||||
|
||||
func (x *ListTenantUsersRequest) Reset() {
|
||||
*x = ListTenantUsersRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_tenant_proto_msgTypes[17]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_tenant_proto_msgTypes[17]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListTenantUsersRequest) String() string {
|
||||
@ -1228,7 +1194,7 @@ func (*ListTenantUsersRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ListTenantUsersRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_tenant_proto_msgTypes[17]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -1277,11 +1243,9 @@ type ListTenantUsersResponse struct {
|
||||
|
||||
func (x *ListTenantUsersResponse) Reset() {
|
||||
*x = ListTenantUsersResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_tenant_proto_msgTypes[18]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_tenant_proto_msgTypes[18]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListTenantUsersResponse) String() string {
|
||||
@ -1292,7 +1256,7 @@ func (*ListTenantUsersResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListTenantUsersResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_tenant_proto_msgTypes[18]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -1590,7 +1554,7 @@ func file_api_tenant_proto_rawDescGZIP() []byte {
|
||||
}
|
||||
|
||||
var file_api_tenant_proto_msgTypes = make([]protoimpl.MessageInfo, 20)
|
||||
var file_api_tenant_proto_goTypes = []interface{}{
|
||||
var file_api_tenant_proto_goTypes = []any{
|
||||
(*Tenant)(nil), // 0: api.Tenant
|
||||
(*TenantListItem)(nil), // 1: api.TenantListItem
|
||||
(*CreateTenantRequest)(nil), // 2: api.CreateTenantRequest
|
||||
@ -1664,236 +1628,6 @@ func file_api_tenant_proto_init() {
|
||||
if File_api_tenant_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_api_tenant_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Tenant); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_tenant_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*TenantListItem); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_tenant_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CreateTenantRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_tenant_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CreateTenantResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_tenant_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetTenantRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_tenant_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetTenantResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_tenant_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UpdateTenantRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_tenant_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeleteTenantRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_tenant_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListTenantsRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_tenant_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListTenantsResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_tenant_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*TenantUser); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_tenant_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*TenantUserListItem); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_tenant_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*AddTenantUserRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_tenant_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetTenantUserRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_tenant_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetTenantUserResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_tenant_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UpdateTenantUserRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_tenant_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeleteTenantUserRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_tenant_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListTenantUsersRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_tenant_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListTenantUsersResponse); 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{
|
||||
|
2
api/go/api/tenant_grpc.pb.go
vendored
2
api/go/api/tenant_grpc.pb.go
vendored
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc v4.24.4
|
||||
// - protoc v5.28.3
|
||||
// source: api/tenant.proto
|
||||
|
||||
package api
|
||||
|
273
api/go/api/user.pb.go
vendored
273
api/go/api/user.pb.go
vendored
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.34.1
|
||||
// protoc v4.24.4
|
||||
// protoc-gen-go v1.35.1
|
||||
// protoc v5.28.3
|
||||
// source: api/user.proto
|
||||
|
||||
package api
|
||||
@ -43,11 +43,9 @@ type User struct {
|
||||
|
||||
func (x *User) Reset() {
|
||||
*x = User{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_user_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_user_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *User) String() string {
|
||||
@ -58,7 +56,7 @@ func (*User) ProtoMessage() {}
|
||||
|
||||
func (x *User) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_user_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -129,11 +127,9 @@ type UserListItem struct {
|
||||
|
||||
func (x *UserListItem) Reset() {
|
||||
*x = UserListItem{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_user_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_user_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *UserListItem) String() string {
|
||||
@ -144,7 +140,7 @@ func (*UserListItem) ProtoMessage() {}
|
||||
|
||||
func (x *UserListItem) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_user_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -220,11 +216,9 @@ type UserTenant struct {
|
||||
|
||||
func (x *UserTenant) Reset() {
|
||||
*x = UserTenant{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_user_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_user_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *UserTenant) String() string {
|
||||
@ -235,7 +229,7 @@ func (*UserTenant) ProtoMessage() {}
|
||||
|
||||
func (x *UserTenant) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_user_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -293,11 +287,9 @@ type CreateUserRequest struct {
|
||||
|
||||
func (x *CreateUserRequest) Reset() {
|
||||
*x = CreateUserRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_user_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_user_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CreateUserRequest) String() string {
|
||||
@ -308,7 +300,7 @@ func (*CreateUserRequest) ProtoMessage() {}
|
||||
|
||||
func (x *CreateUserRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_user_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -355,11 +347,9 @@ type CreateUserResponse struct {
|
||||
|
||||
func (x *CreateUserResponse) Reset() {
|
||||
*x = CreateUserResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_user_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_user_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *CreateUserResponse) String() string {
|
||||
@ -370,7 +360,7 @@ func (*CreateUserResponse) ProtoMessage() {}
|
||||
|
||||
func (x *CreateUserResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_user_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -403,11 +393,9 @@ type GetUserRequest struct {
|
||||
|
||||
func (x *GetUserRequest) Reset() {
|
||||
*x = GetUserRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_user_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_user_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetUserRequest) String() string {
|
||||
@ -418,7 +406,7 @@ func (*GetUserRequest) ProtoMessage() {}
|
||||
|
||||
func (x *GetUserRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_user_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -455,11 +443,9 @@ type GetUserResponse struct {
|
||||
|
||||
func (x *GetUserResponse) Reset() {
|
||||
*x = GetUserResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_user_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_user_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *GetUserResponse) String() string {
|
||||
@ -470,7 +456,7 @@ func (*GetUserResponse) ProtoMessage() {}
|
||||
|
||||
func (x *GetUserResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_user_proto_msgTypes[6]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -517,11 +503,9 @@ type UpdateUserRequest struct {
|
||||
|
||||
func (x *UpdateUserRequest) Reset() {
|
||||
*x = UpdateUserRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_user_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_user_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *UpdateUserRequest) String() string {
|
||||
@ -532,7 +516,7 @@ func (*UpdateUserRequest) ProtoMessage() {}
|
||||
|
||||
func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_user_proto_msgTypes[7]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -565,11 +549,9 @@ type DeleteUserRequest struct {
|
||||
|
||||
func (x *DeleteUserRequest) Reset() {
|
||||
*x = DeleteUserRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_user_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_user_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *DeleteUserRequest) String() string {
|
||||
@ -580,7 +562,7 @@ func (*DeleteUserRequest) ProtoMessage() {}
|
||||
|
||||
func (x *DeleteUserRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_user_proto_msgTypes[8]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -608,6 +590,7 @@ type ListUsersRequest struct {
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// Max number of tenants to return in the result-set.
|
||||
// If not set, it will be treated as 0, and the response will only return the total_count.
|
||||
Limit uint32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"`
|
||||
// Offset in the result-set (for pagination).
|
||||
Offset uint32 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
|
||||
@ -615,11 +598,9 @@ type ListUsersRequest struct {
|
||||
|
||||
func (x *ListUsersRequest) Reset() {
|
||||
*x = ListUsersRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_user_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_user_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListUsersRequest) String() string {
|
||||
@ -630,7 +611,7 @@ func (*ListUsersRequest) ProtoMessage() {}
|
||||
|
||||
func (x *ListUsersRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_user_proto_msgTypes[9]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -672,11 +653,9 @@ type ListUsersResponse struct {
|
||||
|
||||
func (x *ListUsersResponse) Reset() {
|
||||
*x = ListUsersResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_user_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_user_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ListUsersResponse) String() string {
|
||||
@ -687,7 +666,7 @@ func (*ListUsersResponse) ProtoMessage() {}
|
||||
|
||||
func (x *ListUsersResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_user_proto_msgTypes[10]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -729,11 +708,9 @@ type UpdateUserPasswordRequest struct {
|
||||
|
||||
func (x *UpdateUserPasswordRequest) Reset() {
|
||||
*x = UpdateUserPasswordRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_api_user_proto_msgTypes[11]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_api_user_proto_msgTypes[11]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *UpdateUserPasswordRequest) String() string {
|
||||
@ -744,7 +721,7 @@ func (*UpdateUserPasswordRequest) ProtoMessage() {}
|
||||
|
||||
func (x *UpdateUserPasswordRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_api_user_proto_msgTypes[11]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -917,7 +894,7 @@ func file_api_user_proto_rawDescGZIP() []byte {
|
||||
}
|
||||
|
||||
var file_api_user_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
|
||||
var file_api_user_proto_goTypes = []interface{}{
|
||||
var file_api_user_proto_goTypes = []any{
|
||||
(*User)(nil), // 0: api.User
|
||||
(*UserListItem)(nil), // 1: api.UserListItem
|
||||
(*UserTenant)(nil), // 2: api.UserTenant
|
||||
@ -967,152 +944,6 @@ func file_api_user_proto_init() {
|
||||
if File_api_user_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_api_user_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*User); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_user_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UserListItem); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_user_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UserTenant); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_user_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CreateUserRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_user_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*CreateUserResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_user_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetUserRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_user_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*GetUserResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_user_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UpdateUserRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_user_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeleteUserRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_user_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListUsersRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_user_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ListUsersResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_api_user_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UpdateUserPasswordRequest); 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{
|
||||
|
2
api/go/api/user_grpc.pb.go
vendored
2
api/go/api/user_grpc.pb.go
vendored
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc v4.24.4
|
||||
// - protoc v5.28.3
|
||||
// source: api/user.proto
|
||||
|
||||
package api
|
||||
|
118
api/go/common/common.pb.go
vendored
118
api/go/common/common.pb.go
vendored
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.34.1
|
||||
// protoc v4.24.4
|
||||
// protoc-gen-go v1.35.1
|
||||
// protoc v5.28.3
|
||||
// source: common/common.proto
|
||||
|
||||
package common
|
||||
@ -656,11 +656,9 @@ type Location struct {
|
||||
|
||||
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)
|
||||
}
|
||||
mi := &file_common_common_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *Location) String() string {
|
||||
@ -671,7 +669,7 @@ func (*Location) ProtoMessage() {}
|
||||
|
||||
func (x *Location) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_common_common_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -734,11 +732,9 @@ type KeyEnvelope struct {
|
||||
|
||||
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)
|
||||
}
|
||||
mi := &file_common_common_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *KeyEnvelope) String() string {
|
||||
@ -749,7 +745,7 @@ func (*KeyEnvelope) ProtoMessage() {}
|
||||
|
||||
func (x *KeyEnvelope) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_common_common_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -795,11 +791,9 @@ type Metric struct {
|
||||
|
||||
func (x *Metric) Reset() {
|
||||
*x = Metric{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_common_common_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_common_common_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *Metric) String() string {
|
||||
@ -810,7 +804,7 @@ func (*Metric) ProtoMessage() {}
|
||||
|
||||
func (x *Metric) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_common_common_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -867,11 +861,9 @@ type MetricDataset struct {
|
||||
|
||||
func (x *MetricDataset) Reset() {
|
||||
*x = MetricDataset{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_common_common_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_common_common_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *MetricDataset) String() string {
|
||||
@ -882,7 +874,7 @@ func (*MetricDataset) ProtoMessage() {}
|
||||
|
||||
func (x *MetricDataset) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_common_common_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -925,11 +917,9 @@ type JoinServerContext struct {
|
||||
|
||||
func (x *JoinServerContext) Reset() {
|
||||
*x = JoinServerContext{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_common_common_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_common_common_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *JoinServerContext) String() string {
|
||||
@ -940,7 +930,7 @@ func (*JoinServerContext) ProtoMessage() {}
|
||||
|
||||
func (x *JoinServerContext) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_common_common_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -1103,7 +1093,7 @@ func file_common_common_proto_rawDescGZIP() []byte {
|
||||
|
||||
var file_common_common_proto_enumTypes = make([]protoimpl.EnumInfo, 10)
|
||||
var file_common_common_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
||||
var file_common_common_proto_goTypes = []interface{}{
|
||||
var file_common_common_proto_goTypes = []any{
|
||||
(Modulation)(0), // 0: common.Modulation
|
||||
(Region)(0), // 1: common.Region
|
||||
(MType)(0), // 2: common.MType
|
||||
@ -1139,68 +1129,6 @@ 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
|
||||
}
|
||||
}
|
||||
file_common_common_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Metric); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_common_common_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*MetricDataset); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_common_common_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*JoinServerContext); 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{
|
||||
|
6
api/go/go.mod
vendored
6
api/go/go.mod
vendored
@ -10,8 +10,8 @@ require (
|
||||
|
||||
require (
|
||||
github.com/golang/protobuf v1.5.4 // indirect
|
||||
golang.org/x/net v0.23.0 // indirect
|
||||
golang.org/x/sys v0.18.0 // indirect
|
||||
golang.org/x/text v0.14.0 // indirect
|
||||
golang.org/x/net v0.33.0 // indirect
|
||||
golang.org/x/sys v0.28.0 // indirect
|
||||
golang.org/x/text v0.21.0 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240325203815-454cdb8f5daa // indirect
|
||||
)
|
||||
|
12
api/go/go.sum
vendored
12
api/go/go.sum
vendored
@ -2,12 +2,12 @@ github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek
|
||||
github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
|
||||
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
||||
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
||||
golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs=
|
||||
golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
|
||||
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
|
||||
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
|
||||
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
||||
golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I=
|
||||
golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4=
|
||||
golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA=
|
||||
golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||
golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo=
|
||||
golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20240325203815-454cdb8f5daa h1:Jt1XW5PaLXF1/ePZrznsh/aAUvI7Adfc3LY1dAKlzRs=
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20240325203815-454cdb8f5daa/go.mod h1:K4kfzHtI0kqWA79gecJarFtDn/Mls+GxQcg3Zox91Ac=
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240325203815-454cdb8f5daa h1:RBgMaUMP+6soRkik4VoN8ojR2nex2TqZwjSSogic+eo=
|
||||
|
834
api/go/gw/gw.pb.go
vendored
834
api/go/gw/gw.pb.go
vendored
File diff suppressed because it is too large
Load Diff
594
api/go/integration/integration.pb.go
vendored
594
api/go/integration/integration.pb.go
vendored
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.34.1
|
||||
// protoc v4.24.4
|
||||
// protoc-gen-go v1.35.1
|
||||
// protoc v5.28.3
|
||||
// source: integration/integration.proto
|
||||
|
||||
package integration
|
||||
@ -102,6 +102,8 @@ const (
|
||||
LogCode_RELAY_NEW_END_DEVICE LogCode = 9
|
||||
// Downlink frame-counter.
|
||||
LogCode_F_CNT_DOWN LogCode = 10
|
||||
// Downlink has expired.
|
||||
LogCode_EXPIRED LogCode = 11
|
||||
)
|
||||
|
||||
// Enum value maps for LogCode.
|
||||
@ -118,6 +120,7 @@ var (
|
||||
8: "DOWNLINK_GATEWAY",
|
||||
9: "RELAY_NEW_END_DEVICE",
|
||||
10: "F_CNT_DOWN",
|
||||
11: "EXPIRED",
|
||||
}
|
||||
LogCode_value = map[string]int32{
|
||||
"UNKNOWN": 0,
|
||||
@ -131,6 +134,7 @@ var (
|
||||
"DOWNLINK_GATEWAY": 8,
|
||||
"RELAY_NEW_END_DEVICE": 9,
|
||||
"F_CNT_DOWN": 10,
|
||||
"EXPIRED": 11,
|
||||
}
|
||||
)
|
||||
|
||||
@ -191,11 +195,9 @@ type DeviceInfo struct {
|
||||
|
||||
func (x *DeviceInfo) Reset() {
|
||||
*x = DeviceInfo{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_integration_integration_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_integration_integration_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *DeviceInfo) String() string {
|
||||
@ -206,7 +208,7 @@ func (*DeviceInfo) ProtoMessage() {}
|
||||
|
||||
func (x *DeviceInfo) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_integration_integration_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -313,11 +315,9 @@ type UplinkRelayRxInfo struct {
|
||||
|
||||
func (x *UplinkRelayRxInfo) Reset() {
|
||||
*x = UplinkRelayRxInfo{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_integration_integration_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_integration_integration_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *UplinkRelayRxInfo) String() string {
|
||||
@ -328,7 +328,7 @@ func (*UplinkRelayRxInfo) ProtoMessage() {}
|
||||
|
||||
func (x *UplinkRelayRxInfo) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_integration_integration_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -425,15 +425,16 @@ type UplinkEvent struct {
|
||||
// the AppSKey and that the encryption / decryption of the payloads is
|
||||
// the responsibility of the end-application.
|
||||
JoinServerContext *common.JoinServerContext `protobuf:"bytes,15,opt,name=join_server_context,json=joinServerContext,proto3" json:"join_server_context,omitempty"`
|
||||
// Region config ID.
|
||||
// This contains the region config ID which reported the uplink.
|
||||
RegionConfigId string `protobuf:"bytes,16,opt,name=region_config_id,json=regionConfigId,proto3" json:"region_config_id,omitempty"`
|
||||
}
|
||||
|
||||
func (x *UplinkEvent) Reset() {
|
||||
*x = UplinkEvent{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_integration_integration_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_integration_integration_proto_msgTypes[2]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *UplinkEvent) String() string {
|
||||
@ -444,7 +445,7 @@ func (*UplinkEvent) ProtoMessage() {}
|
||||
|
||||
func (x *UplinkEvent) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_integration_integration_proto_msgTypes[2]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -564,6 +565,13 @@ func (x *UplinkEvent) GetJoinServerContext() *common.JoinServerContext {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *UplinkEvent) GetRegionConfigId() string {
|
||||
if x != nil {
|
||||
return x.RegionConfigId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// JoinEvent is the message sent when a device joined the network.
|
||||
// Note: this event is sent at the first uplink after OTAA.
|
||||
type JoinEvent struct {
|
||||
@ -586,15 +594,16 @@ type JoinEvent struct {
|
||||
// the AppSKey and that the encryption / decryption of the payloads is
|
||||
// the responsibility of the end-application.
|
||||
JoinServerContext *common.JoinServerContext `protobuf:"bytes,6,opt,name=join_server_context,json=joinServerContext,proto3" json:"join_server_context,omitempty"`
|
||||
// Region config ID.
|
||||
// This contains the region config ID which reported the uplink.
|
||||
RegionConfigId string `protobuf:"bytes,7,opt,name=region_config_id,json=regionConfigId,proto3" json:"region_config_id,omitempty"`
|
||||
}
|
||||
|
||||
func (x *JoinEvent) Reset() {
|
||||
*x = JoinEvent{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_integration_integration_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_integration_integration_proto_msgTypes[3]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *JoinEvent) String() string {
|
||||
@ -605,7 +614,7 @@ func (*JoinEvent) ProtoMessage() {}
|
||||
|
||||
func (x *JoinEvent) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_integration_integration_proto_msgTypes[3]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -662,6 +671,13 @@ func (x *JoinEvent) GetJoinServerContext() *common.JoinServerContext {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *JoinEvent) GetRegionConfigId() string {
|
||||
if x != nil {
|
||||
return x.RegionConfigId
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// AckEvent is the message sent when a confirmation on a confirmed downlink
|
||||
// has been received -or- when the downlink timed out.
|
||||
type AckEvent struct {
|
||||
@ -685,11 +701,9 @@ type AckEvent struct {
|
||||
|
||||
func (x *AckEvent) Reset() {
|
||||
*x = AckEvent{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_integration_integration_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_integration_integration_proto_msgTypes[4]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *AckEvent) String() string {
|
||||
@ -700,7 +714,7 @@ func (*AckEvent) ProtoMessage() {}
|
||||
|
||||
func (x *AckEvent) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_integration_integration_proto_msgTypes[4]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -783,11 +797,9 @@ type TxAckEvent struct {
|
||||
|
||||
func (x *TxAckEvent) Reset() {
|
||||
*x = TxAckEvent{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_integration_integration_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_integration_integration_proto_msgTypes[5]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *TxAckEvent) String() string {
|
||||
@ -798,7 +810,7 @@ func (*TxAckEvent) ProtoMessage() {}
|
||||
|
||||
func (x *TxAckEvent) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_integration_integration_proto_msgTypes[5]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -884,11 +896,9 @@ type LogEvent struct {
|
||||
|
||||
func (x *LogEvent) Reset() {
|
||||
*x = LogEvent{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_integration_integration_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_integration_integration_proto_msgTypes[6]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *LogEvent) String() string {
|
||||
@ -899,7 +909,7 @@ func (*LogEvent) ProtoMessage() {}
|
||||
|
||||
func (x *LogEvent) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_integration_integration_proto_msgTypes[6]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -982,11 +992,9 @@ type StatusEvent struct {
|
||||
|
||||
func (x *StatusEvent) Reset() {
|
||||
*x = StatusEvent{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_integration_integration_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_integration_integration_proto_msgTypes[7]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *StatusEvent) String() string {
|
||||
@ -997,7 +1005,7 @@ func (*StatusEvent) ProtoMessage() {}
|
||||
|
||||
func (x *StatusEvent) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_integration_integration_proto_msgTypes[7]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -1079,11 +1087,9 @@ type LocationEvent struct {
|
||||
|
||||
func (x *LocationEvent) Reset() {
|
||||
*x = LocationEvent{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_integration_integration_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_integration_integration_proto_msgTypes[8]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *LocationEvent) String() string {
|
||||
@ -1094,7 +1100,7 @@ func (*LocationEvent) ProtoMessage() {}
|
||||
|
||||
func (x *LocationEvent) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_integration_integration_proto_msgTypes[8]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -1161,11 +1167,9 @@ type IntegrationEvent struct {
|
||||
|
||||
func (x *IntegrationEvent) Reset() {
|
||||
*x = IntegrationEvent{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_integration_integration_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_integration_integration_proto_msgTypes[9]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *IntegrationEvent) String() string {
|
||||
@ -1176,7 +1180,7 @@ func (*IntegrationEvent) ProtoMessage() {}
|
||||
|
||||
func (x *IntegrationEvent) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_integration_integration_proto_msgTypes[9]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -1259,11 +1263,9 @@ type DownlinkCommand struct {
|
||||
|
||||
func (x *DownlinkCommand) Reset() {
|
||||
*x = DownlinkCommand{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_integration_integration_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_integration_integration_proto_msgTypes[10]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *DownlinkCommand) String() string {
|
||||
@ -1274,7 +1276,7 @@ func (*DownlinkCommand) ProtoMessage() {}
|
||||
|
||||
func (x *DownlinkCommand) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_integration_integration_proto_msgTypes[10]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -1383,7 +1385,7 @@ var file_integration_integration_proto_rawDesc = []byte{
|
||||
0x01, 0x28, 0x05, 0x52, 0x03, 0x73, 0x6e, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x72, 0x73, 0x73, 0x69,
|
||||
0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x72, 0x73, 0x73, 0x69, 0x12, 0x1f, 0x0a, 0x0b,
|
||||
0x77, 0x6f, 0x72, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28,
|
||||
0x0d, 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x22, 0xd3, 0x04,
|
||||
0x0d, 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x22, 0xfd, 0x04,
|
||||
0x0a, 0x0b, 0x55, 0x70, 0x6c, 0x69, 0x6e, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x29, 0x0a,
|
||||
0x10, 0x64, 0x65, 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69,
|
||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x65, 0x64, 0x75, 0x70, 0x6c, 0x69,
|
||||
@ -1421,7 +1423,33 @@ var file_integration_integration_proto_rawDesc = []byte{
|
||||
0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4a,
|
||||
0x6f, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74,
|
||||
0x52, 0x11, 0x6a, 0x6f, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74,
|
||||
0x65, 0x78, 0x74, 0x22, 0xca, 0x02, 0x0a, 0x09, 0x4a, 0x6f, 0x69, 0x6e, 0x45, 0x76, 0x65, 0x6e,
|
||||
0x65, 0x78, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f,
|
||||
0x6e, 0x66, 0x69, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72,
|
||||
0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x49, 0x64, 0x22, 0xf4, 0x02,
|
||||
0x0a, 0x09, 0x4a, 0x6f, 0x69, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x64,
|
||||
0x65, 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x65, 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02,
|
||||
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, 0x38, 0x0a, 0x0b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65,
|
||||
0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x69, 0x6e,
|
||||
0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65,
|
||||
0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f,
|
||||
0x12, 0x19, 0x0a, 0x08, 0x64, 0x65, 0x76, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x04, 0x20, 0x01,
|
||||
0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x76, 0x41, 0x64, 0x64, 0x72, 0x12, 0x42, 0x0a, 0x0d, 0x72,
|
||||
0x65, 0x6c, 0x61, 0x79, 0x5f, 0x72, 0x78, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x05, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x2e, 0x55, 0x70, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x6c, 0x61, 0x79, 0x52, 0x78, 0x49, 0x6e,
|
||||
0x66, 0x6f, 0x52, 0x0b, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x52, 0x78, 0x49, 0x6e, 0x66, 0x6f, 0x12,
|
||||
0x49, 0x0a, 0x13, 0x6a, 0x6f, 0x69, 0x6e, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x63,
|
||||
0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63,
|
||||
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4a, 0x6f, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72,
|
||||
0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x11, 0x6a, 0x6f, 0x69, 0x6e, 0x53, 0x65, 0x72,
|
||||
0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x12, 0x28, 0x0a, 0x10, 0x72, 0x65,
|
||||
0x67, 0x69, 0x6f, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x07,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66,
|
||||
0x69, 0x67, 0x49, 0x64, 0x22, 0x85, 0x02, 0x0a, 0x08, 0x41, 0x63, 0x6b, 0x45, 0x76, 0x65, 0x6e,
|
||||
0x74, 0x12, 0x29, 0x0a, 0x10, 0x64, 0x65, 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x65, 0x64,
|
||||
0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x04,
|
||||
@ -1431,97 +1459,55 @@ var file_integration_integration_proto_rawDesc = []byte{
|
||||
0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x17, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
|
||||
0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69,
|
||||
0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x19, 0x0a, 0x08, 0x64, 0x65, 0x76, 0x5f, 0x61, 0x64,
|
||||
0x64, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x76, 0x41, 0x64, 0x64,
|
||||
0x72, 0x12, 0x42, 0x0a, 0x0d, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x5f, 0x72, 0x78, 0x5f, 0x69, 0x6e,
|
||||
0x66, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x67,
|
||||
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x55, 0x70, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x6c,
|
||||
0x61, 0x79, 0x52, 0x78, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x52,
|
||||
0x78, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x49, 0x0a, 0x13, 0x6a, 0x6f, 0x69, 0x6e, 0x5f, 0x73, 0x65,
|
||||
0x72, 0x76, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x06, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4a, 0x6f, 0x69, 0x6e,
|
||||
0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x11, 0x6a,
|
||||
0x6f, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74,
|
||||
0x22, 0x85, 0x02, 0x0a, 0x08, 0x41, 0x63, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x29, 0x0a,
|
||||
0x10, 0x64, 0x65, 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69,
|
||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x65, 0x64, 0x75, 0x70, 0x6c, 0x69,
|
||||
0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65,
|
||||
0x18, 0x02, 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, 0x38, 0x0a, 0x0b, 0x64, 0x65, 0x76, 0x69,
|
||||
0x63, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e,
|
||||
0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x76, 0x69,
|
||||
0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e,
|
||||
0x66, 0x6f, 0x12, 0x22, 0x0a, 0x0d, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f, 0x69, 0x74, 0x65, 0x6d,
|
||||
0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x71, 0x75, 0x65, 0x75, 0x65,
|
||||
0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x63, 0x6b, 0x6e, 0x6f, 0x77,
|
||||
0x6c, 0x65, 0x64, 0x67, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x61, 0x63,
|
||||
0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x0a, 0x66, 0x5f,
|
||||
0x63, 0x6e, 0x74, 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08,
|
||||
0x66, 0x43, 0x6e, 0x74, 0x44, 0x6f, 0x77, 0x6e, 0x22, 0xa5, 0x02, 0x0a, 0x0a, 0x54, 0x78, 0x41,
|
||||
0x63, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x6f, 0x77, 0x6e, 0x6c,
|
||||
0x69, 0x6e, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x64, 0x6f,
|
||||
0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65,
|
||||
0x18, 0x02, 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, 0x38, 0x0a, 0x0b, 0x64, 0x65, 0x76, 0x69,
|
||||
0x63, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e,
|
||||
0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x76, 0x69,
|
||||
0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e,
|
||||
0x66, 0x6f, 0x12, 0x22, 0x0a, 0x0d, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f, 0x69, 0x74, 0x65, 0x6d,
|
||||
0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x71, 0x75, 0x65, 0x75, 0x65,
|
||||
0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x0a, 0x66, 0x5f, 0x63, 0x6e, 0x74, 0x5f,
|
||||
0x64, 0x6f, 0x77, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x66, 0x43, 0x6e, 0x74,
|
||||
0x44, 0x6f, 0x77, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f,
|
||||
0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61,
|
||||
0x79, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x07,
|
||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x77, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x69,
|
||||
0x6e, 0x6b, 0x54, 0x78, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x74, 0x78, 0x49, 0x6e, 0x66, 0x6f,
|
||||
0x22, 0xe7, 0x02, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 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, 0x38, 0x0a,
|
||||
0x0b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x17, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x64, 0x65, 0x76,
|
||||
0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2b, 0x0a, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x52, 0x05, 0x6c,
|
||||
0x65, 0x76, 0x65, 0x6c, 0x12, 0x28, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01,
|
||||
0x28, 0x0e, 0x32, 0x14, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x2e, 0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x20,
|
||||
0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x12, 0x3c, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x06, 0x20, 0x03, 0x28,
|
||||
0x0b, 0x32, 0x22, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
|
||||
0x4c, 0x6f, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74,
|
||||
0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x1a, 0x3a,
|
||||
0x0a, 0x0c, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10,
|
||||
0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79,
|
||||
0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xcf, 0x02, 0x0a, 0x0b, 0x53,
|
||||
0x74, 0x61, 0x74, 0x75, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x64, 0x65,
|
||||
0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x65, 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 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, 0x38, 0x0a, 0x0b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f,
|
||||
0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x69, 0x6e, 0x74,
|
||||
0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49,
|
||||
0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12,
|
||||
0x16, 0x0a, 0x06, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52,
|
||||
0x06, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x12, 0x32, 0x0a, 0x15, 0x65, 0x78, 0x74, 0x65, 0x72,
|
||||
0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
|
||||
0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c,
|
||||
0x50, 0x6f, 0x77, 0x65, 0x72, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x3a, 0x0a, 0x19, 0x62,
|
||||
0x61, 0x74, 0x74, 0x65, 0x72, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x5f, 0x75, 0x6e, 0x61,
|
||||
0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x17,
|
||||
0x62, 0x61, 0x74, 0x74, 0x65, 0x72, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x55, 0x6e, 0x61, 0x76,
|
||||
0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x61, 0x74, 0x74, 0x65,
|
||||
0x72, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x08, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0c,
|
||||
0x62, 0x61, 0x74, 0x74, 0x65, 0x72, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0xd2, 0x01, 0x0a,
|
||||
0x0d, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x29,
|
||||
0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x22, 0x0a, 0x0d, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f,
|
||||
0x69, 0x74, 0x65, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x71,
|
||||
0x75, 0x65, 0x75, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x63,
|
||||
0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08,
|
||||
0x52, 0x0c, 0x61, 0x63, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x64, 0x12, 0x1c,
|
||||
0x0a, 0x0a, 0x66, 0x5f, 0x63, 0x6e, 0x74, 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x18, 0x06, 0x20, 0x01,
|
||||
0x28, 0x0d, 0x52, 0x08, 0x66, 0x43, 0x6e, 0x74, 0x44, 0x6f, 0x77, 0x6e, 0x22, 0xa5, 0x02, 0x0a,
|
||||
0x0a, 0x54, 0x78, 0x41, 0x63, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x64,
|
||||
0x6f, 0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d,
|
||||
0x52, 0x0a, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x04,
|
||||
0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 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, 0x38, 0x0a, 0x0b,
|
||||
0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||
0x0b, 0x32, 0x17, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
|
||||
0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69,
|
||||
0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x22, 0x0a, 0x0d, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f,
|
||||
0x69, 0x74, 0x65, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x71,
|
||||
0x75, 0x65, 0x75, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x0a, 0x66, 0x5f,
|
||||
0x63, 0x6e, 0x74, 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08,
|
||||
0x66, 0x43, 0x6e, 0x74, 0x44, 0x6f, 0x77, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x61, 0x74, 0x65,
|
||||
0x77, 0x61, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x61,
|
||||
0x74, 0x65, 0x77, 0x61, 0x79, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x69, 0x6e,
|
||||
0x66, 0x6f, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x77, 0x2e, 0x44, 0x6f,
|
||||
0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x54, 0x78, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x74, 0x78,
|
||||
0x49, 0x6e, 0x66, 0x6f, 0x22, 0xe7, 0x02, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x45, 0x76, 0x65, 0x6e,
|
||||
0x74, 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, 0x38, 0x0a, 0x0b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f,
|
||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52,
|
||||
0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2b, 0x0a, 0x05, 0x6c,
|
||||
0x65, 0x76, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x69, 0x6e, 0x74,
|
||||
0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65,
|
||||
0x6c, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x28, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65,
|
||||
0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f,
|
||||
0x64, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3c, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18,
|
||||
0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x2e, 0x4c, 0x6f, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x6f, 0x6e,
|
||||
0x74, 0x65, 0x78, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65,
|
||||
0x78, 0x74, 0x1a, 0x3a, 0x0a, 0x0c, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x45, 0x6e, 0x74,
|
||||
0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xcf,
|
||||
0x02, 0x0a, 0x0b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x29,
|
||||
0x0a, 0x10, 0x64, 0x65, 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
|
||||
0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x65, 0x64, 0x75, 0x70, 0x6c,
|
||||
0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x69, 0x6d,
|
||||
@ -1531,70 +1517,92 @@ var file_integration_integration_proto_rawDesc = []byte{
|
||||
0x69, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17,
|
||||
0x2e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x76,
|
||||
0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49,
|
||||
0x6e, 0x66, 0x6f, 0x12, 0x2c, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18,
|
||||
0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4c,
|
||||
0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x22, 0xa2, 0x02, 0x0a, 0x10, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f,
|
||||
0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x64, 0x65, 0x64, 0x75, 0x70, 0x6c,
|
||||
0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
||||
0x52, 0x0f, 0x64, 0x65, 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49,
|
||||
0x64, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 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, 0x38, 0x0a, 0x0b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52,
|
||||
0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x29, 0x0a, 0x10, 0x69,
|
||||
0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18,
|
||||
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69,
|
||||
0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f,
|
||||
0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x76, 0x65, 0x6e,
|
||||
0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18,
|
||||
0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x06,
|
||||
0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0xb4, 0x01, 0x0a, 0x0f, 0x44, 0x6f, 0x77, 0x6e, 0x6c,
|
||||
0x69, 0x6e, 0x6b, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x65,
|
||||
0x76, 0x5f, 0x65, 0x75, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x76,
|
||||
0x45, 0x75, 0x69, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64,
|
||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65,
|
||||
0x64, 0x12, 0x15, 0x0a, 0x06, 0x66, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28,
|
||||
0x0d, 0x52, 0x05, 0x66, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61,
|
||||
0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2f, 0x0a, 0x06,
|
||||
0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67,
|
||||
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53,
|
||||
0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2a, 0x2c, 0x0a,
|
||||
0x08, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x4e, 0x46,
|
||||
0x4f, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x57, 0x41, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01,
|
||||
0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x2a, 0xea, 0x01, 0x0a, 0x07,
|
||||
0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f,
|
||||
0x57, 0x4e, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x44, 0x4f, 0x57, 0x4e, 0x4c, 0x49, 0x4e, 0x4b,
|
||||
0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x53, 0x49, 0x5a, 0x45, 0x10, 0x01, 0x12,
|
||||
0x10, 0x0a, 0x0c, 0x55, 0x50, 0x4c, 0x49, 0x4e, 0x4b, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x43, 0x10,
|
||||
0x02, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x4f, 0x57, 0x4e, 0x4c, 0x49, 0x4e, 0x4b, 0x5f, 0x43, 0x4f,
|
||||
0x44, 0x45, 0x43, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x4f, 0x54, 0x41, 0x41, 0x10, 0x04, 0x12,
|
||||
0x16, 0x0a, 0x12, 0x55, 0x50, 0x4c, 0x49, 0x4e, 0x4b, 0x5f, 0x46, 0x5f, 0x43, 0x4e, 0x54, 0x5f,
|
||||
0x52, 0x45, 0x53, 0x45, 0x54, 0x10, 0x05, 0x12, 0x0e, 0x0a, 0x0a, 0x55, 0x50, 0x4c, 0x49, 0x4e,
|
||||
0x4b, 0x5f, 0x4d, 0x49, 0x43, 0x10, 0x06, 0x12, 0x1f, 0x0a, 0x1b, 0x55, 0x50, 0x4c, 0x49, 0x4e,
|
||||
0x4b, 0x5f, 0x46, 0x5f, 0x43, 0x4e, 0x54, 0x5f, 0x52, 0x45, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x4d,
|
||||
0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x07, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x4f, 0x57, 0x4e,
|
||||
0x4c, 0x49, 0x4e, 0x4b, 0x5f, 0x47, 0x41, 0x54, 0x45, 0x57, 0x41, 0x59, 0x10, 0x08, 0x12, 0x18,
|
||||
0x0a, 0x14, 0x52, 0x45, 0x4c, 0x41, 0x59, 0x5f, 0x4e, 0x45, 0x57, 0x5f, 0x45, 0x4e, 0x44, 0x5f,
|
||||
0x44, 0x45, 0x56, 0x49, 0x43, 0x45, 0x10, 0x09, 0x12, 0x0e, 0x0a, 0x0a, 0x46, 0x5f, 0x43, 0x4e,
|
||||
0x54, 0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x10, 0x0a, 0x42, 0xbf, 0x01, 0x0a, 0x1d, 0x69, 0x6f, 0x2e,
|
||||
0x63, 0x68, 0x69, 0x72, 0x70, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x69,
|
||||
0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x10, 0x49, 0x6e, 0x74, 0x65,
|
||||
0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x33,
|
||||
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x72, 0x6f, 0x63, 0x61,
|
||||
0x61, 0x72, 0x2f, 0x63, 0x68, 0x69, 0x72, 0x70, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2f, 0x61, 0x70,
|
||||
0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x34, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0xaa, 0x02, 0x16, 0x43, 0x68, 0x69, 0x72, 0x70, 0x73, 0x74, 0x61, 0x63, 0x6b,
|
||||
0x2e, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xca, 0x02, 0x16, 0x43,
|
||||
0x68, 0x69, 0x72, 0x70, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x5c, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0xe2, 0x02, 0x22, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64,
|
||||
0x61, 0x74, 0x61, 0x5c, 0x43, 0x68, 0x69, 0x72, 0x70, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x5c, 0x49,
|
||||
0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x33,
|
||||
0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x18, 0x05, 0x20,
|
||||
0x01, 0x28, 0x05, 0x52, 0x06, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x12, 0x32, 0x0a, 0x15, 0x65,
|
||||
0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x73, 0x6f,
|
||||
0x75, 0x72, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x78, 0x74, 0x65,
|
||||
0x72, 0x6e, 0x61, 0x6c, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12,
|
||||
0x3a, 0x0a, 0x19, 0x62, 0x61, 0x74, 0x74, 0x65, 0x72, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c,
|
||||
0x5f, 0x75, 0x6e, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01,
|
||||
0x28, 0x08, 0x52, 0x17, 0x62, 0x61, 0x74, 0x74, 0x65, 0x72, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c,
|
||||
0x55, 0x6e, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x62,
|
||||
0x61, 0x74, 0x74, 0x65, 0x72, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x08, 0x20, 0x01,
|
||||
0x28, 0x02, 0x52, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x65, 0x72, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c,
|
||||
0x22, 0xd2, 0x01, 0x0a, 0x0d, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65,
|
||||
0x6e, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x64, 0x65, 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x65,
|
||||
0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2e, 0x0a,
|
||||
0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 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, 0x38, 0x0a,
|
||||
0x0b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01,
|
||||
0x28, 0x0b, 0x32, 0x17, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||
0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x64, 0x65, 0x76,
|
||||
0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2c, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d,
|
||||
0x6f, 0x6e, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa2, 0x02, 0x0a, 0x10, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72,
|
||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x64, 0x65,
|
||||
0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01,
|
||||
0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x65, 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,
|
||||
0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 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, 0x38, 0x0a, 0x0b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f,
|
||||
0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x69, 0x6e, 0x74,
|
||||
0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49,
|
||||
0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12,
|
||||
0x29, 0x0a, 0x10, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e,
|
||||
0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x69, 0x6e, 0x74, 0x65, 0x67,
|
||||
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x76,
|
||||
0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
|
||||
0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x6f, 0x62, 0x6a,
|
||||
0x65, 0x63, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
|
||||
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75,
|
||||
0x63, 0x74, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0xb4, 0x01, 0x0a, 0x0f, 0x44,
|
||||
0x6f, 0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x0e,
|
||||
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17,
|
||||
0x0a, 0x07, 0x64, 0x65, 0x76, 0x5f, 0x65, 0x75, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x06, 0x64, 0x65, 0x76, 0x45, 0x75, 0x69, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x66, 0x69,
|
||||
0x72, 0x6d, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x66,
|
||||
0x69, 0x72, 0x6d, 0x65, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x66, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18,
|
||||
0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x66, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04,
|
||||
0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61,
|
||||
0x12, 0x2f, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b,
|
||||
0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
|
||||
0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63,
|
||||
0x74, 0x2a, 0x2c, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x08, 0x0a,
|
||||
0x04, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x57, 0x41, 0x52, 0x4e, 0x49,
|
||||
0x4e, 0x47, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x2a,
|
||||
0xf7, 0x01, 0x0a, 0x07, 0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55,
|
||||
0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x44, 0x4f, 0x57, 0x4e,
|
||||
0x4c, 0x49, 0x4e, 0x4b, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x53, 0x49, 0x5a,
|
||||
0x45, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x55, 0x50, 0x4c, 0x49, 0x4e, 0x4b, 0x5f, 0x43, 0x4f,
|
||||
0x44, 0x45, 0x43, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x4f, 0x57, 0x4e, 0x4c, 0x49, 0x4e,
|
||||
0x4b, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x43, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x4f, 0x54, 0x41,
|
||||
0x41, 0x10, 0x04, 0x12, 0x16, 0x0a, 0x12, 0x55, 0x50, 0x4c, 0x49, 0x4e, 0x4b, 0x5f, 0x46, 0x5f,
|
||||
0x43, 0x4e, 0x54, 0x5f, 0x52, 0x45, 0x53, 0x45, 0x54, 0x10, 0x05, 0x12, 0x0e, 0x0a, 0x0a, 0x55,
|
||||
0x50, 0x4c, 0x49, 0x4e, 0x4b, 0x5f, 0x4d, 0x49, 0x43, 0x10, 0x06, 0x12, 0x1f, 0x0a, 0x1b, 0x55,
|
||||
0x50, 0x4c, 0x49, 0x4e, 0x4b, 0x5f, 0x46, 0x5f, 0x43, 0x4e, 0x54, 0x5f, 0x52, 0x45, 0x54, 0x52,
|
||||
0x41, 0x4e, 0x53, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x07, 0x12, 0x14, 0x0a, 0x10,
|
||||
0x44, 0x4f, 0x57, 0x4e, 0x4c, 0x49, 0x4e, 0x4b, 0x5f, 0x47, 0x41, 0x54, 0x45, 0x57, 0x41, 0x59,
|
||||
0x10, 0x08, 0x12, 0x18, 0x0a, 0x14, 0x52, 0x45, 0x4c, 0x41, 0x59, 0x5f, 0x4e, 0x45, 0x57, 0x5f,
|
||||
0x45, 0x4e, 0x44, 0x5f, 0x44, 0x45, 0x56, 0x49, 0x43, 0x45, 0x10, 0x09, 0x12, 0x0e, 0x0a, 0x0a,
|
||||
0x46, 0x5f, 0x43, 0x4e, 0x54, 0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x10, 0x0a, 0x12, 0x0b, 0x0a, 0x07,
|
||||
0x45, 0x58, 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, 0x0b, 0x42, 0xbf, 0x01, 0x0a, 0x1d, 0x69, 0x6f,
|
||||
0x2e, 0x63, 0x68, 0x69, 0x72, 0x70, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x61, 0x70, 0x69, 0x2e,
|
||||
0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x10, 0x49, 0x6e, 0x74,
|
||||
0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a,
|
||||
0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x72, 0x6f, 0x63,
|
||||
0x61, 0x61, 0x72, 0x2f, 0x63, 0x68, 0x69, 0x72, 0x70, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2f, 0x61,
|
||||
0x70, 0x69, 0x2f, 0x67, 0x6f, 0x2f, 0x76, 0x34, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61,
|
||||
0x74, 0x69, 0x6f, 0x6e, 0xaa, 0x02, 0x16, 0x43, 0x68, 0x69, 0x72, 0x70, 0x73, 0x74, 0x61, 0x63,
|
||||
0x6b, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xca, 0x02, 0x16,
|
||||
0x43, 0x68, 0x69, 0x72, 0x70, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x5c, 0x49, 0x6e, 0x74, 0x65, 0x67,
|
||||
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xe2, 0x02, 0x22, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61,
|
||||
0x64, 0x61, 0x74, 0x61, 0x5c, 0x43, 0x68, 0x69, 0x72, 0x70, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x5c,
|
||||
0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
@ -1611,7 +1619,7 @@ func file_integration_integration_proto_rawDescGZIP() []byte {
|
||||
|
||||
var file_integration_integration_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
||||
var file_integration_integration_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
|
||||
var file_integration_integration_proto_goTypes = []interface{}{
|
||||
var file_integration_integration_proto_goTypes = []any{
|
||||
(LogLevel)(0), // 0: integration.LogLevel
|
||||
(LogCode)(0), // 1: integration.LogCode
|
||||
(*DeviceInfo)(nil), // 2: integration.DeviceInfo
|
||||
@ -1681,140 +1689,6 @@ func file_integration_integration_proto_init() {
|
||||
if File_integration_integration_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_integration_integration_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DeviceInfo); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_integration_integration_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UplinkRelayRxInfo); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_integration_integration_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*UplinkEvent); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_integration_integration_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*JoinEvent); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_integration_integration_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*AckEvent); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_integration_integration_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*TxAckEvent); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_integration_integration_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*LogEvent); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_integration_integration_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*StatusEvent); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_integration_integration_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*LocationEvent); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_integration_integration_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*IntegrationEvent); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_integration_integration_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*DownlinkCommand); 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{
|
||||
|
30
api/go/stream/api_request.pb.go
vendored
30
api/go/stream/api_request.pb.go
vendored
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.34.1
|
||||
// protoc v4.24.4
|
||||
// protoc-gen-go v1.35.1
|
||||
// protoc v5.28.3
|
||||
// source: stream/api_request.proto
|
||||
|
||||
package stream
|
||||
@ -38,11 +38,9 @@ type ApiRequestLog struct {
|
||||
|
||||
func (x *ApiRequestLog) Reset() {
|
||||
*x = ApiRequestLog{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_stream_api_request_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_stream_api_request_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *ApiRequestLog) String() string {
|
||||
@ -53,7 +51,7 @@ func (*ApiRequestLog) ProtoMessage() {}
|
||||
|
||||
func (x *ApiRequestLog) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_stream_api_request_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -137,7 +135,7 @@ func file_stream_api_request_proto_rawDescGZIP() []byte {
|
||||
}
|
||||
|
||||
var file_stream_api_request_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_stream_api_request_proto_goTypes = []interface{}{
|
||||
var file_stream_api_request_proto_goTypes = []any{
|
||||
(*ApiRequestLog)(nil), // 0: stream.ApiRequestLog
|
||||
nil, // 1: stream.ApiRequestLog.MetadataEntry
|
||||
}
|
||||
@ -155,20 +153,6 @@ func file_stream_api_request_proto_init() {
|
||||
if File_stream_api_request_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_stream_api_request_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ApiRequestLog); 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{
|
||||
|
30
api/go/stream/backend_interfaces.pb.go
vendored
30
api/go/stream/backend_interfaces.pb.go
vendored
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.34.1
|
||||
// protoc v4.24.4
|
||||
// protoc-gen-go v1.35.1
|
||||
// protoc v5.28.3
|
||||
// source: stream/backend_interfaces.proto
|
||||
|
||||
package stream
|
||||
@ -48,11 +48,9 @@ type BackendInterfacesRequest struct {
|
||||
|
||||
func (x *BackendInterfacesRequest) Reset() {
|
||||
*x = BackendInterfacesRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_stream_backend_interfaces_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_stream_backend_interfaces_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *BackendInterfacesRequest) String() string {
|
||||
@ -63,7 +61,7 @@ func (*BackendInterfacesRequest) ProtoMessage() {}
|
||||
|
||||
func (x *BackendInterfacesRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_stream_backend_interfaces_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -198,7 +196,7 @@ func file_stream_backend_interfaces_proto_rawDescGZIP() []byte {
|
||||
}
|
||||
|
||||
var file_stream_backend_interfaces_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_stream_backend_interfaces_proto_goTypes = []interface{}{
|
||||
var file_stream_backend_interfaces_proto_goTypes = []any{
|
||||
(*BackendInterfacesRequest)(nil), // 0: stream.BackendInterfacesRequest
|
||||
(*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp
|
||||
}
|
||||
@ -216,20 +214,6 @@ func file_stream_backend_interfaces_proto_init() {
|
||||
if File_stream_backend_interfaces_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_stream_backend_interfaces_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*BackendInterfacesRequest); 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{
|
||||
|
52
api/go/stream/frame.pb.go
vendored
52
api/go/stream/frame.pb.go
vendored
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.34.1
|
||||
// protoc v4.24.4
|
||||
// protoc-gen-go v1.35.1
|
||||
// protoc v5.28.3
|
||||
// source: stream/frame.proto
|
||||
|
||||
package stream
|
||||
@ -50,11 +50,9 @@ type UplinkFrameLog struct {
|
||||
|
||||
func (x *UplinkFrameLog) Reset() {
|
||||
*x = UplinkFrameLog{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_stream_frame_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_stream_frame_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *UplinkFrameLog) String() string {
|
||||
@ -65,7 +63,7 @@ func (*UplinkFrameLog) ProtoMessage() {}
|
||||
|
||||
func (x *UplinkFrameLog) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_stream_frame_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -172,11 +170,9 @@ type DownlinkFrameLog struct {
|
||||
|
||||
func (x *DownlinkFrameLog) Reset() {
|
||||
*x = DownlinkFrameLog{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_stream_frame_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_stream_frame_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *DownlinkFrameLog) String() string {
|
||||
@ -187,7 +183,7 @@ func (*DownlinkFrameLog) ProtoMessage() {}
|
||||
|
||||
func (x *DownlinkFrameLog) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_stream_frame_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -355,7 +351,7 @@ func file_stream_frame_proto_rawDescGZIP() []byte {
|
||||
}
|
||||
|
||||
var file_stream_frame_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_stream_frame_proto_goTypes = []interface{}{
|
||||
var file_stream_frame_proto_goTypes = []any{
|
||||
(*UplinkFrameLog)(nil), // 0: stream.UplinkFrameLog
|
||||
(*DownlinkFrameLog)(nil), // 1: stream.DownlinkFrameLog
|
||||
(*gw.UplinkTxInfo)(nil), // 2: gw.UplinkTxInfo
|
||||
@ -384,32 +380,6 @@ func file_stream_frame_proto_init() {
|
||||
if File_stream_frame_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_stream_frame_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_stream_frame_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{
|
||||
|
52
api/go/stream/meta.pb.go
vendored
52
api/go/stream/meta.pb.go
vendored
@ -1,7 +1,7 @@
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.34.1
|
||||
// protoc v4.24.4
|
||||
// protoc-gen-go v1.35.1
|
||||
// protoc v5.28.3
|
||||
// source: stream/meta.proto
|
||||
|
||||
package stream
|
||||
@ -45,11 +45,9 @@ type UplinkMeta struct {
|
||||
|
||||
func (x *UplinkMeta) Reset() {
|
||||
*x = UplinkMeta{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_stream_meta_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_stream_meta_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *UplinkMeta) String() string {
|
||||
@ -60,7 +58,7 @@ func (*UplinkMeta) ProtoMessage() {}
|
||||
|
||||
func (x *UplinkMeta) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_stream_meta_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -149,11 +147,9 @@ type DownlinkMeta struct {
|
||||
|
||||
func (x *DownlinkMeta) Reset() {
|
||||
*x = DownlinkMeta{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_stream_meta_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
mi := &file_stream_meta_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
|
||||
func (x *DownlinkMeta) String() string {
|
||||
@ -164,7 +160,7 @@ func (*DownlinkMeta) ProtoMessage() {}
|
||||
|
||||
func (x *DownlinkMeta) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_stream_meta_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
@ -314,7 +310,7 @@ func file_stream_meta_proto_rawDescGZIP() []byte {
|
||||
}
|
||||
|
||||
var file_stream_meta_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_stream_meta_proto_goTypes = []interface{}{
|
||||
var file_stream_meta_proto_goTypes = []any{
|
||||
(*UplinkMeta)(nil), // 0: stream.UplinkMeta
|
||||
(*DownlinkMeta)(nil), // 1: stream.DownlinkMeta
|
||||
(*gw.UplinkTxInfo)(nil), // 2: gw.UplinkTxInfo
|
||||
@ -340,32 +336,6 @@ func file_stream_meta_proto_init() {
|
||||
if File_stream_meta_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_stream_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_stream_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{
|
||||
|
1
api/grpc-web/Makefile
vendored
1
api/grpc-web/Makefile
vendored
@ -29,6 +29,7 @@ api:
|
||||
$(PROTOC_PATH) $(PROTOC_ARGS) ../proto/api/gateway.proto
|
||||
$(PROTOC_PATH) $(PROTOC_ARGS) ../proto/api/multicast_group.proto
|
||||
$(PROTOC_PATH) $(PROTOC_ARGS) ../proto/api/relay.proto
|
||||
$(PROTOC_PATH) $(PROTOC_ARGS) ../proto/api/fuota.proto
|
||||
|
||||
integration:
|
||||
mkdir -p integration
|
||||
|
2
api/grpc-web/package.json
vendored
2
api/grpc-web/package.json
vendored
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@chirpstack/chirpstack-api-grpc-web",
|
||||
"version": "4.9.0",
|
||||
"version": "4.12.0-test.3",
|
||||
"description": "Chirpstack gRPC-web API",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
|
2
api/java/build.gradle.kts
vendored
2
api/java/build.gradle.kts
vendored
@ -8,7 +8,7 @@ plugins {
|
||||
}
|
||||
|
||||
group = "io.chirpstack"
|
||||
version = "4.9.0"
|
||||
version = "4.12.0-test.3"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
|
1
api/js/Makefile
vendored
1
api/js/Makefile
vendored
@ -28,6 +28,7 @@ api:
|
||||
$(PROTOC_PATH) ${PROTOC_GRPC_ARGS} ../proto/api/gateway.proto
|
||||
$(PROTOC_PATH) ${PROTOC_GRPC_ARGS} ../proto/api/multicast_group.proto
|
||||
$(PROTOC_PATH) ${PROTOC_GRPC_ARGS} ../proto/api/relay.proto
|
||||
$(PROTOC_PATH) ${PROTOC_GRPC_ARGS} ../proto/api/fuota.proto
|
||||
|
||||
integration:
|
||||
$(PROTOC_PATH) ${PROTOC_ARGS} ../proto/integration/integration.proto
|
||||
|
2
api/js/package.json
vendored
2
api/js/package.json
vendored
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@chirpstack/chirpstack-api",
|
||||
"version": "4.9.0",
|
||||
"version": "4.12.0-test.3",
|
||||
"description": "Chirpstack JS and TS API",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
|
2
api/kotlin/build.gradle.kts
vendored
2
api/kotlin/build.gradle.kts
vendored
@ -9,7 +9,7 @@ plugins {
|
||||
}
|
||||
|
||||
group = "io.chirpstack"
|
||||
version = "4.9.0"
|
||||
version = "4.12.0-test.3"
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
|
2
api/php/composer.json
vendored
2
api/php/composer.json
vendored
@ -3,7 +3,7 @@
|
||||
"description": "Chirpstack PHP API",
|
||||
"license": "MIT",
|
||||
"type": "library",
|
||||
"version": "4.9.0",
|
||||
"version": "4.12.0-test.3",
|
||||
"require": {
|
||||
"php": ">=7.0.0",
|
||||
"grpc/grpc": "^v1.57.0",
|
||||
|
51
api/proto/api/application.proto
vendored
51
api/proto/api/application.proto
vendored
@ -427,6 +427,20 @@ service ApplicationService {
|
||||
post : "/api/applications/{application_id}/integrations/mqtt/certificate"
|
||||
};
|
||||
}
|
||||
|
||||
// List device-profiles used within the given application.
|
||||
rpc ListDeviceProfiles(ListApplicationDeviceProfilesRequest) returns (ListApplicationDeviceProfilesResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/api/applications/{application_id}/device-profiles"
|
||||
};
|
||||
}
|
||||
|
||||
// List device tags used within the given application.
|
||||
rpc ListDeviceTags(ListApplicationDeviceTagsRequest) returns (ListApplicationDeviceTagsResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/api/applications/{application_id}/device-tags"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
enum Encoding {
|
||||
@ -529,6 +543,7 @@ message DeleteApplicationRequest {
|
||||
|
||||
message ListApplicationsRequest {
|
||||
// Max number of applications to return in the result-set.
|
||||
// If not set, it will be treated as 0, and the response will only return the total_count.
|
||||
uint32 limit = 1;
|
||||
|
||||
// Offset in the result-set (for pagination).
|
||||
@ -1098,3 +1113,39 @@ message GenerateMqttIntegrationClientCertificateResponse {
|
||||
// Expires at defines the expiration date of the certificate.
|
||||
google.protobuf.Timestamp expires_at = 4;
|
||||
}
|
||||
|
||||
message ApplicationDeviceProfileListItem {
|
||||
// Device-profile ID (UUID).
|
||||
string id = 1;
|
||||
|
||||
// Name.
|
||||
string name = 2;
|
||||
}
|
||||
|
||||
message ListApplicationDeviceProfilesRequest {
|
||||
// Application ID (UUID).
|
||||
string application_id = 1;
|
||||
};
|
||||
|
||||
message ListApplicationDeviceProfilesResponse {
|
||||
// Device-profiles.
|
||||
repeated ApplicationDeviceProfileListItem result = 1;
|
||||
}
|
||||
|
||||
message ApplicationDeviceTagListItem {
|
||||
// Tag key.
|
||||
string key = 1;
|
||||
|
||||
// Used values.
|
||||
repeated string values = 2;
|
||||
}
|
||||
|
||||
message ListApplicationDeviceTagsRequest {
|
||||
// Application ID (UUID).
|
||||
string application_id = 1;
|
||||
}
|
||||
|
||||
message ListApplicationDeviceTagsResponse {
|
||||
// Device tags.
|
||||
repeated ApplicationDeviceTagListItem result = 1;
|
||||
}
|
||||
|
28
api/proto/api/device.proto
vendored
28
api/proto/api/device.proto
vendored
@ -262,6 +262,9 @@ message DeviceListItem {
|
||||
|
||||
// Device status.
|
||||
DeviceStatus device_status = 9;
|
||||
|
||||
// Device tags.
|
||||
map<string, string> tags = 10;
|
||||
}
|
||||
|
||||
message DeviceKeys {
|
||||
@ -275,6 +278,11 @@ message DeviceKeys {
|
||||
// Application root key (128 bit).
|
||||
// Note: This field only needs to be set for LoRaWAN 1.1.x devices!
|
||||
string app_key = 3;
|
||||
|
||||
// Gen App Key (128 bit).
|
||||
// Note: This field only needs to be set for LoRaWAN 1.0.x devices that
|
||||
// implement TS005 (remote multicast setup).
|
||||
string gen_app_key = 4;
|
||||
}
|
||||
|
||||
message CreateDeviceRequest {
|
||||
@ -319,6 +327,7 @@ message DeleteDeviceRequest {
|
||||
|
||||
message ListDevicesRequest {
|
||||
// Max number of devices to return in the result-set.
|
||||
// If not set, it will be treated as 0, and the response will only return the total_count.
|
||||
uint32 limit = 1;
|
||||
|
||||
// Offset in the result-set (for pagination).
|
||||
@ -332,6 +341,25 @@ message ListDevicesRequest {
|
||||
|
||||
// Multicst-group ID (UUID) to filter devices on.
|
||||
string multicast_group_id = 5;
|
||||
|
||||
enum OrderBy {
|
||||
NAME = 0;
|
||||
DEV_EUI = 1;
|
||||
LAST_SEEN_AT = 2;
|
||||
DEVICE_PROFILE_NAME = 3;
|
||||
}
|
||||
|
||||
// If set, the given value will be used to sort by (optional).
|
||||
OrderBy order_by = 6;
|
||||
|
||||
// If set, the sorting direction will be decending (default = ascending) (optional).
|
||||
bool order_by_desc = 7;
|
||||
|
||||
// Tags to filter devices on.
|
||||
map<string, string> tags = 8;
|
||||
|
||||
// Device-profile ID (UUID) to filter devices on.
|
||||
string device_profile_id = 9;
|
||||
}
|
||||
|
||||
message ListDevicesResponse {
|
||||
|
57
api/proto/api/device_profile.proto
vendored
57
api/proto/api/device_profile.proto
vendored
@ -98,6 +98,39 @@ enum RelayModeActivation {
|
||||
END_DEVICE_CONTROLLED = 3;
|
||||
}
|
||||
|
||||
enum Ts003Version {
|
||||
// Not implemented.
|
||||
TS003_NOT_IMPLEMENTED = 0;
|
||||
|
||||
// v1.0.0.
|
||||
TS003_V100 = 1;
|
||||
|
||||
// v2.0.0
|
||||
TS003_v200 = 2;
|
||||
}
|
||||
|
||||
enum Ts004Version {
|
||||
// Not implemented.
|
||||
TS004_NOT_IMPLEMENTED = 0;
|
||||
|
||||
// v1.0.0.
|
||||
TS004_V100 = 1;
|
||||
|
||||
// v2.0.0
|
||||
TS004_V200 = 2;
|
||||
}
|
||||
|
||||
enum Ts005Version {
|
||||
// Not implemented.
|
||||
TS005_NOT_IMPLEMENTED = 0;
|
||||
|
||||
// v1.0.0.
|
||||
TS005_V100 = 1;
|
||||
|
||||
// v2.0.0
|
||||
TS005_V200 = 2;
|
||||
}
|
||||
|
||||
// DeviceProfileService is the service providing API methods for managing
|
||||
// device-profiles.
|
||||
service DeviceProfileService {
|
||||
@ -421,6 +454,9 @@ message DeviceProfile {
|
||||
// it.
|
||||
// Valid options are 1 - 15 (0 = always use system RX1 Delay).
|
||||
uint32 rx1_delay = 53;
|
||||
|
||||
// Application Layer parameters.
|
||||
AppLayerParams app_layer_params = 54;
|
||||
}
|
||||
|
||||
message Measurement {
|
||||
@ -431,6 +467,26 @@ message Measurement {
|
||||
MeasurementKind kind = 3;
|
||||
}
|
||||
|
||||
message AppLayerParams {
|
||||
// TS003 version (Application Layer Clock Sync).
|
||||
Ts003Version ts003_version = 1;
|
||||
|
||||
// TS003 fPort.
|
||||
uint32 ts003_f_port = 2;
|
||||
|
||||
// TS004 version (Fragmented Data Block Transport).
|
||||
Ts004Version ts004_version = 3;
|
||||
|
||||
// TS004 fPort.
|
||||
uint32 ts004_f_port = 4;
|
||||
|
||||
// TS005 version (Remote Multicast Setup).
|
||||
Ts005Version ts005_version = 5;
|
||||
|
||||
// TS005 fPort.
|
||||
uint32 ts005_f_port = 6;
|
||||
}
|
||||
|
||||
message DeviceProfileListItem {
|
||||
// Device-profile ID (UUID).
|
||||
string id = 1;
|
||||
@ -501,6 +557,7 @@ message DeleteDeviceProfileRequest {
|
||||
|
||||
message ListDeviceProfilesRequest {
|
||||
// Max number of device-profiles to return in the result-set.
|
||||
// If not set, it will be treated as 0, and the response will only return the total_count.
|
||||
uint32 limit = 1;
|
||||
|
||||
// Offset in the result-set (for pagination).
|
||||
|
1
api/proto/api/device_profile_template.proto
vendored
1
api/proto/api/device_profile_template.proto
vendored
@ -231,6 +231,7 @@ message DeleteDeviceProfileTemplateRequest {
|
||||
|
||||
message ListDeviceProfileTemplatesRequest {
|
||||
// Max number of device-profile templates to return in the result-set.
|
||||
// If not set, it will be treated as 0, and the response will only return the total_count.
|
||||
uint32 limit = 1;
|
||||
|
||||
// Offset in the result-set (for pagination).
|
||||
|
401
api/proto/api/fuota.proto
vendored
Normal file
401
api/proto/api/fuota.proto
vendored
Normal file
@ -0,0 +1,401 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package api;
|
||||
|
||||
option go_package = "github.com/chirpstack/chirpstack/api/go/v4/api";
|
||||
option java_package = "io.chirpstack.api";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "FuotaProto";
|
||||
option csharp_namespace = "Chirpstack.Api";
|
||||
option php_namespace = "Chirpstack\\Api";
|
||||
option php_metadata_namespace = "GPBMetadata\\Chirpstack\\Api";
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "google/protobuf/empty.proto";
|
||||
import "common/common.proto";
|
||||
import "api/multicast_group.proto";
|
||||
|
||||
// FuotaService is the service providing API methods for FUOTA deployments.
|
||||
service FuotaService {
|
||||
// Create the given FUOTA deployment.
|
||||
rpc CreateDeployment(CreateFuotaDeploymentRequest) returns (CreateFuotaDeploymentResponse) {}
|
||||
|
||||
// Get the FUOTA deployment for the given ID.
|
||||
rpc GetDeployment(GetFuotaDeploymentRequest) returns (GetFuotaDeploymentResponse) {}
|
||||
|
||||
// Update the given FUOTA deployment.
|
||||
rpc UpdateDeployment(UpdateFuotaDeploymentRequest) returns (google.protobuf.Empty) {}
|
||||
|
||||
// Delete the FUOTA deployment for the given ID.
|
||||
rpc DeleteDeployment(DeleteFuotaDeploymentRequest) returns (google.protobuf.Empty) {}
|
||||
|
||||
// Start the FUOTA deployment.
|
||||
rpc StartDeployment(StartFuotaDeploymentRequest) returns (google.protobuf.Empty) {}
|
||||
|
||||
// List the FUOTA deployments.
|
||||
rpc ListDeployments(ListFuotaDeploymentsRequest) returns (ListFuotaDeploymentsResponse) {}
|
||||
|
||||
// Add the given DevEUIs to the FUOTA deployment.
|
||||
rpc AddDevices(AddDevicesToFuotaDeploymentRequest) returns (google.protobuf.Empty) {}
|
||||
|
||||
// Remove the given DevEUIs from the FUOTA deployment.
|
||||
rpc RemoveDevices(RemoveDevicesFromFuotaDeploymentRequest) returns (google.protobuf.Empty) {}
|
||||
|
||||
// List FUOTA Deployment devices.
|
||||
rpc ListDevices(ListFuotaDeploymentDevicesRequest) returns (ListFuotaDeploymentDevicesResponse) {}
|
||||
|
||||
// Add the given Gateway IDs to the FUOTA deployment.
|
||||
// By default, ChirpStack will automatically select the minimum amount of
|
||||
// gateways needed to cover all devices within the multicast-group. Setting
|
||||
// the gateways manually overrides this behaviour.
|
||||
rpc AddGateways(AddGatewaysToFuotaDeploymentRequest) returns (google.protobuf.Empty) {}
|
||||
|
||||
// List the gateways added to the FUOTA deployment.
|
||||
rpc ListGateways(ListFuotaDeploymentGatewaysRequest) returns (ListFuotaDeploymentGatewaysResponse) {}
|
||||
|
||||
// Remove the given Gateway IDs from the FUOTA deployment.
|
||||
rpc RemoveGateways(RemoveGatewaysFromFuotaDeploymentRequest) returns (google.protobuf.Empty) {}
|
||||
// GetLogs returns the logs for the FUOTA deployment.
|
||||
|
||||
// List jobs for the given FUOTA deployment.
|
||||
rpc ListJobs(ListFuotaDeploymentJobsRequest) returns (ListFuotaDeploymentJobsResponse) {}
|
||||
}
|
||||
|
||||
enum RequestFragmentationSessionStatus {
|
||||
// Do not request the fragmentation-session status.
|
||||
NO_REQUEST = 0;
|
||||
|
||||
// Enqueue the fragmentation-session status request command directly after
|
||||
// enqueueing the fragmentation-session fragments. This is the recommended
|
||||
// option for Class-A devices as the status request will stay in the
|
||||
// downlink queue until the device sends its next uplink.
|
||||
AFTER_FRAGMENT_ENQUEUE = 1;
|
||||
|
||||
// Enqueue the fragmentation-session status request after the multicast
|
||||
// session-timeout. This is the recommended option for Class-B and -C
|
||||
// devices as selecting AFTER_FRAGMENT_ENQUEUE will likely cause the NS
|
||||
// to schedule the downlink frame during the FUOTA multicast-session.
|
||||
AFTER_SESSION_TIMEOUT = 2;
|
||||
|
||||
}
|
||||
|
||||
message FuotaDeployment {
|
||||
// Deployment ID.
|
||||
// This value is automatically set on create.
|
||||
string id = 1;
|
||||
|
||||
// Application ID.
|
||||
string application_id = 2;
|
||||
|
||||
// Device-profile ID.
|
||||
string device_profile_id = 3;
|
||||
|
||||
// Deployment name.
|
||||
string name = 4;
|
||||
|
||||
// Multicast-group type.
|
||||
MulticastGroupType multicast_group_type = 5;
|
||||
|
||||
// Multicast-group scheduling type (Class-C only).
|
||||
MulticastGroupSchedulingType multicast_class_c_scheduling_type = 6;
|
||||
|
||||
// Multicast data-rate.
|
||||
uint32 multicast_dr = 7;
|
||||
|
||||
// Multicast ping-slot period (Class-B only).
|
||||
uint32 multicast_class_b_ping_slot_nb_k = 8;
|
||||
|
||||
// Multicast frequency (Hz).
|
||||
uint32 multicast_frequency = 9;
|
||||
|
||||
// Multicast timeout.
|
||||
// This defines the timeout of the multicast-session.
|
||||
// Please refer to the Remote Multicast Setup specification as this field
|
||||
// has a different meaning for Class-B and Class-C groups.
|
||||
uint32 multicast_timeout = 10;
|
||||
|
||||
// Calculate multicast timeout.
|
||||
// If set to true, ChirpStack will calculate the multicast-timeout.
|
||||
bool calculate_multicast_timeout = 11;
|
||||
|
||||
// The number of times ChirpStack will retry an unicast command
|
||||
// before it considers it to be failed.
|
||||
uint32 unicast_max_retry_count = 12;
|
||||
|
||||
// Fragmentation size.
|
||||
// This defines the size of each payload fragment. Please refer to the
|
||||
// Regional Parameters specification for the maximum payload sizes
|
||||
// per data-rate and region.
|
||||
uint32 fragmentation_fragment_size = 13;
|
||||
|
||||
// Calculate fragmentation size.
|
||||
// If set to true, ChirpStack will calculate the fragmentation size.
|
||||
bool calculate_fragmentation_fragment_size = 14;
|
||||
|
||||
// Fragmentation redundancy percentage.
|
||||
// The number represents the percentage (0 - 100) of redundant messages
|
||||
// to send.
|
||||
uint32 fragmentation_redundancy_percentage = 15;
|
||||
|
||||
// Fragmentation session index.
|
||||
uint32 fragmentation_session_index = 16;
|
||||
|
||||
// Fragmentation matrix.
|
||||
uint32 fragmentation_matrix = 17;
|
||||
|
||||
// Block ack delay.
|
||||
uint32 fragmentation_block_ack_delay = 18;
|
||||
|
||||
// Descriptor (4 bytes).
|
||||
bytes fragmentation_descriptor = 19;
|
||||
|
||||
// Request fragmentation session status.
|
||||
RequestFragmentationSessionStatus request_fragmentation_session_status = 20;
|
||||
|
||||
// Payload.
|
||||
// The FUOTA payload to send.
|
||||
bytes payload = 21;
|
||||
|
||||
// Set device tags on complete.
|
||||
map<string, string> on_complete_set_device_tags = 22;
|
||||
}
|
||||
|
||||
message FuotaDeploymentListItem {
|
||||
// ID.
|
||||
string id = 1;
|
||||
|
||||
// Created at timestamp.
|
||||
google.protobuf.Timestamp created_at = 2;
|
||||
|
||||
// Updated at timestamp.
|
||||
google.protobuf.Timestamp updated_at = 3;
|
||||
|
||||
// Started at timestamp.
|
||||
google.protobuf.Timestamp started_at = 4;
|
||||
|
||||
// Completed at timestamp.
|
||||
google.protobuf.Timestamp completed_at = 5;
|
||||
|
||||
// Name.
|
||||
string name = 6;
|
||||
}
|
||||
|
||||
message FuotaDeploymentDeviceListItem {
|
||||
// ID.
|
||||
string fuota_deployment_id = 1;
|
||||
|
||||
// DevEUI.
|
||||
string dev_eui = 2;
|
||||
|
||||
// Created at timestamp.
|
||||
google.protobuf.Timestamp created_at = 3;
|
||||
|
||||
// Completed at timestamp.
|
||||
google.protobuf.Timestamp completed_at = 4;
|
||||
|
||||
// McGroupSetup completed at timestamp.
|
||||
google.protobuf.Timestamp mc_group_setup_completed_at = 5;
|
||||
|
||||
// McSession completed at timestamp.
|
||||
google.protobuf.Timestamp mc_session_completed_at = 6;
|
||||
|
||||
// FragSessionSetup completed at timestamp.
|
||||
google.protobuf.Timestamp frag_session_setup_completed_at = 7;
|
||||
|
||||
// FragStatus completed at timestamp.
|
||||
google.protobuf.Timestamp frag_status_completed_at = 8;
|
||||
|
||||
// Error message.
|
||||
string error_msg = 9;
|
||||
}
|
||||
|
||||
message FuotaDeploymentGatewayListItem {
|
||||
// ID.
|
||||
string fuota_deployment_id = 1;
|
||||
|
||||
// Gateway ID.
|
||||
string gateway_id = 2;
|
||||
|
||||
// Created at timestamp.
|
||||
google.protobuf.Timestamp created_at = 3;
|
||||
}
|
||||
|
||||
message CreateFuotaDeploymentRequest {
|
||||
// Deployment.
|
||||
FuotaDeployment deployment = 1;
|
||||
}
|
||||
|
||||
message CreateFuotaDeploymentResponse {
|
||||
// ID of the created deployment.
|
||||
string id = 1;
|
||||
}
|
||||
|
||||
message GetFuotaDeploymentRequest {
|
||||
// FUOTA Deployment ID.
|
||||
string id = 1;
|
||||
}
|
||||
|
||||
message GetFuotaDeploymentResponse {
|
||||
// FUOTA Deployment.
|
||||
FuotaDeployment deployment = 1;
|
||||
|
||||
// Created at timestamp.
|
||||
google.protobuf.Timestamp created_at = 2;
|
||||
|
||||
// Updated at timestamp.
|
||||
google.protobuf.Timestamp updated_at = 3;
|
||||
|
||||
// Started at timestamp.
|
||||
google.protobuf.Timestamp started_at = 4;
|
||||
|
||||
// Completed at timestamp.
|
||||
google.protobuf.Timestamp completed_at = 5;
|
||||
}
|
||||
|
||||
message UpdateFuotaDeploymentRequest {
|
||||
// Deployment.
|
||||
FuotaDeployment deployment = 1;
|
||||
}
|
||||
|
||||
message DeleteFuotaDeploymentRequest {
|
||||
// FUOTA deployment ID.
|
||||
string id = 1;
|
||||
}
|
||||
|
||||
message StartFuotaDeploymentRequest {
|
||||
// FUOTA deployment ID.
|
||||
string id = 1;
|
||||
}
|
||||
|
||||
message ListFuotaDeploymentsRequest {
|
||||
// Max number of FUOTA deployments to return in the result-set.
|
||||
// If not set, it will be treated as 0, and the response will only return the total_count.
|
||||
uint32 limit = 1;
|
||||
|
||||
// Offset in the result-set (for pagination).
|
||||
uint32 offset = 2;
|
||||
|
||||
// Application ID to list the FUOTA Deployments for.
|
||||
// This filter is mandatory.
|
||||
string application_id = 3;
|
||||
}
|
||||
|
||||
message ListFuotaDeploymentsResponse {
|
||||
// Total number of FUOTA Deployments.
|
||||
uint32 total_count = 1;
|
||||
|
||||
// Result-test.
|
||||
repeated FuotaDeploymentListItem result = 2;
|
||||
}
|
||||
|
||||
message AddDevicesToFuotaDeploymentRequest {
|
||||
// FUOTA Deployment ID.
|
||||
string fuota_deployment_id = 1;
|
||||
|
||||
// DevEUIs.
|
||||
// Note that the DevEUIs must share the same device-profile as assigned to
|
||||
// the FUOTA Deployment.
|
||||
repeated string dev_euis = 2;
|
||||
}
|
||||
|
||||
message RemoveDevicesFromFuotaDeploymentRequest {
|
||||
// FUOTA Deployment ID.
|
||||
string fuota_deployment_id = 1;
|
||||
|
||||
// DevEUIs.
|
||||
repeated string dev_euis = 2;
|
||||
}
|
||||
|
||||
message ListFuotaDeploymentDevicesRequest {
|
||||
// Max number of devices to return in the result-set.
|
||||
// If not set, it will be treated as 0, and the response will only return the total_count.
|
||||
uint32 limit = 1;
|
||||
|
||||
// Offset in the result-set (for pagination).
|
||||
uint32 offset = 2;
|
||||
|
||||
// FUOTA Deployment ID.
|
||||
string fuota_deployment_id = 3;
|
||||
}
|
||||
|
||||
message ListFuotaDeploymentDevicesResponse {
|
||||
// Total number of devices.
|
||||
uint32 total_count = 1;
|
||||
|
||||
// Result-set.
|
||||
repeated FuotaDeploymentDeviceListItem result = 2;
|
||||
}
|
||||
|
||||
message AddGatewaysToFuotaDeploymentRequest {
|
||||
// FUOTA Deployment ID.
|
||||
string fuota_deployment_id = 1;
|
||||
|
||||
// Gateway IDs.
|
||||
// Note that the Gateways must be under the same tenant as the FUOTA Deployment.
|
||||
repeated string gateway_ids = 2;
|
||||
}
|
||||
|
||||
message RemoveGatewaysFromFuotaDeploymentRequest {
|
||||
// FUOTA Deployment ID.
|
||||
string fuota_deployment_id = 1;
|
||||
|
||||
// Gateway IDs.
|
||||
repeated string gateway_ids = 2;
|
||||
}
|
||||
|
||||
message ListFuotaDeploymentGatewaysRequest {
|
||||
// Max number of gateways to return in the result-set.
|
||||
// If not set, it will be treated as 0, and the response will only return the total_count.
|
||||
uint32 limit = 1;
|
||||
|
||||
// Offset in the result-set (for pagination).
|
||||
uint32 offset = 2;
|
||||
|
||||
// FUOTA Deployment ID.
|
||||
string fuota_deployment_id = 3;
|
||||
}
|
||||
|
||||
message ListFuotaDeploymentGatewaysResponse {
|
||||
// Total number of gateways.
|
||||
uint32 total_count = 1;
|
||||
|
||||
// Result-set.
|
||||
repeated FuotaDeploymentGatewayListItem result = 2;
|
||||
}
|
||||
|
||||
message ListFuotaDeploymentJobsRequest {
|
||||
// FUOTA Deployment ID.
|
||||
string fuota_deployment_id = 1;
|
||||
}
|
||||
|
||||
message ListFuotaDeploymentJobsResponse {
|
||||
// Jobs.
|
||||
repeated FuotaDeploymentJob jobs = 1;
|
||||
}
|
||||
|
||||
message FuotaDeploymentJob {
|
||||
// Job identifier.
|
||||
string job = 1;
|
||||
|
||||
// Created at.
|
||||
google.protobuf.Timestamp created_at = 2;
|
||||
|
||||
// Completed at.
|
||||
google.protobuf.Timestamp completed_at = 3;
|
||||
|
||||
// Max. retry count.
|
||||
uint32 max_retry_count = 4;
|
||||
|
||||
// Attempt count.
|
||||
uint32 attempt_count = 5;
|
||||
|
||||
// Scheduler run after.
|
||||
google.protobuf.Timestamp scheduler_run_after = 6;
|
||||
|
||||
// Warning message.
|
||||
string warning_msg = 7;
|
||||
|
||||
// Error message.
|
||||
string error_msg = 8;
|
||||
}
|
14
api/proto/api/gateway.proto
vendored
14
api/proto/api/gateway.proto
vendored
@ -215,6 +215,7 @@ message DeleteGatewayRequest {
|
||||
|
||||
message ListGatewaysRequest {
|
||||
// Max number of gateways to return in the result-set.
|
||||
// If not set, it will be treated as 0, and the response will only return the total_count.
|
||||
uint32 limit = 1;
|
||||
|
||||
// Offset in the result-set (for pagination).
|
||||
@ -229,6 +230,18 @@ message ListGatewaysRequest {
|
||||
|
||||
// Multicast-group ID (UUID) to filter gateways on.
|
||||
string multicast_group_id = 5;
|
||||
|
||||
enum OrderBy {
|
||||
NAME = 0;
|
||||
GATEWAY_ID = 1;
|
||||
LAST_SEEN_AT = 2;
|
||||
}
|
||||
|
||||
// If set, the given value will be used to sort by (optional).
|
||||
OrderBy order_by = 6;
|
||||
|
||||
// If set, the sorting direction will be decending (default = ascending) (optional).
|
||||
bool order_by_desc = 7;
|
||||
}
|
||||
|
||||
message ListGatewaysResponse {
|
||||
@ -338,6 +351,7 @@ message GetRelayGatewayResponse {
|
||||
|
||||
message ListRelayGatewaysRequest {
|
||||
// Max number of relay-gateways to return in the result-set.
|
||||
// If not set, it will be treated as 0, and the response will only return the total_count.
|
||||
uint32 limit = 1;
|
||||
|
||||
// Offset in the result-set (for pagination).
|
||||
|
2
api/proto/api/internal.proto
vendored
2
api/proto/api/internal.proto
vendored
@ -109,6 +109,7 @@ message DeleteApiKeyRequest {
|
||||
|
||||
message ListApiKeysRequest {
|
||||
// Max number of items to return.
|
||||
// If not set, it will be treated as 0, and the response will only return the total_count.
|
||||
uint32 limit = 1;
|
||||
|
||||
// Offset in the result-set (for pagination).
|
||||
@ -177,6 +178,7 @@ message GlobalSearchRequest {
|
||||
string search = 1;
|
||||
|
||||
// Max number of results to return.
|
||||
// If not set, it will be treated as 0, and the response will only return the total_count.
|
||||
int64 limit = 2;
|
||||
|
||||
// Offset offset of the result-set (for pagination).
|
||||
|
1
api/proto/api/multicast_group.proto
vendored
1
api/proto/api/multicast_group.proto
vendored
@ -237,6 +237,7 @@ message DeleteMulticastGroupRequest {
|
||||
|
||||
message ListMulticastGroupsRequest {
|
||||
// Max number of multicast groups to return in the result-set.
|
||||
// If not set, it will be treated as 0, and the response will only return the total_count.
|
||||
uint32 limit = 1;
|
||||
|
||||
// Offset in the result-set (for pagination).
|
||||
|
2
api/proto/api/relay.proto
vendored
2
api/proto/api/relay.proto
vendored
@ -56,6 +56,7 @@ message RelayListItem {
|
||||
|
||||
message ListRelaysRequest {
|
||||
// Max number of devices to return in the result-set.
|
||||
// If not set, it will be treated as 0, and the response will only return the total_count.
|
||||
uint32 limit = 1;
|
||||
|
||||
// Offset in the result-set (for pagination).
|
||||
@ -92,6 +93,7 @@ message RemoveRelayDeviceRequest {
|
||||
|
||||
message ListRelayDevicesRequest {
|
||||
// Max number of multicast groups to return in the result-set.
|
||||
// If not set, it will be treated as 0, and the response will only return the total_count.
|
||||
uint32 limit = 1;
|
||||
|
||||
// Offset in the result-set (for pagination).
|
||||
|
2
api/proto/api/tenant.proto
vendored
2
api/proto/api/tenant.proto
vendored
@ -200,6 +200,7 @@ message DeleteTenantRequest {
|
||||
|
||||
message ListTenantsRequest {
|
||||
// Max number of tenants to return in the result-set.
|
||||
// If not set, it will be treated as 0, and the response will only return the total_count.
|
||||
uint32 limit = 1;
|
||||
|
||||
// Offset in the result-set (for pagination).
|
||||
@ -313,6 +314,7 @@ message ListTenantUsersRequest {
|
||||
string tenant_id = 1;
|
||||
|
||||
// Max number of tenants to return in the result-set.
|
||||
// If not set, it will be treated as 0, and the response will only return the total_count.
|
||||
uint32 limit = 2;
|
||||
|
||||
// Offset in the result-set (for pagination).
|
||||
|
1
api/proto/api/user.proto
vendored
1
api/proto/api/user.proto
vendored
@ -161,6 +161,7 @@ message DeleteUserRequest {
|
||||
|
||||
message ListUsersRequest {
|
||||
// Max number of tenants to return in the result-set.
|
||||
// If not set, it will be treated as 0, and the response will only return the total_count.
|
||||
uint32 limit = 1;
|
||||
|
||||
// Offset in the result-set (for pagination).
|
||||
|
8
api/proto/integration/integration.proto
vendored
8
api/proto/integration/integration.proto
vendored
@ -169,6 +169,10 @@ message UplinkEvent {
|
||||
// the AppSKey and that the encryption / decryption of the payloads is
|
||||
// the responsibility of the end-application.
|
||||
common.JoinServerContext join_server_context = 15;
|
||||
|
||||
// Region config ID.
|
||||
// This contains the region config ID which reported the uplink.
|
||||
string region_config_id = 16;
|
||||
}
|
||||
|
||||
// JoinEvent is the message sent when a device joined the network.
|
||||
@ -194,6 +198,10 @@ message JoinEvent {
|
||||
// the AppSKey and that the encryption / decryption of the payloads is
|
||||
// the responsibility of the end-application.
|
||||
common.JoinServerContext join_server_context = 6;
|
||||
|
||||
// Region config ID.
|
||||
// This contains the region config ID which reported the uplink.
|
||||
string region_config_id = 7;
|
||||
}
|
||||
|
||||
// AckEvent is the message sent when a confirmation on a confirmed downlink
|
||||
|
2
api/python/src/setup.py
vendored
2
api/python/src/setup.py
vendored
@ -18,7 +18,7 @@ CLASSIFIERS = [
|
||||
|
||||
setup(
|
||||
name='chirpstack-api',
|
||||
version = "4.9.0",
|
||||
version = "4.12.0-test.3",
|
||||
url='https://github.com/brocaar/chirpstack-api',
|
||||
author='Orne Brocaar',
|
||||
author_email='info@brocaar.com',
|
||||
|
7
api/rust/Cargo.toml
vendored
7
api/rust/Cargo.toml
vendored
@ -1,7 +1,7 @@
|
||||
[package]
|
||||
name = "chirpstack_api"
|
||||
description = "ChirpStack Protobuf / gRPC API definitions."
|
||||
version = "4.9.0"
|
||||
version = "4.12.0-test.3"
|
||||
authors = ["Orne Brocaar <info@brocaar.com>"]
|
||||
license = "MIT"
|
||||
homepage = "https://www.chirpstack.io"
|
||||
@ -18,13 +18,12 @@
|
||||
prost = "0.13"
|
||||
prost-types = "0.13"
|
||||
hex = "0.4"
|
||||
rand = "0.8"
|
||||
|
||||
rand = "0.9"
|
||||
tonic = { version = "0.12", features = [
|
||||
"codegen",
|
||||
"prost",
|
||||
], default-features = false, optional = true }
|
||||
tokio = { version = "1.38", features = ["macros"], optional = true }
|
||||
tokio = { version = "1.44", features = ["macros"], optional = true }
|
||||
pbjson = { version = "0.7", optional = true }
|
||||
pbjson-types = { version = "0.7", optional = true }
|
||||
serde = { version = "1.0", optional = true }
|
||||
|
18
api/rust/build.rs
vendored
18
api/rust/build.rs
vendored
@ -28,7 +28,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
.file_descriptor_set_path(out_dir.join("common").join("proto_descriptor.bin"))
|
||||
.compile_well_known_types(true)
|
||||
.extern_path(".google.protobuf", well_known_types_path)
|
||||
.compile(
|
||||
.compile_protos(
|
||||
&[cs_dir.join("common").join("common.proto").to_str().unwrap()],
|
||||
&[
|
||||
proto_dir.join("chirpstack").to_str().unwrap(),
|
||||
@ -53,7 +53,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
.compile_well_known_types(true)
|
||||
.extern_path(".google.protobuf", well_known_types_path)
|
||||
.extern_path(".common", "crate::common")
|
||||
.compile(
|
||||
.compile_protos(
|
||||
&[cs_dir.join("gw").join("gw.proto").to_str().unwrap()],
|
||||
&[
|
||||
proto_dir.join("chirpstack").to_str().unwrap(),
|
||||
@ -82,12 +82,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
.extern_path(".google.protobuf", well_known_types_path)
|
||||
.extern_path(".common", "crate::common");
|
||||
|
||||
#[cfg(feature = "diesel")]
|
||||
{
|
||||
builder = builder.message_attribute("internal.DeviceSession", "#[derive(diesel::expression::AsExpression, diesel::deserialize::FromSqlRow)] #[diesel(sql_type = diesel::sql_types::Binary)]");
|
||||
}
|
||||
|
||||
builder.compile(
|
||||
builder.compile_protos(
|
||||
&[cs_dir
|
||||
.join("internal")
|
||||
.join("internal.proto")
|
||||
@ -119,7 +114,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
.extern_path(".google.protobuf", well_known_types_path)
|
||||
.extern_path(".common", "crate::common")
|
||||
.extern_path(".gw", "crate::gw")
|
||||
.compile(
|
||||
.compile_protos(
|
||||
&[cs_dir
|
||||
.join("integration")
|
||||
.join("integration.proto")
|
||||
@ -153,7 +148,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
.extern_path(".google.protobuf", well_known_types_path)
|
||||
.extern_path(".common", "crate::common")
|
||||
.extern_path(".gw", "crate::gw")
|
||||
.compile(
|
||||
.compile_protos(
|
||||
&[
|
||||
cs_dir.join("stream").join("meta.proto").to_str().unwrap(),
|
||||
cs_dir.join("stream").join("frame.proto").to_str().unwrap(),
|
||||
@ -192,7 +187,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
.file_descriptor_set_path(out_dir.join("api").join("proto_descriptor.bin"))
|
||||
.extern_path(".common", "crate::common")
|
||||
.extern_path(".gw", "crate::gw")
|
||||
.compile(
|
||||
.compile_protos(
|
||||
&[
|
||||
cs_dir.join("api").join("internal.proto").to_str().unwrap(),
|
||||
cs_dir.join("api").join("user.proto").to_str().unwrap(),
|
||||
@ -220,6 +215,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
.to_str()
|
||||
.unwrap(),
|
||||
cs_dir.join("api").join("relay.proto").to_str().unwrap(),
|
||||
cs_dir.join("api").join("fuota.proto").to_str().unwrap(),
|
||||
],
|
||||
&[
|
||||
proto_dir.join("chirpstack").to_str().unwrap(),
|
||||
|
51
api/rust/proto/chirpstack/api/application.proto
vendored
51
api/rust/proto/chirpstack/api/application.proto
vendored
@ -427,6 +427,20 @@ service ApplicationService {
|
||||
post : "/api/applications/{application_id}/integrations/mqtt/certificate"
|
||||
};
|
||||
}
|
||||
|
||||
// List device-profiles used within the given application.
|
||||
rpc ListDeviceProfiles(ListApplicationDeviceProfilesRequest) returns (ListApplicationDeviceProfilesResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/api/applications/{application_id}/device-profiles"
|
||||
};
|
||||
}
|
||||
|
||||
// List device tags used within the given application.
|
||||
rpc ListDeviceTags(ListApplicationDeviceTagsRequest) returns (ListApplicationDeviceTagsResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/api/applications/{application_id}/device-tags"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
enum Encoding {
|
||||
@ -529,6 +543,7 @@ message DeleteApplicationRequest {
|
||||
|
||||
message ListApplicationsRequest {
|
||||
// Max number of applications to return in the result-set.
|
||||
// If not set, it will be treated as 0, and the response will only return the total_count.
|
||||
uint32 limit = 1;
|
||||
|
||||
// Offset in the result-set (for pagination).
|
||||
@ -1098,3 +1113,39 @@ message GenerateMqttIntegrationClientCertificateResponse {
|
||||
// Expires at defines the expiration date of the certificate.
|
||||
google.protobuf.Timestamp expires_at = 4;
|
||||
}
|
||||
|
||||
message ApplicationDeviceProfileListItem {
|
||||
// Device-profile ID (UUID).
|
||||
string id = 1;
|
||||
|
||||
// Name.
|
||||
string name = 2;
|
||||
}
|
||||
|
||||
message ListApplicationDeviceProfilesRequest {
|
||||
// Application ID (UUID).
|
||||
string application_id = 1;
|
||||
};
|
||||
|
||||
message ListApplicationDeviceProfilesResponse {
|
||||
// Device-profiles.
|
||||
repeated ApplicationDeviceProfileListItem result = 1;
|
||||
}
|
||||
|
||||
message ApplicationDeviceTagListItem {
|
||||
// Tag key.
|
||||
string key = 1;
|
||||
|
||||
// Used values.
|
||||
repeated string values = 2;
|
||||
}
|
||||
|
||||
message ListApplicationDeviceTagsRequest {
|
||||
// Application ID (UUID).
|
||||
string application_id = 1;
|
||||
}
|
||||
|
||||
message ListApplicationDeviceTagsResponse {
|
||||
// Device tags.
|
||||
repeated ApplicationDeviceTagListItem result = 1;
|
||||
}
|
||||
|
28
api/rust/proto/chirpstack/api/device.proto
vendored
28
api/rust/proto/chirpstack/api/device.proto
vendored
@ -262,6 +262,9 @@ message DeviceListItem {
|
||||
|
||||
// Device status.
|
||||
DeviceStatus device_status = 9;
|
||||
|
||||
// Device tags.
|
||||
map<string, string> tags = 10;
|
||||
}
|
||||
|
||||
message DeviceKeys {
|
||||
@ -275,6 +278,11 @@ message DeviceKeys {
|
||||
// Application root key (128 bit).
|
||||
// Note: This field only needs to be set for LoRaWAN 1.1.x devices!
|
||||
string app_key = 3;
|
||||
|
||||
// Gen App Key (128 bit).
|
||||
// Note: This field only needs to be set for LoRaWAN 1.0.x devices that
|
||||
// implement TS005 (remote multicast setup).
|
||||
string gen_app_key = 4;
|
||||
}
|
||||
|
||||
message CreateDeviceRequest {
|
||||
@ -319,6 +327,7 @@ message DeleteDeviceRequest {
|
||||
|
||||
message ListDevicesRequest {
|
||||
// Max number of devices to return in the result-set.
|
||||
// If not set, it will be treated as 0, and the response will only return the total_count.
|
||||
uint32 limit = 1;
|
||||
|
||||
// Offset in the result-set (for pagination).
|
||||
@ -332,6 +341,25 @@ message ListDevicesRequest {
|
||||
|
||||
// Multicst-group ID (UUID) to filter devices on.
|
||||
string multicast_group_id = 5;
|
||||
|
||||
enum OrderBy {
|
||||
NAME = 0;
|
||||
DEV_EUI = 1;
|
||||
LAST_SEEN_AT = 2;
|
||||
DEVICE_PROFILE_NAME = 3;
|
||||
}
|
||||
|
||||
// If set, the given value will be used to sort by (optional).
|
||||
OrderBy order_by = 6;
|
||||
|
||||
// If set, the sorting direction will be decending (default = ascending) (optional).
|
||||
bool order_by_desc = 7;
|
||||
|
||||
// Tags to filter devices on.
|
||||
map<string, string> tags = 8;
|
||||
|
||||
// Device-profile ID (UUID) to filter devices on.
|
||||
string device_profile_id = 9;
|
||||
}
|
||||
|
||||
message ListDevicesResponse {
|
||||
|
@ -98,6 +98,39 @@ enum RelayModeActivation {
|
||||
END_DEVICE_CONTROLLED = 3;
|
||||
}
|
||||
|
||||
enum Ts003Version {
|
||||
// Not implemented.
|
||||
TS003_NOT_IMPLEMENTED = 0;
|
||||
|
||||
// v1.0.0.
|
||||
TS003_V100 = 1;
|
||||
|
||||
// v2.0.0
|
||||
TS003_v200 = 2;
|
||||
}
|
||||
|
||||
enum Ts004Version {
|
||||
// Not implemented.
|
||||
TS004_NOT_IMPLEMENTED = 0;
|
||||
|
||||
// v1.0.0.
|
||||
TS004_V100 = 1;
|
||||
|
||||
// v2.0.0
|
||||
TS004_V200 = 2;
|
||||
}
|
||||
|
||||
enum Ts005Version {
|
||||
// Not implemented.
|
||||
TS005_NOT_IMPLEMENTED = 0;
|
||||
|
||||
// v1.0.0.
|
||||
TS005_V100 = 1;
|
||||
|
||||
// v2.0.0
|
||||
TS005_V200 = 2;
|
||||
}
|
||||
|
||||
// DeviceProfileService is the service providing API methods for managing
|
||||
// device-profiles.
|
||||
service DeviceProfileService {
|
||||
@ -421,6 +454,9 @@ message DeviceProfile {
|
||||
// it.
|
||||
// Valid options are 1 - 15 (0 = always use system RX1 Delay).
|
||||
uint32 rx1_delay = 53;
|
||||
|
||||
// Application Layer parameters.
|
||||
AppLayerParams app_layer_params = 54;
|
||||
}
|
||||
|
||||
message Measurement {
|
||||
@ -431,6 +467,26 @@ message Measurement {
|
||||
MeasurementKind kind = 3;
|
||||
}
|
||||
|
||||
message AppLayerParams {
|
||||
// TS003 version (Application Layer Clock Sync).
|
||||
Ts003Version ts003_version = 1;
|
||||
|
||||
// TS003 fPort.
|
||||
uint32 ts003_f_port = 2;
|
||||
|
||||
// TS004 version (Fragmented Data Block Transport).
|
||||
Ts004Version ts004_version = 3;
|
||||
|
||||
// TS004 fPort.
|
||||
uint32 ts004_f_port = 4;
|
||||
|
||||
// TS005 version (Remote Multicast Setup).
|
||||
Ts005Version ts005_version = 5;
|
||||
|
||||
// TS005 fPort.
|
||||
uint32 ts005_f_port = 6;
|
||||
}
|
||||
|
||||
message DeviceProfileListItem {
|
||||
// Device-profile ID (UUID).
|
||||
string id = 1;
|
||||
@ -501,6 +557,7 @@ message DeleteDeviceProfileRequest {
|
||||
|
||||
message ListDeviceProfilesRequest {
|
||||
// Max number of device-profiles to return in the result-set.
|
||||
// If not set, it will be treated as 0, and the response will only return the total_count.
|
||||
uint32 limit = 1;
|
||||
|
||||
// Offset in the result-set (for pagination).
|
||||
|
@ -231,6 +231,7 @@ message DeleteDeviceProfileTemplateRequest {
|
||||
|
||||
message ListDeviceProfileTemplatesRequest {
|
||||
// Max number of device-profile templates to return in the result-set.
|
||||
// If not set, it will be treated as 0, and the response will only return the total_count.
|
||||
uint32 limit = 1;
|
||||
|
||||
// Offset in the result-set (for pagination).
|
||||
|
401
api/rust/proto/chirpstack/api/fuota.proto
vendored
Normal file
401
api/rust/proto/chirpstack/api/fuota.proto
vendored
Normal file
@ -0,0 +1,401 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package api;
|
||||
|
||||
option go_package = "github.com/chirpstack/chirpstack/api/go/v4/api";
|
||||
option java_package = "io.chirpstack.api";
|
||||
option java_multiple_files = true;
|
||||
option java_outer_classname = "FuotaProto";
|
||||
option csharp_namespace = "Chirpstack.Api";
|
||||
option php_namespace = "Chirpstack\\Api";
|
||||
option php_metadata_namespace = "GPBMetadata\\Chirpstack\\Api";
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "google/protobuf/empty.proto";
|
||||
import "common/common.proto";
|
||||
import "api/multicast_group.proto";
|
||||
|
||||
// FuotaService is the service providing API methods for FUOTA deployments.
|
||||
service FuotaService {
|
||||
// Create the given FUOTA deployment.
|
||||
rpc CreateDeployment(CreateFuotaDeploymentRequest) returns (CreateFuotaDeploymentResponse) {}
|
||||
|
||||
// Get the FUOTA deployment for the given ID.
|
||||
rpc GetDeployment(GetFuotaDeploymentRequest) returns (GetFuotaDeploymentResponse) {}
|
||||
|
||||
// Update the given FUOTA deployment.
|
||||
rpc UpdateDeployment(UpdateFuotaDeploymentRequest) returns (google.protobuf.Empty) {}
|
||||
|
||||
// Delete the FUOTA deployment for the given ID.
|
||||
rpc DeleteDeployment(DeleteFuotaDeploymentRequest) returns (google.protobuf.Empty) {}
|
||||
|
||||
// Start the FUOTA deployment.
|
||||
rpc StartDeployment(StartFuotaDeploymentRequest) returns (google.protobuf.Empty) {}
|
||||
|
||||
// List the FUOTA deployments.
|
||||
rpc ListDeployments(ListFuotaDeploymentsRequest) returns (ListFuotaDeploymentsResponse) {}
|
||||
|
||||
// Add the given DevEUIs to the FUOTA deployment.
|
||||
rpc AddDevices(AddDevicesToFuotaDeploymentRequest) returns (google.protobuf.Empty) {}
|
||||
|
||||
// Remove the given DevEUIs from the FUOTA deployment.
|
||||
rpc RemoveDevices(RemoveDevicesFromFuotaDeploymentRequest) returns (google.protobuf.Empty) {}
|
||||
|
||||
// List FUOTA Deployment devices.
|
||||
rpc ListDevices(ListFuotaDeploymentDevicesRequest) returns (ListFuotaDeploymentDevicesResponse) {}
|
||||
|
||||
// Add the given Gateway IDs to the FUOTA deployment.
|
||||
// By default, ChirpStack will automatically select the minimum amount of
|
||||
// gateways needed to cover all devices within the multicast-group. Setting
|
||||
// the gateways manually overrides this behaviour.
|
||||
rpc AddGateways(AddGatewaysToFuotaDeploymentRequest) returns (google.protobuf.Empty) {}
|
||||
|
||||
// List the gateways added to the FUOTA deployment.
|
||||
rpc ListGateways(ListFuotaDeploymentGatewaysRequest) returns (ListFuotaDeploymentGatewaysResponse) {}
|
||||
|
||||
// Remove the given Gateway IDs from the FUOTA deployment.
|
||||
rpc RemoveGateways(RemoveGatewaysFromFuotaDeploymentRequest) returns (google.protobuf.Empty) {}
|
||||
// GetLogs returns the logs for the FUOTA deployment.
|
||||
|
||||
// List jobs for the given FUOTA deployment.
|
||||
rpc ListJobs(ListFuotaDeploymentJobsRequest) returns (ListFuotaDeploymentJobsResponse) {}
|
||||
}
|
||||
|
||||
enum RequestFragmentationSessionStatus {
|
||||
// Do not request the fragmentation-session status.
|
||||
NO_REQUEST = 0;
|
||||
|
||||
// Enqueue the fragmentation-session status request command directly after
|
||||
// enqueueing the fragmentation-session fragments. This is the recommended
|
||||
// option for Class-A devices as the status request will stay in the
|
||||
// downlink queue until the device sends its next uplink.
|
||||
AFTER_FRAGMENT_ENQUEUE = 1;
|
||||
|
||||
// Enqueue the fragmentation-session status request after the multicast
|
||||
// session-timeout. This is the recommended option for Class-B and -C
|
||||
// devices as selecting AFTER_FRAGMENT_ENQUEUE will likely cause the NS
|
||||
// to schedule the downlink frame during the FUOTA multicast-session.
|
||||
AFTER_SESSION_TIMEOUT = 2;
|
||||
|
||||
}
|
||||
|
||||
message FuotaDeployment {
|
||||
// Deployment ID.
|
||||
// This value is automatically set on create.
|
||||
string id = 1;
|
||||
|
||||
// Application ID.
|
||||
string application_id = 2;
|
||||
|
||||
// Device-profile ID.
|
||||
string device_profile_id = 3;
|
||||
|
||||
// Deployment name.
|
||||
string name = 4;
|
||||
|
||||
// Multicast-group type.
|
||||
MulticastGroupType multicast_group_type = 5;
|
||||
|
||||
// Multicast-group scheduling type (Class-C only).
|
||||
MulticastGroupSchedulingType multicast_class_c_scheduling_type = 6;
|
||||
|
||||
// Multicast data-rate.
|
||||
uint32 multicast_dr = 7;
|
||||
|
||||
// Multicast ping-slot period (Class-B only).
|
||||
uint32 multicast_class_b_ping_slot_nb_k = 8;
|
||||
|
||||
// Multicast frequency (Hz).
|
||||
uint32 multicast_frequency = 9;
|
||||
|
||||
// Multicast timeout.
|
||||
// This defines the timeout of the multicast-session.
|
||||
// Please refer to the Remote Multicast Setup specification as this field
|
||||
// has a different meaning for Class-B and Class-C groups.
|
||||
uint32 multicast_timeout = 10;
|
||||
|
||||
// Calculate multicast timeout.
|
||||
// If set to true, ChirpStack will calculate the multicast-timeout.
|
||||
bool calculate_multicast_timeout = 11;
|
||||
|
||||
// The number of times ChirpStack will retry an unicast command
|
||||
// before it considers it to be failed.
|
||||
uint32 unicast_max_retry_count = 12;
|
||||
|
||||
// Fragmentation size.
|
||||
// This defines the size of each payload fragment. Please refer to the
|
||||
// Regional Parameters specification for the maximum payload sizes
|
||||
// per data-rate and region.
|
||||
uint32 fragmentation_fragment_size = 13;
|
||||
|
||||
// Calculate fragmentation size.
|
||||
// If set to true, ChirpStack will calculate the fragmentation size.
|
||||
bool calculate_fragmentation_fragment_size = 14;
|
||||
|
||||
// Fragmentation redundancy percentage.
|
||||
// The number represents the percentage (0 - 100) of redundant messages
|
||||
// to send.
|
||||
uint32 fragmentation_redundancy_percentage = 15;
|
||||
|
||||
// Fragmentation session index.
|
||||
uint32 fragmentation_session_index = 16;
|
||||
|
||||
// Fragmentation matrix.
|
||||
uint32 fragmentation_matrix = 17;
|
||||
|
||||
// Block ack delay.
|
||||
uint32 fragmentation_block_ack_delay = 18;
|
||||
|
||||
// Descriptor (4 bytes).
|
||||
bytes fragmentation_descriptor = 19;
|
||||
|
||||
// Request fragmentation session status.
|
||||
RequestFragmentationSessionStatus request_fragmentation_session_status = 20;
|
||||
|
||||
// Payload.
|
||||
// The FUOTA payload to send.
|
||||
bytes payload = 21;
|
||||
|
||||
// Set device tags on complete.
|
||||
map<string, string> on_complete_set_device_tags = 22;
|
||||
}
|
||||
|
||||
message FuotaDeploymentListItem {
|
||||
// ID.
|
||||
string id = 1;
|
||||
|
||||
// Created at timestamp.
|
||||
google.protobuf.Timestamp created_at = 2;
|
||||
|
||||
// Updated at timestamp.
|
||||
google.protobuf.Timestamp updated_at = 3;
|
||||
|
||||
// Started at timestamp.
|
||||
google.protobuf.Timestamp started_at = 4;
|
||||
|
||||
// Completed at timestamp.
|
||||
google.protobuf.Timestamp completed_at = 5;
|
||||
|
||||
// Name.
|
||||
string name = 6;
|
||||
}
|
||||
|
||||
message FuotaDeploymentDeviceListItem {
|
||||
// ID.
|
||||
string fuota_deployment_id = 1;
|
||||
|
||||
// DevEUI.
|
||||
string dev_eui = 2;
|
||||
|
||||
// Created at timestamp.
|
||||
google.protobuf.Timestamp created_at = 3;
|
||||
|
||||
// Completed at timestamp.
|
||||
google.protobuf.Timestamp completed_at = 4;
|
||||
|
||||
// McGroupSetup completed at timestamp.
|
||||
google.protobuf.Timestamp mc_group_setup_completed_at = 5;
|
||||
|
||||
// McSession completed at timestamp.
|
||||
google.protobuf.Timestamp mc_session_completed_at = 6;
|
||||
|
||||
// FragSessionSetup completed at timestamp.
|
||||
google.protobuf.Timestamp frag_session_setup_completed_at = 7;
|
||||
|
||||
// FragStatus completed at timestamp.
|
||||
google.protobuf.Timestamp frag_status_completed_at = 8;
|
||||
|
||||
// Error message.
|
||||
string error_msg = 9;
|
||||
}
|
||||
|
||||
message FuotaDeploymentGatewayListItem {
|
||||
// ID.
|
||||
string fuota_deployment_id = 1;
|
||||
|
||||
// Gateway ID.
|
||||
string gateway_id = 2;
|
||||
|
||||
// Created at timestamp.
|
||||
google.protobuf.Timestamp created_at = 3;
|
||||
}
|
||||
|
||||
message CreateFuotaDeploymentRequest {
|
||||
// Deployment.
|
||||
FuotaDeployment deployment = 1;
|
||||
}
|
||||
|
||||
message CreateFuotaDeploymentResponse {
|
||||
// ID of the created deployment.
|
||||
string id = 1;
|
||||
}
|
||||
|
||||
message GetFuotaDeploymentRequest {
|
||||
// FUOTA Deployment ID.
|
||||
string id = 1;
|
||||
}
|
||||
|
||||
message GetFuotaDeploymentResponse {
|
||||
// FUOTA Deployment.
|
||||
FuotaDeployment deployment = 1;
|
||||
|
||||
// Created at timestamp.
|
||||
google.protobuf.Timestamp created_at = 2;
|
||||
|
||||
// Updated at timestamp.
|
||||
google.protobuf.Timestamp updated_at = 3;
|
||||
|
||||
// Started at timestamp.
|
||||
google.protobuf.Timestamp started_at = 4;
|
||||
|
||||
// Completed at timestamp.
|
||||
google.protobuf.Timestamp completed_at = 5;
|
||||
}
|
||||
|
||||
message UpdateFuotaDeploymentRequest {
|
||||
// Deployment.
|
||||
FuotaDeployment deployment = 1;
|
||||
}
|
||||
|
||||
message DeleteFuotaDeploymentRequest {
|
||||
// FUOTA deployment ID.
|
||||
string id = 1;
|
||||
}
|
||||
|
||||
message StartFuotaDeploymentRequest {
|
||||
// FUOTA deployment ID.
|
||||
string id = 1;
|
||||
}
|
||||
|
||||
message ListFuotaDeploymentsRequest {
|
||||
// Max number of FUOTA deployments to return in the result-set.
|
||||
// If not set, it will be treated as 0, and the response will only return the total_count.
|
||||
uint32 limit = 1;
|
||||
|
||||
// Offset in the result-set (for pagination).
|
||||
uint32 offset = 2;
|
||||
|
||||
// Application ID to list the FUOTA Deployments for.
|
||||
// This filter is mandatory.
|
||||
string application_id = 3;
|
||||
}
|
||||
|
||||
message ListFuotaDeploymentsResponse {
|
||||
// Total number of FUOTA Deployments.
|
||||
uint32 total_count = 1;
|
||||
|
||||
// Result-test.
|
||||
repeated FuotaDeploymentListItem result = 2;
|
||||
}
|
||||
|
||||
message AddDevicesToFuotaDeploymentRequest {
|
||||
// FUOTA Deployment ID.
|
||||
string fuota_deployment_id = 1;
|
||||
|
||||
// DevEUIs.
|
||||
// Note that the DevEUIs must share the same device-profile as assigned to
|
||||
// the FUOTA Deployment.
|
||||
repeated string dev_euis = 2;
|
||||
}
|
||||
|
||||
message RemoveDevicesFromFuotaDeploymentRequest {
|
||||
// FUOTA Deployment ID.
|
||||
string fuota_deployment_id = 1;
|
||||
|
||||
// DevEUIs.
|
||||
repeated string dev_euis = 2;
|
||||
}
|
||||
|
||||
message ListFuotaDeploymentDevicesRequest {
|
||||
// Max number of devices to return in the result-set.
|
||||
// If not set, it will be treated as 0, and the response will only return the total_count.
|
||||
uint32 limit = 1;
|
||||
|
||||
// Offset in the result-set (for pagination).
|
||||
uint32 offset = 2;
|
||||
|
||||
// FUOTA Deployment ID.
|
||||
string fuota_deployment_id = 3;
|
||||
}
|
||||
|
||||
message ListFuotaDeploymentDevicesResponse {
|
||||
// Total number of devices.
|
||||
uint32 total_count = 1;
|
||||
|
||||
// Result-set.
|
||||
repeated FuotaDeploymentDeviceListItem result = 2;
|
||||
}
|
||||
|
||||
message AddGatewaysToFuotaDeploymentRequest {
|
||||
// FUOTA Deployment ID.
|
||||
string fuota_deployment_id = 1;
|
||||
|
||||
// Gateway IDs.
|
||||
// Note that the Gateways must be under the same tenant as the FUOTA Deployment.
|
||||
repeated string gateway_ids = 2;
|
||||
}
|
||||
|
||||
message RemoveGatewaysFromFuotaDeploymentRequest {
|
||||
// FUOTA Deployment ID.
|
||||
string fuota_deployment_id = 1;
|
||||
|
||||
// Gateway IDs.
|
||||
repeated string gateway_ids = 2;
|
||||
}
|
||||
|
||||
message ListFuotaDeploymentGatewaysRequest {
|
||||
// Max number of gateways to return in the result-set.
|
||||
// If not set, it will be treated as 0, and the response will only return the total_count.
|
||||
uint32 limit = 1;
|
||||
|
||||
// Offset in the result-set (for pagination).
|
||||
uint32 offset = 2;
|
||||
|
||||
// FUOTA Deployment ID.
|
||||
string fuota_deployment_id = 3;
|
||||
}
|
||||
|
||||
message ListFuotaDeploymentGatewaysResponse {
|
||||
// Total number of gateways.
|
||||
uint32 total_count = 1;
|
||||
|
||||
// Result-set.
|
||||
repeated FuotaDeploymentGatewayListItem result = 2;
|
||||
}
|
||||
|
||||
message ListFuotaDeploymentJobsRequest {
|
||||
// FUOTA Deployment ID.
|
||||
string fuota_deployment_id = 1;
|
||||
}
|
||||
|
||||
message ListFuotaDeploymentJobsResponse {
|
||||
// Jobs.
|
||||
repeated FuotaDeploymentJob jobs = 1;
|
||||
}
|
||||
|
||||
message FuotaDeploymentJob {
|
||||
// Job identifier.
|
||||
string job = 1;
|
||||
|
||||
// Created at.
|
||||
google.protobuf.Timestamp created_at = 2;
|
||||
|
||||
// Completed at.
|
||||
google.protobuf.Timestamp completed_at = 3;
|
||||
|
||||
// Max. retry count.
|
||||
uint32 max_retry_count = 4;
|
||||
|
||||
// Attempt count.
|
||||
uint32 attempt_count = 5;
|
||||
|
||||
// Scheduler run after.
|
||||
google.protobuf.Timestamp scheduler_run_after = 6;
|
||||
|
||||
// Warning message.
|
||||
string warning_msg = 7;
|
||||
|
||||
// Error message.
|
||||
string error_msg = 8;
|
||||
}
|
14
api/rust/proto/chirpstack/api/gateway.proto
vendored
14
api/rust/proto/chirpstack/api/gateway.proto
vendored
@ -215,6 +215,7 @@ message DeleteGatewayRequest {
|
||||
|
||||
message ListGatewaysRequest {
|
||||
// Max number of gateways to return in the result-set.
|
||||
// If not set, it will be treated as 0, and the response will only return the total_count.
|
||||
uint32 limit = 1;
|
||||
|
||||
// Offset in the result-set (for pagination).
|
||||
@ -229,6 +230,18 @@ message ListGatewaysRequest {
|
||||
|
||||
// Multicast-group ID (UUID) to filter gateways on.
|
||||
string multicast_group_id = 5;
|
||||
|
||||
enum OrderBy {
|
||||
NAME = 0;
|
||||
GATEWAY_ID = 1;
|
||||
LAST_SEEN_AT = 2;
|
||||
}
|
||||
|
||||
// If set, the given value will be used to sort by (optional).
|
||||
OrderBy order_by = 6;
|
||||
|
||||
// If set, the sorting direction will be decending (default = ascending) (optional).
|
||||
bool order_by_desc = 7;
|
||||
}
|
||||
|
||||
message ListGatewaysResponse {
|
||||
@ -338,6 +351,7 @@ message GetRelayGatewayResponse {
|
||||
|
||||
message ListRelayGatewaysRequest {
|
||||
// Max number of relay-gateways to return in the result-set.
|
||||
// If not set, it will be treated as 0, and the response will only return the total_count.
|
||||
uint32 limit = 1;
|
||||
|
||||
// Offset in the result-set (for pagination).
|
||||
|
2
api/rust/proto/chirpstack/api/internal.proto
vendored
2
api/rust/proto/chirpstack/api/internal.proto
vendored
@ -109,6 +109,7 @@ message DeleteApiKeyRequest {
|
||||
|
||||
message ListApiKeysRequest {
|
||||
// Max number of items to return.
|
||||
// If not set, it will be treated as 0, and the response will only return the total_count.
|
||||
uint32 limit = 1;
|
||||
|
||||
// Offset in the result-set (for pagination).
|
||||
@ -177,6 +178,7 @@ message GlobalSearchRequest {
|
||||
string search = 1;
|
||||
|
||||
// Max number of results to return.
|
||||
// If not set, it will be treated as 0, and the response will only return the total_count.
|
||||
int64 limit = 2;
|
||||
|
||||
// Offset offset of the result-set (for pagination).
|
||||
|
@ -237,6 +237,7 @@ message DeleteMulticastGroupRequest {
|
||||
|
||||
message ListMulticastGroupsRequest {
|
||||
// Max number of multicast groups to return in the result-set.
|
||||
// If not set, it will be treated as 0, and the response will only return the total_count.
|
||||
uint32 limit = 1;
|
||||
|
||||
// Offset in the result-set (for pagination).
|
||||
|
2
api/rust/proto/chirpstack/api/relay.proto
vendored
2
api/rust/proto/chirpstack/api/relay.proto
vendored
@ -56,6 +56,7 @@ message RelayListItem {
|
||||
|
||||
message ListRelaysRequest {
|
||||
// Max number of devices to return in the result-set.
|
||||
// If not set, it will be treated as 0, and the response will only return the total_count.
|
||||
uint32 limit = 1;
|
||||
|
||||
// Offset in the result-set (for pagination).
|
||||
@ -92,6 +93,7 @@ message RemoveRelayDeviceRequest {
|
||||
|
||||
message ListRelayDevicesRequest {
|
||||
// Max number of multicast groups to return in the result-set.
|
||||
// If not set, it will be treated as 0, and the response will only return the total_count.
|
||||
uint32 limit = 1;
|
||||
|
||||
// Offset in the result-set (for pagination).
|
||||
|
2
api/rust/proto/chirpstack/api/tenant.proto
vendored
2
api/rust/proto/chirpstack/api/tenant.proto
vendored
@ -200,6 +200,7 @@ message DeleteTenantRequest {
|
||||
|
||||
message ListTenantsRequest {
|
||||
// Max number of tenants to return in the result-set.
|
||||
// If not set, it will be treated as 0, and the response will only return the total_count.
|
||||
uint32 limit = 1;
|
||||
|
||||
// Offset in the result-set (for pagination).
|
||||
@ -313,6 +314,7 @@ message ListTenantUsersRequest {
|
||||
string tenant_id = 1;
|
||||
|
||||
// Max number of tenants to return in the result-set.
|
||||
// If not set, it will be treated as 0, and the response will only return the total_count.
|
||||
uint32 limit = 2;
|
||||
|
||||
// Offset in the result-set (for pagination).
|
||||
|
1
api/rust/proto/chirpstack/api/user.proto
vendored
1
api/rust/proto/chirpstack/api/user.proto
vendored
@ -161,6 +161,7 @@ message DeleteUserRequest {
|
||||
|
||||
message ListUsersRequest {
|
||||
// Max number of tenants to return in the result-set.
|
||||
// If not set, it will be treated as 0, and the response will only return the total_count.
|
||||
uint32 limit = 1;
|
||||
|
||||
// Offset in the result-set (for pagination).
|
||||
|
@ -169,6 +169,10 @@ message UplinkEvent {
|
||||
// the AppSKey and that the encryption / decryption of the payloads is
|
||||
// the responsibility of the end-application.
|
||||
common.JoinServerContext join_server_context = 15;
|
||||
|
||||
// Region config ID.
|
||||
// This contains the region config ID which reported the uplink.
|
||||
string region_config_id = 16;
|
||||
}
|
||||
|
||||
// JoinEvent is the message sent when a device joined the network.
|
||||
@ -194,6 +198,10 @@ message JoinEvent {
|
||||
// the AppSKey and that the encryption / decryption of the payloads is
|
||||
// the responsibility of the end-application.
|
||||
common.JoinServerContext join_server_context = 6;
|
||||
|
||||
// Region config ID.
|
||||
// This contains the region config ID which reported the uplink.
|
||||
string region_config_id = 7;
|
||||
}
|
||||
|
||||
// AckEvent is the message sent when a confirmation on a confirmed downlink
|
||||
|
4
api/rust/src/gw.rs
vendored
4
api/rust/src/gw.rs
vendored
@ -115,11 +115,11 @@ impl UplinkFrame {
|
||||
|
||||
if let Some(rx_info) = &self.rx_info_legacy {
|
||||
if self.rx_info.is_none() {
|
||||
let mut rng = rand::thread_rng();
|
||||
let mut rng = rand::rng();
|
||||
|
||||
self.rx_info = Some(UplinkRxInfo {
|
||||
gateway_id: hex::encode(&rx_info.gateway_id),
|
||||
uplink_id: rng.gen::<u32>(),
|
||||
uplink_id: rng.random::<u32>(),
|
||||
gw_time: rx_info.time,
|
||||
ns_time: None,
|
||||
time_since_gps_epoch: rx_info.time_since_gps_epoch,
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "backend"
|
||||
version = "4.9.0"
|
||||
version = "4.12.0-test.3"
|
||||
authors = ["Orne Brocaar <info@brocaar.com>"]
|
||||
edition = "2018"
|
||||
publish = false
|
||||
@ -8,18 +8,18 @@
|
||||
[dependencies]
|
||||
serde = { version = "1.0", features = ["derive", "rc"] }
|
||||
serde_json = "1.0"
|
||||
thiserror = "1.0"
|
||||
thiserror = "2.0"
|
||||
anyhow = "1.0"
|
||||
tracing = "0.1"
|
||||
hex = "0.4"
|
||||
rand = "0.8"
|
||||
rand = "0.9"
|
||||
aes-kw = "0.2"
|
||||
reqwest = { version = "0.12", features = [
|
||||
"json",
|
||||
"rustls-tls",
|
||||
], default-features = false }
|
||||
chrono = { version = "0.4", features = ["serde"] }
|
||||
tokio = { version = "1.38", features = ["macros"] }
|
||||
tokio = { version = "1.44", features = ["macros"] }
|
||||
chirpstack_api = { path = "../api/rust", default-features = false, features = [
|
||||
"json",
|
||||
] }
|
||||
|
@ -3,14 +3,14 @@
|
||||
description = "Library for building external ChirpStack integrations"
|
||||
homepage = "https://www.chirpstack.io/"
|
||||
license = "MIT"
|
||||
version = "4.9.0"
|
||||
version = "4.12.0-test.3"
|
||||
authors = ["Orne Brocaar <info@brocaar.com>"]
|
||||
edition = "2021"
|
||||
repository = "https://github.com/chirpstack/chirpstack"
|
||||
|
||||
[dependencies]
|
||||
chirpstack_api = { path = "../api/rust", version = "4.9.0-test.1" }
|
||||
redis = { version = "0.26", features = [
|
||||
chirpstack_api = { path = "../api/rust", version = "4.12.0-test.3" }
|
||||
redis = { version = "0.29", features = [
|
||||
"cluster-async",
|
||||
"tokio-rustls-comp",
|
||||
] }
|
||||
@ -21,9 +21,9 @@
|
||||
"ansi",
|
||||
"json",
|
||||
], default-features = true }
|
||||
async-trait = "0.1.79"
|
||||
async-trait = "0.1"
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
tokio = { version = "1.36", features = ["macros", "rt-multi-thread"] }
|
||||
lazy_static = "1.4"
|
||||
tokio = { version = "1.44", features = ["macros", "rt-multi-thread"] }
|
||||
lazy_static = "1.5"
|
||||
serde_json = "1.0"
|
||||
toml = "0.8"
|
||||
|
@ -203,7 +203,7 @@ impl Integration {
|
||||
|
||||
for stream_key in &srr.keys {
|
||||
for stream_id in &stream_key.ids {
|
||||
redis::cmd("XACK")
|
||||
let _: () = redis::cmd("XACK")
|
||||
.arg(&key)
|
||||
.arg(&self.consumer_group)
|
||||
.arg(&stream_id.id)
|
||||
|
@ -3,7 +3,7 @@
|
||||
description = "ChirpStack is an open-source LoRaWAN(TM) Network Server"
|
||||
repository = "https://github.com/chirpstack/chirpstack"
|
||||
homepage = "https://www.chirpstack.io/"
|
||||
version = "4.9.0"
|
||||
version = "4.12.0-test.3"
|
||||
authors = ["Orne Brocaar <info@brocaar.com>"]
|
||||
edition = "2021"
|
||||
publish = false
|
||||
@ -20,25 +20,22 @@
|
||||
serde_urlencoded = "0.7"
|
||||
humantime-serde = "1.1"
|
||||
toml = "0.8"
|
||||
handlebars = "6.0"
|
||||
handlebars = "6.3"
|
||||
validator = { version = "0.20", features = ["derive"] }
|
||||
|
||||
# Database
|
||||
email_address = "0.2"
|
||||
diesel = { version = "2.2", features = [
|
||||
"chrono",
|
||||
"numeric",
|
||||
"64-column-tables",
|
||||
] }
|
||||
diesel = { version = "2.2", features = ["chrono", "numeric"] }
|
||||
diesel_migrations = { version = "2.2" }
|
||||
diesel-async = { version = "0.5", features = [
|
||||
"deadpool",
|
||||
"async-connection-wrapper",
|
||||
] }
|
||||
tokio-postgres = { version = "0.7", optional = true }
|
||||
tokio-postgres-rustls = { version = "0.12", optional = true }
|
||||
tokio-postgres-rustls = { version = "0.13", optional = true }
|
||||
bigdecimal = "0.4"
|
||||
redis = { version = "0.26", features = ["tls-rustls", "tokio-rustls-comp"] }
|
||||
deadpool-redis = { version = "0.16", features = ["cluster"] }
|
||||
redis = { version = "0.29", features = ["tls-rustls", "tokio-rustls-comp"] }
|
||||
deadpool-redis = { version = "0.20", features = ["cluster", "serde"] }
|
||||
|
||||
# Logging
|
||||
tracing = "0.1"
|
||||
@ -55,6 +52,7 @@
|
||||
"diesel",
|
||||
"regions",
|
||||
"crypto",
|
||||
"applayer",
|
||||
] }
|
||||
backend = { path = "../backend" }
|
||||
|
||||
@ -74,7 +72,7 @@
|
||||
lapin = { version = "2.5", default-features = false }
|
||||
tokio-executor-trait = "2.1"
|
||||
tokio-reactor-trait = "1.1"
|
||||
rdkafka = { version = "0.36", default-features = false, features = [
|
||||
rdkafka = { version = "0.37", default-features = false, features = [
|
||||
"tokio",
|
||||
"cmake-build",
|
||||
] }
|
||||
@ -83,31 +81,30 @@
|
||||
tonic = "0.12"
|
||||
tonic-web = "0.12"
|
||||
tonic-reflection = "0.12"
|
||||
tokio = { version = "1.40", features = ["macros", "rt-multi-thread"] }
|
||||
tokio = { version = "1.44", features = ["macros", "rt-multi-thread"] }
|
||||
tokio-stream = "0.1"
|
||||
prost-types = "0.13"
|
||||
prost = "0.13"
|
||||
pbjson-types = "0.7"
|
||||
|
||||
# gRPC and HTTP multiplexing
|
||||
axum = "0.7"
|
||||
axum-server = { version = "0.7.1", features = ["tls-rustls-no-provider"] }
|
||||
axum = "0.8"
|
||||
axum-server = { version = "0.7", features = ["tls-rustls-no-provider"] }
|
||||
tower = { version = "0.5", features = ["util"] }
|
||||
futures = "0.3"
|
||||
futures-util = "0.3"
|
||||
http = "1.1"
|
||||
http = "1.3"
|
||||
http-body = "1.0"
|
||||
rust-embed = "8.5"
|
||||
rust-embed = "8.6"
|
||||
mime_guess = "2.0"
|
||||
tower-http = { version = "0.5", features = ["trace", "auth"] }
|
||||
tower-http = { version = "0.6", features = ["trace", "auth"] }
|
||||
|
||||
# Error handling
|
||||
thiserror = "1.0"
|
||||
thiserror = "2.0"
|
||||
anyhow = "1.0"
|
||||
|
||||
# Authentication
|
||||
pbkdf2 = { version = "0.12", features = ["simple"] }
|
||||
rand_core = { version = "0.6", features = ["std"] }
|
||||
jsonwebtoken = "9.3"
|
||||
rustls = { version = "0.23", default-features = false, features = [
|
||||
"logging",
|
||||
@ -116,15 +113,14 @@
|
||||
"ring",
|
||||
] }
|
||||
rustls-native-certs = "0.8"
|
||||
rustls-pemfile = "2.1"
|
||||
rustls-pemfile = "2.2"
|
||||
pem = "3.0"
|
||||
x509-parser = "0.16"
|
||||
x509-parser = "0.17"
|
||||
rsa = "0.9"
|
||||
elliptic-curve = { version = "0.13", features = ["pem"] }
|
||||
p256 = "0.13"
|
||||
sec1 = { version = "0.7.3", features = ["alloc", "pem", "pkcs8"] }
|
||||
rcgen = { version = "0.13.1", features = ["x509-parser"] }
|
||||
oauth2 = "5.0.0-alpha.4"
|
||||
openidconnect = { version = "4.0.0-alpha.2", features = [
|
||||
oauth2 = "5.0.0"
|
||||
openidconnect = { version = "4.0.0", features = [
|
||||
"accept-rfc3339-timestamps",
|
||||
] }
|
||||
|
||||
@ -133,7 +129,7 @@
|
||||
hex = "0.4"
|
||||
|
||||
# Codecs
|
||||
rquickjs = { version = "0.6", features = [
|
||||
rquickjs = { version = "0.9", features = [
|
||||
"bindgen",
|
||||
"loader",
|
||||
"array-buffer",
|
||||
@ -142,15 +138,15 @@
|
||||
|
||||
# Misc
|
||||
lazy_static = "1.5"
|
||||
uuid = { version = "1.10", features = ["v4", "serde"] }
|
||||
uuid = { version = "1.16", features = ["v4", "serde"] }
|
||||
chrono = "0.4"
|
||||
async-trait = "0.1"
|
||||
aes = "0.8"
|
||||
rand = "0.8"
|
||||
rand = "0.9"
|
||||
base64 = "0.22"
|
||||
async-recursion = "1.1"
|
||||
regex = "1.10"
|
||||
petgraph = "0.6"
|
||||
regex = "1.11"
|
||||
petgraph = "0.7"
|
||||
prometheus-client = "0.22"
|
||||
pin-project = "1.1"
|
||||
scoped-futures = { version = "0.1", features = ["std"] }
|
||||
@ -160,7 +156,7 @@
|
||||
# Development and testing
|
||||
[dev-dependencies]
|
||||
httpmock = "0.7.0"
|
||||
bytes = "1.7"
|
||||
bytes = "1.10"
|
||||
dotenv = "0.15"
|
||||
|
||||
[features]
|
||||
@ -235,9 +231,15 @@
|
||||
"/etc/chirpstack/region_us915_7.toml",
|
||||
]
|
||||
suggests = "postgresql, mosquitto, redis"
|
||||
conflicts = "chirpstack-sqlite"
|
||||
maintainer-scripts = "debian/"
|
||||
systemd-units = { enable = true }
|
||||
|
||||
[package.metadata.deb.variants.sqlite]
|
||||
name = "chirpstack-sqlite"
|
||||
suggests = "mosquitto, redis"
|
||||
conflicts = "chirpstack"
|
||||
|
||||
[package.metadata.generate-rpm]
|
||||
auto-req = "no"
|
||||
|
||||
@ -259,3 +261,17 @@ chmod 640 /etc/chirpstack/*.toml
|
||||
{ source = "configuration/*", dest = "/etc/chirpstack" },
|
||||
{ source = "rpm/chirpstack.service", dest = "/lib/systemd/system/chirpstack.service" },
|
||||
]
|
||||
|
||||
[package.metadata.generate-rpm.conflicts]
|
||||
chirpstack-sqlite = "*"
|
||||
|
||||
[package.metadata.generate-rpm.variants.sqlite]
|
||||
name = "chirpstack-sqlite"
|
||||
assets = [
|
||||
{ source = "target/release/chirpstack", dest = "/usr/bin/chirpstack", mode = "755" },
|
||||
{ source = "configuration/*", dest = "/etc/chirpstack" },
|
||||
{ source = "rpm/chirpstack.service", dest = "/lib/systemd/system/chirpstack-sqlite.service" },
|
||||
]
|
||||
|
||||
[package.metadata.generate-rpm.variants.sqlite.conflicts]
|
||||
chirpstack = "*"
|
||||
|
@ -2,6 +2,11 @@
|
||||
|
||||
PKG_VERSION := $(shell cargo metadata --no-deps --format-version 1 | jq -r '.packages[0].version')
|
||||
DATABASE ?= postgres
|
||||
ifeq ($(DATABASE),postgres)
|
||||
VARIANT_FLAGS ?=
|
||||
else
|
||||
VARIANT_FLAGS ?= --variant="$(DATABASE)"
|
||||
endif
|
||||
|
||||
debug-amd64:
|
||||
cross build --target x86_64-unknown-linux-musl --no-default-features --features="$(DATABASE)"
|
||||
@ -17,13 +22,13 @@ dist:
|
||||
cross build --target x86_64-unknown-linux-musl --release --no-default-features --features="$(DATABASE)"
|
||||
cross build --target armv7-unknown-linux-musleabihf --release --no-default-features --features="$(DATABASE)"
|
||||
|
||||
cargo deb --target x86_64-unknown-linux-musl --no-build --no-strip
|
||||
cargo deb --target armv7-unknown-linux-musleabihf --no-build --no-strip
|
||||
cargo deb --target aarch64-unknown-linux-musl --no-build --no-strip
|
||||
cargo deb --target x86_64-unknown-linux-musl --no-build --no-strip $(VARIANT_FLAGS)
|
||||
cargo deb --target armv7-unknown-linux-musleabihf --no-build --no-strip $(VARIANT_FLAGS)
|
||||
cargo deb --target aarch64-unknown-linux-musl --no-build --no-strip $(VARIANT_FLAGS)
|
||||
|
||||
cargo generate-rpm --target x86_64-unknown-linux-musl --target-dir ../target
|
||||
cargo generate-rpm --target armv7-unknown-linux-musleabihf --target-dir ../target
|
||||
cargo generate-rpm --target aarch64-unknown-linux-musl --target-dir ../target
|
||||
cargo generate-rpm --target x86_64-unknown-linux-musl --target-dir ../target $(VARIANT_FLAGS)
|
||||
cargo generate-rpm --target armv7-unknown-linux-musleabihf --target-dir ../target $(VARIANT_FLAGS)
|
||||
cargo generate-rpm --target aarch64-unknown-linux-musl --target-dir ../target $(VARIANT_FLAGS)
|
||||
|
||||
mkdir -p ../dist
|
||||
|
||||
@ -35,19 +40,19 @@ dist:
|
||||
cp ../target/armv7-unknown-linux-musleabihf/generate-rpm/*.rpm ../dist
|
||||
cp ../target/aarch64-unknown-linux-musl/generate-rpm/*.rpm ../dist
|
||||
|
||||
tar -czvf ../dist/chirpstack_$(PKG_VERSION)_amd64.tar.gz -C ../target/x86_64-unknown-linux-musl/release chirpstack
|
||||
tar -czvf ../dist/chirpstack_$(PKG_VERSION)_armv7hf.tar.gz -C ../target/armv7-unknown-linux-musleabihf/release chirpstack
|
||||
tar -czvf ../dist/chirpstack_$(PKG_VERSION)_arm64.tar.gz -C ../target/aarch64-unknown-linux-musl/release chirpstack
|
||||
tar -czvf ../dist/chirpstack_$(PKG_VERSION)_$(DATABASE)_amd64.tar.gz -C ../target/x86_64-unknown-linux-musl/release chirpstack
|
||||
tar -czvf ../dist/chirpstack_$(PKG_VERSION)_$(DATABASE)_armv7hf.tar.gz -C ../target/armv7-unknown-linux-musleabihf/release chirpstack
|
||||
tar -czvf ../dist/chirpstack_$(PKG_VERSION)_$(DATABASE)_arm64.tar.gz -C ../target/aarch64-unknown-linux-musl/release chirpstack
|
||||
|
||||
test:
|
||||
cargo fmt --check
|
||||
cargo clippy --no-deps --no-default-features --features="$(DATABASE)"
|
||||
TZ=UTC cargo test --no-default-features --features="$(DATABASE)"
|
||||
RUST_MIN_STACK=8388608 TZ=UTC cargo test --no-default-features --features="$(DATABASE)"
|
||||
|
||||
test-all:
|
||||
cargo fmt --check
|
||||
cargo clippy --no-deps --no-default-features --features="$(DATABASE)"
|
||||
TZ=UTC cargo test --no-default-features --features="$(DATABASE),test-all-integrations"
|
||||
RUST_MIN_STACK=8388608 TZ=UTC cargo test --no-default-features --features="$(DATABASE),test-all-integrations"
|
||||
|
||||
migration-generate:
|
||||
ifeq ($(NAME),)
|
||||
|
@ -0,0 +1,2 @@
|
||||
alter table device_keys
|
||||
alter column dev_nonces type int[] using '{}';
|
@ -0,0 +1,7 @@
|
||||
alter table device_keys
|
||||
alter column dev_nonces type jsonb using jsonb_build_object('0000000000000000', dev_nonces);
|
||||
|
||||
update device_keys
|
||||
set dev_nonces = jsonb_build_object(encode(device.join_eui, 'hex'), dev_nonces->'0000000000000000')
|
||||
from device
|
||||
where device.dev_eui = device_keys.dev_eui;
|
@ -0,0 +1,90 @@
|
||||
alter table device_profile
|
||||
add column abp_rx1_delay smallint not null default 0,
|
||||
add column abp_rx1_dr_offset smallint not null default 0,
|
||||
add column abp_rx2_dr smallint not null default 0,
|
||||
add column abp_rx2_freq bigint not null default 0,
|
||||
add column class_b_timeout integer not null default 0,
|
||||
add column class_b_ping_slot_nb_k integer not null default 0,
|
||||
add column class_b_ping_slot_dr smallint not null default 0,
|
||||
add column class_b_ping_slot_freq bigint not null default 0,
|
||||
add column class_c_timeout integer not null default 0,
|
||||
add column is_relay boolean not null default false,
|
||||
add column is_relay_ed boolean not null default false,
|
||||
add column relay_ed_relay_only boolean not null default false,
|
||||
add column relay_enabled boolean not null default false,
|
||||
add column relay_cad_periodicity smallint not null default 0,
|
||||
add column relay_default_channel_index smallint not null default 0,
|
||||
add column relay_second_channel_freq bigint not null default 0,
|
||||
add column relay_second_channel_dr smallint not null default 0,
|
||||
add column relay_second_channel_ack_offset smallint not null default 0,
|
||||
add column relay_ed_activation_mode smallint not null default 0,
|
||||
add column relay_ed_smart_enable_level smallint not null default 0,
|
||||
add column relay_ed_back_off smallint not null default 0,
|
||||
add column relay_ed_uplink_limit_bucket_size smallint not null default 0,
|
||||
add column relay_ed_uplink_limit_reload_rate smallint not null default 0,
|
||||
add column relay_join_req_limit_reload_rate smallint not null default 0,
|
||||
add column relay_notify_limit_reload_rate smallint not null default 0,
|
||||
add column relay_global_uplink_limit_reload_rate smallint not null default 0,
|
||||
add column relay_overall_limit_reload_rate smallint not null default 0,
|
||||
add column relay_join_req_limit_bucket_size smallint not null default 0,
|
||||
add column relay_notify_limit_bucket_size smallint not null default 0,
|
||||
add column relay_global_uplink_limit_bucket_size smallint not null default 0,
|
||||
add column relay_overall_limit_bucket_size smallint not null default 0;
|
||||
|
||||
update device_profile
|
||||
set
|
||||
abp_rx1_delay = (abp_params->'rx1_delay')::smallint,
|
||||
abp_rx1_dr_offset = (abp_params->'rx1_dr_offset')::smallint,
|
||||
abp_rx2_dr = (abp_params->'rx2_dr')::smallint,
|
||||
abp_rx2_freq = (abp_params->'rx2_freq')::bigint
|
||||
where
|
||||
abp_params is not null;
|
||||
|
||||
update device_profile
|
||||
set
|
||||
class_b_timeout = (class_b_params->'timeout')::integer,
|
||||
class_b_ping_slot_nb_k = (class_b_params->'ping_slot_nb_k')::integer,
|
||||
class_b_ping_slot_dr = (class_b_params->'ping_slot_dr')::smallint,
|
||||
class_b_ping_slot_freq = (class_b_params->'ping_slot_freq')::bigint
|
||||
where
|
||||
class_b_params is not null;
|
||||
|
||||
update device_profile
|
||||
set
|
||||
class_c_timeout = (class_c_params->'timeout')::integer
|
||||
where
|
||||
class_c_params is not null;
|
||||
|
||||
update device_profile
|
||||
set
|
||||
is_relay = (relay_params->'is_relay')::boolean,
|
||||
is_relay_ed = (relay_params->'is_relay_ed')::boolean,
|
||||
relay_ed_relay_only = (relay_params->'ed_relay_only')::boolean,
|
||||
relay_enabled = (relay_params->'relay_enabled')::boolean,
|
||||
relay_cad_periodicity = (relay_params->'relay_cad_periodicity')::smallint,
|
||||
relay_default_channel_index = (relay_params->'default_channel_index')::smallint,
|
||||
relay_second_channel_freq = (relay_params->'second_channel_freq')::bigint,
|
||||
relay_second_channel_dr = (relay_params->'second_channel_dr')::smallint,
|
||||
relay_second_channel_ack_offset = (relay_params->'second_channel_ack_offset')::smallint,
|
||||
relay_ed_activation_mode = (relay_params->'ed_activation_mode')::smallint,
|
||||
relay_ed_smart_enable_level = (relay_params->'ed_smart_enable_level')::smallint,
|
||||
relay_ed_back_off = (relay_params->'ed_back_off')::smallint,
|
||||
relay_ed_uplink_limit_bucket_size = (relay_params->'ed_uplink_limit_bucket_size')::smallint,
|
||||
relay_ed_uplink_limit_reload_rate = (relay_params->'ed_uplink_limit_reload_rate')::smallint,
|
||||
relay_join_req_limit_reload_rate = (relay_params->'relay_join_req_limit_reload_rate')::smallint,
|
||||
relay_notify_limit_reload_rate = (relay_params->'relay_notify_limit_reload_rate')::smallint,
|
||||
relay_global_uplink_limit_reload_rate = (relay_params->'relay_global_uplink_limit_reload_rate')::smallint,
|
||||
relay_overall_limit_reload_rate = (relay_params->'relay_overall_limit_reload_rate')::smallint,
|
||||
relay_join_req_limit_bucket_size = (relay_params->'relay_join_req_limit_bucket_size')::smallint,
|
||||
relay_notify_limit_bucket_size = (relay_params->'relay_notify_limit_bucket_size')::smallint,
|
||||
relay_global_uplink_limit_bucket_size = (relay_params->'relay_global_uplink_limit_bucket_size')::smallint,
|
||||
relay_overall_limit_bucket_size = (relay_params->'relay_overall_limit_bucket_size')::smallint
|
||||
where
|
||||
relay_params is not null;
|
||||
|
||||
alter table device_profile
|
||||
drop column abp_params,
|
||||
drop column class_b_params,
|
||||
drop column class_c_params,
|
||||
drop column relay_params,
|
||||
drop column app_layer_params;
|
@ -0,0 +1,92 @@
|
||||
alter table device_profile
|
||||
add column abp_params jsonb null,
|
||||
add column class_b_params jsonb null,
|
||||
add column class_c_params jsonb null,
|
||||
add column relay_params jsonb null,
|
||||
add column app_layer_params jsonb not null default '{}';
|
||||
|
||||
alter table device_profile
|
||||
alter column app_layer_params drop default;
|
||||
|
||||
update device_profile
|
||||
set abp_params = json_build_object(
|
||||
'rx1_delay', abp_rx1_delay,
|
||||
'rx1_dr_offset', abp_rx1_dr_offset,
|
||||
'rx2_dr', abp_rx2_dr,
|
||||
'rx2_freq', abp_rx2_freq)
|
||||
where supports_otaa = false;
|
||||
|
||||
update device_profile
|
||||
set class_b_params = json_build_object(
|
||||
'timeout', class_b_timeout,
|
||||
'ping_slot_nb_k', class_b_ping_slot_nb_k,
|
||||
'ping_slot_dr', class_b_ping_slot_dr,
|
||||
'ping_slot_freq', class_b_ping_slot_freq)
|
||||
where supports_class_b = true;
|
||||
|
||||
update device_profile
|
||||
set class_c_params = json_build_object(
|
||||
'timeout', class_c_timeout)
|
||||
where
|
||||
supports_class_c = true;
|
||||
|
||||
update device_profile
|
||||
set relay_params = json_build_object(
|
||||
'is_relay', is_relay,
|
||||
'is_relay_ed', is_relay_ed,
|
||||
'ed_relay_only', relay_ed_relay_only,
|
||||
'relay_enabled', relay_enabled,
|
||||
'relay_cad_periodicity', relay_cad_periodicity,
|
||||
'default_channel_index', relay_default_channel_index,
|
||||
'second_channel_freq', relay_second_channel_freq,
|
||||
'second_channel_dr', relay_second_channel_dr,
|
||||
'second_channel_ack_offset', relay_second_channel_ack_offset,
|
||||
'ed_activation_mode', relay_ed_activation_mode,
|
||||
'ed_smart_enable_level', relay_ed_smart_enable_level,
|
||||
'ed_back_off', relay_ed_back_off,
|
||||
'ed_uplink_limit_bucket_size', relay_ed_uplink_limit_bucket_size,
|
||||
'ed_uplink_limit_reload_rate', relay_ed_uplink_limit_reload_rate,
|
||||
'relay_join_req_limit_reload_rate', relay_join_req_limit_reload_rate,
|
||||
'relay_notify_limit_reload_rate', relay_notify_limit_reload_rate,
|
||||
'relay_global_uplink_limit_reload_rate', relay_global_uplink_limit_reload_rate,
|
||||
'relay_overall_limit_reload_rate', relay_overall_limit_reload_rate,
|
||||
'relay_join_req_limit_bucket_size', relay_join_req_limit_bucket_size,
|
||||
'relay_notify_limit_bucket_size', relay_notify_limit_bucket_size,
|
||||
'relay_global_uplink_limit_bucket_size', relay_global_uplink_limit_bucket_size,
|
||||
'relay_overall_limit_bucket_size', relay_overall_limit_bucket_size)
|
||||
where
|
||||
is_relay = true or is_relay_ed = true;
|
||||
|
||||
alter table device_profile
|
||||
drop column abp_rx1_delay,
|
||||
drop column abp_rx1_dr_offset,
|
||||
drop column abp_rx2_dr,
|
||||
drop column abp_rx2_freq,
|
||||
drop column class_b_timeout,
|
||||
drop column class_b_ping_slot_nb_k,
|
||||
drop column class_b_ping_slot_dr,
|
||||
drop column class_b_ping_slot_freq,
|
||||
drop column class_c_timeout,
|
||||
drop column is_relay,
|
||||
drop column is_relay_ed,
|
||||
drop column relay_ed_relay_only,
|
||||
drop column relay_enabled,
|
||||
drop column relay_cad_periodicity,
|
||||
drop column relay_default_channel_index,
|
||||
drop column relay_second_channel_freq,
|
||||
drop column relay_second_channel_dr,
|
||||
drop column relay_second_channel_ack_offset,
|
||||
drop column relay_ed_activation_mode,
|
||||
drop column relay_ed_smart_enable_level,
|
||||
drop column relay_ed_back_off,
|
||||
drop column relay_ed_uplink_limit_bucket_size,
|
||||
drop column relay_ed_uplink_limit_reload_rate,
|
||||
drop column relay_join_req_limit_reload_rate,
|
||||
drop column relay_notify_limit_reload_rate,
|
||||
drop column relay_global_uplink_limit_reload_rate,
|
||||
drop column relay_overall_limit_reload_rate,
|
||||
drop column relay_join_req_limit_bucket_size,
|
||||
drop column relay_notify_limit_bucket_size,
|
||||
drop column relay_global_uplink_limit_bucket_size,
|
||||
drop column relay_overall_limit_bucket_size;
|
||||
|
@ -0,0 +1,10 @@
|
||||
alter table device
|
||||
drop column app_layer_params;
|
||||
|
||||
alter table device_keys
|
||||
drop column gen_app_key;
|
||||
|
||||
drop table fuota_deployment_job;
|
||||
drop table fuota_deployment_gateway;
|
||||
drop table fuota_deployment_device;
|
||||
drop table fuota_deployment;
|
@ -0,0 +1,81 @@
|
||||
create table fuota_deployment (
|
||||
id uuid primary key,
|
||||
created_at timestamp with time zone not null,
|
||||
updated_at timestamp with time zone not null,
|
||||
started_at timestamp with time zone null,
|
||||
completed_at timestamp with time zone null,
|
||||
name varchar(100) not null,
|
||||
application_id uuid not null references application on delete cascade,
|
||||
device_profile_id uuid not null references device_profile on delete cascade,
|
||||
multicast_addr bytea not null,
|
||||
multicast_key bytea not null,
|
||||
multicast_group_type char(1) not null,
|
||||
multicast_class_c_scheduling_type varchar(20) not null,
|
||||
multicast_dr smallint not null,
|
||||
multicast_class_b_ping_slot_nb_k smallint not null,
|
||||
multicast_frequency bigint not null,
|
||||
multicast_timeout smallint not null,
|
||||
multicast_session_start timestamp with time zone null,
|
||||
multicast_session_end timestamp with time zone null,
|
||||
unicast_max_retry_count smallint not null,
|
||||
fragmentation_fragment_size smallint not null,
|
||||
fragmentation_redundancy_percentage smallint not null,
|
||||
fragmentation_session_index smallint not null,
|
||||
fragmentation_matrix smallint not null,
|
||||
fragmentation_block_ack_delay smallint not null,
|
||||
fragmentation_descriptor bytea not null,
|
||||
request_fragmentation_session_status varchar(20) not null,
|
||||
payload bytea not null,
|
||||
on_complete_set_device_tags jsonb not null
|
||||
);
|
||||
|
||||
create table fuota_deployment_device (
|
||||
fuota_deployment_id uuid not null references fuota_deployment on delete cascade,
|
||||
dev_eui bytea not null references device on delete cascade,
|
||||
created_at timestamp with time zone not null,
|
||||
completed_at timestamp with time zone null,
|
||||
mc_group_setup_completed_at timestamp with time zone null,
|
||||
mc_session_completed_at timestamp with time zone null,
|
||||
frag_session_setup_completed_at timestamp with time zone null,
|
||||
frag_status_completed_at timestamp with time zone null,
|
||||
error_msg text not null,
|
||||
|
||||
primary key (fuota_deployment_id, dev_eui)
|
||||
);
|
||||
|
||||
create table fuota_deployment_gateway (
|
||||
fuota_deployment_id uuid not null references fuota_deployment on delete cascade,
|
||||
gateway_id bytea not null references gateway on delete cascade,
|
||||
created_at timestamp with time zone not null,
|
||||
|
||||
primary key (fuota_deployment_id, gateway_id)
|
||||
);
|
||||
|
||||
create table fuota_deployment_job (
|
||||
fuota_deployment_id uuid not null references fuota_deployment on delete cascade,
|
||||
job varchar(20) not null,
|
||||
created_at timestamp with time zone not null,
|
||||
completed_at timestamp with time zone null,
|
||||
max_retry_count smallint not null,
|
||||
attempt_count smallint not null,
|
||||
scheduler_run_after timestamp with time zone not null,
|
||||
warning_msg text not null,
|
||||
error_msg text not null,
|
||||
|
||||
primary key (fuota_deployment_id, job)
|
||||
);
|
||||
|
||||
create index idx_fuota_deployment_job_completed_at on fuota_deployment_job(completed_at);
|
||||
create index idx_fuota_deployment_job_scheduler_run_after on fuota_deployment_job(scheduler_run_after);
|
||||
|
||||
alter table device_keys
|
||||
add column gen_app_key bytea not null default decode('00000000000000000000000000000000', 'hex');
|
||||
|
||||
alter table device_keys
|
||||
alter column gen_app_key drop default;
|
||||
|
||||
alter table device
|
||||
add column app_layer_params jsonb not null default '{}';
|
||||
|
||||
alter table device
|
||||
alter column app_layer_params drop default;
|
@ -0,0 +1 @@
|
||||
update device_keys set dev_nonces = '[]';
|
@ -0,0 +1 @@
|
||||
update device_keys set dev_nonces = '{}';
|
@ -0,0 +1,89 @@
|
||||
alter table device_profile add column abp_rx1_delay smallint not null default 0;
|
||||
alter table device_profile add column abp_rx1_dr_offset smallint not null default 0;
|
||||
alter table device_profile add column abp_rx2_dr smallint not null default 0;
|
||||
alter table device_profile add column abp_rx2_freq bigint not null default 0;
|
||||
alter table device_profile add column class_b_timeout integer not null default 0;
|
||||
alter table device_profile add column class_b_ping_slot_nb_k integer not null default 0;
|
||||
alter table device_profile add column class_b_ping_slot_dr smallint not null default 0;
|
||||
alter table device_profile add column class_b_ping_slot_freq bigint not null default 0;
|
||||
alter table device_profile add column class_c_timeout integer not null default 0;
|
||||
alter table device_profile add column is_relay boolean not null default false;
|
||||
alter table device_profile add column is_relay_ed boolean not null default false;
|
||||
alter table device_profile add column relay_ed_relay_only boolean not null default false;
|
||||
alter table device_profile add column relay_enabled boolean not null default false;
|
||||
alter table device_profile add column relay_cad_periodicity smallint not null default 0;
|
||||
alter table device_profile add column relay_default_channel_index smallint not null default 0;
|
||||
alter table device_profile add column relay_second_channel_freq bigint not null default 0;
|
||||
alter table device_profile add column relay_second_channel_dr smallint not null default 0;
|
||||
alter table device_profile add column relay_second_channel_ack_offset smallint not null default 0;
|
||||
alter table device_profile add column relay_ed_activation_mode smallint not null default 0;
|
||||
alter table device_profile add column relay_ed_smart_enable_level smallint not null default 0;
|
||||
alter table device_profile add column relay_ed_back_off smallint not null default 0;
|
||||
alter table device_profile add column relay_ed_uplink_limit_bucket_size smallint not null default 0;
|
||||
alter table device_profile add column relay_ed_uplink_limit_reload_rate smallint not null default 0;
|
||||
alter table device_profile add column relay_join_req_limit_reload_rate smallint not null default 0;
|
||||
alter table device_profile add column relay_notify_limit_reload_rate smallint not null default 0;
|
||||
alter table device_profile add column relay_global_uplink_limit_reload_rate smallint not null default 0;
|
||||
alter table device_profile add column relay_overall_limit_reload_rate smallint not null default 0;
|
||||
alter table device_profile add column relay_join_req_limit_bucket_size smallint not null default 0;
|
||||
alter table device_profile add column relay_notify_limit_bucket_size smallint not null default 0;
|
||||
alter table device_profile add column relay_global_uplink_limit_bucket_size smallint not null default 0;
|
||||
alter table device_profile add column relay_overall_limit_bucket_size smallint not null default 0;
|
||||
|
||||
update device_profile
|
||||
set
|
||||
abp_rx1_delay = abp_params->'rx1_delay',
|
||||
abp_rx1_dr_offset = abp_params->'rx1_dr_offset',
|
||||
abp_rx2_dr = abp_params->'rx2_dr',
|
||||
abp_rx2_freq = abp_params->'rx2_freq'
|
||||
where
|
||||
abp_params is not null;
|
||||
|
||||
update device_profile
|
||||
set
|
||||
class_b_timeout = class_b_params->'timeout',
|
||||
class_b_ping_slot_nb_k = class_b_params->'ping_slot_nb_k',
|
||||
class_b_ping_slot_dr = class_b_params->'ping_slot_dr',
|
||||
class_b_ping_slot_freq = class_b_params->'ping_slot_freq'
|
||||
where
|
||||
class_b_params is not null;
|
||||
|
||||
update device_profile
|
||||
set
|
||||
class_c_timeout = class_c_params->'timeout'
|
||||
where
|
||||
class_c_params is not null;
|
||||
|
||||
update device_profile
|
||||
set
|
||||
is_relay = relay_params->'is_relay',
|
||||
is_relay_ed = relay_params->'is_relay_ed',
|
||||
relay_ed_relay_only = relay_params->'ed_relay_only',
|
||||
relay_enabled = relay_params->'relay_enabled',
|
||||
relay_cad_periodicity = relay_params->'relay_cad_periodicity',
|
||||
relay_default_channel_index = relay_params->'default_channel_index',
|
||||
relay_second_channel_freq = relay_params->'second_channel_freq',
|
||||
relay_second_channel_dr = relay_params->'second_channel_dr',
|
||||
relay_second_channel_ack_offset = relay_params->'second_channel_ack_offset',
|
||||
relay_ed_activation_mode = relay_params->'ed_activation_mode',
|
||||
relay_ed_smart_enable_level = relay_params->'ed_smart_enable_level',
|
||||
relay_ed_back_off = relay_params->'ed_back_off',
|
||||
relay_ed_uplink_limit_bucket_size = relay_params->'ed_uplink_limit_bucket_size',
|
||||
relay_ed_uplink_limit_reload_rate = relay_params->'ed_uplink_limit_reload_rate',
|
||||
relay_join_req_limit_reload_rate = relay_params->'relay_join_req_limit_reload_rate',
|
||||
relay_notify_limit_reload_rate = relay_params->'relay_notify_limit_reload_rate',
|
||||
relay_global_uplink_limit_reload_rate = relay_params->'relay_global_uplink_limit_reload_rate',
|
||||
relay_overall_limit_reload_rate = relay_params->'relay_overall_limit_reload_rate',
|
||||
relay_join_req_limit_bucket_size = relay_params->'relay_join_req_limit_bucket_size',
|
||||
relay_notify_limit_bucket_size = relay_params->'relay_notify_limit_bucket_size',
|
||||
relay_global_uplink_limit_bucket_size = relay_params->'relay_global_uplink_limit_bucket_size',
|
||||
relay_overall_limit_bucket_size = relay_params->'relay_overall_limit_bucket_size'
|
||||
where
|
||||
relay_params is not null;
|
||||
|
||||
alter table device_profile drop column abp_params;
|
||||
alter table device_profile drop column class_b_params;
|
||||
alter table device_profile drop column class_c_params;
|
||||
alter table device_profile drop column relay_params;
|
||||
alter table device_profile drop column app_layer_params;
|
||||
|
@ -0,0 +1,88 @@
|
||||
alter table device_profile add column abp_params text null;
|
||||
alter table device_profile add column class_b_params text null;
|
||||
alter table device_profile add column class_c_params text null;
|
||||
alter table device_profile add column relay_params text null;
|
||||
alter table device_profile add column app_layer_params text not null default '{}';
|
||||
|
||||
update device_profile
|
||||
set abp_params = json_object(
|
||||
'rx1_delay', abp_rx1_delay,
|
||||
'rx1_dr_offset', abp_rx1_dr_offset,
|
||||
'rx2_dr', abp_rx2_dr,
|
||||
'rx2_freq', abp_rx2_freq)
|
||||
where supports_otaa = false;
|
||||
|
||||
update device_profile
|
||||
set class_b_params = json_object(
|
||||
'timeout', class_b_timeout,
|
||||
'ping_slot_nb_k', class_b_ping_slot_nb_k,
|
||||
'ping_slot_dr', class_b_ping_slot_dr,
|
||||
'ping_slot_freq', class_b_ping_slot_freq)
|
||||
where supports_class_b = true;
|
||||
|
||||
update device_profile
|
||||
set class_c_params = json_object(
|
||||
'timeout', class_c_timeout)
|
||||
where supports_class_c = true;
|
||||
|
||||
update device_profile
|
||||
set relay_params = json_object(
|
||||
'is_relay', is_relay,
|
||||
'is_relay_ed', is_relay_ed,
|
||||
'ed_relay_only', relay_ed_relay_only,
|
||||
'relay_enabled', relay_enabled,
|
||||
'relay_cad_periodicity', relay_cad_periodicity,
|
||||
'default_channel_index', relay_default_channel_index,
|
||||
'second_channel_freq', relay_second_channel_freq,
|
||||
'second_channel_dr', relay_second_channel_dr,
|
||||
'second_channel_ack_offset', relay_second_channel_ack_offset,
|
||||
'ed_activation_mode', relay_ed_activation_mode,
|
||||
'ed_smart_enable_level', relay_ed_smart_enable_level,
|
||||
'ed_back_off', relay_ed_back_off,
|
||||
'ed_uplink_limit_bucket_size', relay_ed_uplink_limit_bucket_size,
|
||||
'ed_uplink_limit_reload_rate', relay_ed_uplink_limit_reload_rate,
|
||||
'relay_join_req_limit_reload_rate', relay_join_req_limit_reload_rate,
|
||||
'relay_notify_limit_reload_rate', relay_notify_limit_reload_rate,
|
||||
'relay_global_uplink_limit_reload_rate', relay_global_uplink_limit_reload_rate,
|
||||
'relay_overall_limit_reload_rate', relay_overall_limit_reload_rate,
|
||||
'relay_join_req_limit_bucket_size', relay_join_req_limit_bucket_size,
|
||||
'relay_notify_limit_bucket_size', relay_notify_limit_bucket_size,
|
||||
'relay_global_uplink_limit_bucket_size', relay_global_uplink_limit_bucket_size,
|
||||
'relay_overall_limit_bucket_size', relay_overall_limit_bucket_size)
|
||||
where is_relay = true or is_relay_ed is true;
|
||||
|
||||
alter table device_profile drop column abp_rx1_delay;
|
||||
alter table device_profile drop column abp_rx1_dr_offset;
|
||||
alter table device_profile drop column abp_rx2_dr;
|
||||
alter table device_profile drop column abp_rx2_freq;
|
||||
|
||||
alter table device_profile drop column class_b_timeout;
|
||||
alter table device_profile drop column class_b_ping_slot_nb_k;
|
||||
alter table device_profile drop column class_b_ping_slot_dr;
|
||||
alter table device_profile drop column class_b_ping_slot_freq;
|
||||
|
||||
alter table device_profile drop column class_c_timeout;
|
||||
|
||||
alter table device_profile drop column is_relay;
|
||||
alter table device_profile drop column is_relay_ed;
|
||||
alter table device_profile drop column relay_ed_relay_only;
|
||||
alter table device_profile drop column relay_enabled;
|
||||
alter table device_profile drop column relay_cad_periodicity;
|
||||
alter table device_profile drop column relay_default_channel_index;
|
||||
alter table device_profile drop column relay_second_channel_freq;
|
||||
alter table device_profile drop column relay_second_channel_dr;
|
||||
alter table device_profile drop column relay_second_channel_ack_offset;
|
||||
alter table device_profile drop column relay_ed_activation_mode;
|
||||
alter table device_profile drop column relay_ed_smart_enable_level;
|
||||
alter table device_profile drop column relay_ed_back_off;
|
||||
alter table device_profile drop column relay_ed_uplink_limit_bucket_size;
|
||||
alter table device_profile drop column relay_ed_uplink_limit_reload_rate;
|
||||
alter table device_profile drop column relay_join_req_limit_reload_rate;
|
||||
alter table device_profile drop column relay_notify_limit_reload_rate;
|
||||
alter table device_profile drop column relay_global_uplink_limit_reload_rate;
|
||||
alter table device_profile drop column relay_overall_limit_reload_rate;
|
||||
alter table device_profile drop column relay_join_req_limit_bucket_size;
|
||||
alter table device_profile drop column relay_notify_limit_bucket_size;
|
||||
alter table device_profile drop column relay_global_uplink_limit_bucket_size;
|
||||
alter table device_profile drop column relay_overall_limit_bucket_size;
|
||||
|
@ -0,0 +1,10 @@
|
||||
alter table device
|
||||
drop column app_layer_params;
|
||||
|
||||
alter table device_keys
|
||||
drop column gen_app_key;
|
||||
|
||||
drop table fuota_deployment_job;
|
||||
drop table fuota_deployment_gateway;
|
||||
drop table fuota_deployment_device;
|
||||
drop table fuota_deployment;
|
@ -0,0 +1,75 @@
|
||||
create table fuota_deployment (
|
||||
id text not null primary key,
|
||||
created_at datetime not null,
|
||||
updated_at datetime not null,
|
||||
started_at datetime null,
|
||||
completed_at datetime null,
|
||||
name varchar(100) not null,
|
||||
application_id text not null references application on delete cascade,
|
||||
device_profile_id text not null references device_profile on delete cascade,
|
||||
multicast_addr blob not null,
|
||||
multicast_key blob not null,
|
||||
multicast_group_type char(1) not null,
|
||||
multicast_class_c_scheduling_type varchar(20) not null,
|
||||
multicast_dr smallint not null,
|
||||
multicast_class_b_ping_slot_nb_k smallint not null,
|
||||
multicast_frequency bigint not null,
|
||||
multicast_timeout smallint not null,
|
||||
multicast_session_start datetime null,
|
||||
multicast_session_end datetime null,
|
||||
unicast_max_retry_count smallint not null,
|
||||
fragmentation_fragment_size smallint not null,
|
||||
fragmentation_redundancy_percentage smallint not null,
|
||||
fragmentation_session_index smallint not null,
|
||||
fragmentation_matrix smallint not null,
|
||||
fragmentation_block_ack_delay smallint not null,
|
||||
fragmentation_descriptor blob not null,
|
||||
request_fragmentation_session_status varchar(20) not null,
|
||||
payload blob not null,
|
||||
on_complete_set_device_tags text not null
|
||||
);
|
||||
|
||||
create table fuota_deployment_device (
|
||||
fuota_deployment_id text not null references fuota_deployment on delete cascade,
|
||||
dev_eui blob not null references device on delete cascade,
|
||||
created_at datetime not null,
|
||||
completed_at datetime null,
|
||||
mc_group_setup_completed_at datetime null,
|
||||
mc_session_completed_at datetime null,
|
||||
frag_session_setup_completed_at datetime null,
|
||||
frag_status_completed_at datetime null,
|
||||
error_msg text not null,
|
||||
|
||||
primary key (fuota_deployment_id, dev_eui)
|
||||
);
|
||||
|
||||
create table fuota_deployment_gateway (
|
||||
fuota_deployment_id text not null references fuota_deployment on delete cascade,
|
||||
gateway_id blob not null references gateway on delete cascade,
|
||||
created_at datetime not null,
|
||||
|
||||
primary key (fuota_deployment_id, gateway_id)
|
||||
);
|
||||
|
||||
create table fuota_deployment_job (
|
||||
fuota_deployment_id text not null references fuota_deployment on delete cascade,
|
||||
job varchar(20) not null,
|
||||
created_at datetime not null,
|
||||
completed_at datetime null,
|
||||
max_retry_count smallint not null,
|
||||
attempt_count smallint not null,
|
||||
scheduler_run_after datetime not null,
|
||||
warning_msg text not null,
|
||||
error_msg text not null,
|
||||
|
||||
primary key (fuota_deployment_id, job)
|
||||
);
|
||||
|
||||
create index idx_fuota_deployment_job_completed_at on fuota_deployment_job(completed_at);
|
||||
create index idx_fuota_deployment_job_scheduler_run_after on fuota_deployment_job(scheduler_run_after);
|
||||
|
||||
alter table device_keys
|
||||
add column gen_app_key blob not null default x'00000000000000000000000000000000';
|
||||
|
||||
alter table device
|
||||
add column app_layer_params text not null default '{}';
|
@ -1,6 +1,6 @@
|
||||
use anyhow::{Context, Result};
|
||||
use async_trait::async_trait;
|
||||
use rand::seq::SliceRandom;
|
||||
use rand::seq::IndexedRandom;
|
||||
|
||||
use super::{Handler, Request, Response};
|
||||
use crate::region;
|
||||
@ -134,7 +134,7 @@ impl Handler for Algorithm {
|
||||
// In case there are multiple with the same coding-rate, we take
|
||||
// a random one.
|
||||
resp.dr = drs
|
||||
.choose(&mut rand::thread_rng())
|
||||
.choose(&mut rand::rng())
|
||||
.cloned()
|
||||
.ok_or_else(|| anyhow!("Random returned None"))?;
|
||||
resp.nb_trans = 1; // 1 is the recommeded value
|
||||
|
@ -21,7 +21,7 @@ impl Plugin {
|
||||
let m = rquickjs::Module::declare(ctx, "script", script.clone())
|
||||
.context("Declare script")?;
|
||||
let (m, m_promise) = m.eval().context("Evaluate script")?;
|
||||
m_promise.finish()?;
|
||||
() = m_promise.finish()?;
|
||||
let id_func: rquickjs::Function = m.get("id").context("Get id function")?;
|
||||
let name_func: rquickjs::Function = m.get("name").context("Get name function")?;
|
||||
|
||||
@ -55,7 +55,7 @@ impl Handler for Plugin {
|
||||
let m = rquickjs::Module::declare(ctx.clone(), "script", self.script.clone())
|
||||
.context("Declare script")?;
|
||||
let (m, m_promise) = m.eval().context("Evaluate script")?;
|
||||
m_promise.finish()?;
|
||||
() = m_promise.finish()?;
|
||||
let func: rquickjs::Function = m.get("handle").context("Get handle function")?;
|
||||
|
||||
let device_variables = rquickjs::Object::new(ctx.clone())?;
|
||||
|
10
chirpstack/src/aeskey.rs
Normal file
10
chirpstack/src/aeskey.rs
Normal file
@ -0,0 +1,10 @@
|
||||
use rand::RngCore;
|
||||
|
||||
use lrwn::AES128Key;
|
||||
|
||||
pub fn get_random_aes_key() -> AES128Key {
|
||||
let mut rng = rand::rng();
|
||||
let mut key: [u8; 16] = [0; 16];
|
||||
rng.fill_bytes(&mut key);
|
||||
AES128Key::from_bytes(key)
|
||||
}
|
@ -1899,6 +1899,69 @@ impl ApplicationService for Application {
|
||||
|
||||
Ok(resp)
|
||||
}
|
||||
|
||||
async fn list_device_profiles(
|
||||
&self,
|
||||
request: Request<api::ListApplicationDeviceProfilesRequest>,
|
||||
) -> Result<Response<api::ListApplicationDeviceProfilesResponse>, Status> {
|
||||
let req = request.get_ref();
|
||||
let app_id = Uuid::from_str(&req.application_id).map_err(|e| e.status())?;
|
||||
|
||||
self.validator
|
||||
.validate(
|
||||
request.extensions(),
|
||||
validator::ValidateApplicationAccess::new(validator::Flag::Read, app_id),
|
||||
)
|
||||
.await?;
|
||||
|
||||
let dp_items = application::get_device_profiles(app_id)
|
||||
.await
|
||||
.map_err(|e| e.status())?;
|
||||
|
||||
let mut resp = Response::new(api::ListApplicationDeviceProfilesResponse {
|
||||
result: dp_items
|
||||
.iter()
|
||||
.map(|v| api::ApplicationDeviceProfileListItem {
|
||||
id: v.0.to_string(),
|
||||
name: v.1.clone(),
|
||||
})
|
||||
.collect(),
|
||||
});
|
||||
resp.metadata_mut()
|
||||
.insert("x-log-application_id", req.application_id.parse().unwrap());
|
||||
|
||||
Ok(resp)
|
||||
}
|
||||
|
||||
async fn list_device_tags(
|
||||
&self,
|
||||
request: Request<api::ListApplicationDeviceTagsRequest>,
|
||||
) -> Result<Response<api::ListApplicationDeviceTagsResponse>, Status> {
|
||||
let req = request.get_ref();
|
||||
let app_id = Uuid::from_str(&req.application_id).map_err(|e| e.status())?;
|
||||
|
||||
self.validator
|
||||
.validate(
|
||||
request.extensions(),
|
||||
validator::ValidateApplicationAccess::new(validator::Flag::Read, app_id),
|
||||
)
|
||||
.await?;
|
||||
|
||||
let tags = application::get_device_tags(app_id)
|
||||
.await
|
||||
.map_err(|e| e.status())?;
|
||||
|
||||
let mut resp = Response::new(api::ListApplicationDeviceTagsResponse {
|
||||
result: tags
|
||||
.into_iter()
|
||||
.map(|(k, v)| api::ApplicationDeviceTagListItem { key: k, values: v })
|
||||
.collect(),
|
||||
});
|
||||
resp.metadata_mut()
|
||||
.insert("x-log-application_id", req.application_id.parse().unwrap());
|
||||
|
||||
Ok(resp)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
@ -1947,7 +2010,7 @@ pub mod test {
|
||||
let mut create_req = Request::new(create_req);
|
||||
create_req
|
||||
.extensions_mut()
|
||||
.insert(AuthID::User(Into::<uuid::Uuid>::into(u.id).clone()));
|
||||
.insert(AuthID::User(Into::<uuid::Uuid>::into(u.id)));
|
||||
let create_resp = service.create(create_req).await.unwrap();
|
||||
let create_resp = create_resp.get_ref();
|
||||
|
||||
@ -1958,7 +2021,7 @@ pub mod test {
|
||||
let mut get_req = Request::new(get_req);
|
||||
get_req
|
||||
.extensions_mut()
|
||||
.insert(AuthID::User(Into::<uuid::Uuid>::into(u.id).clone()));
|
||||
.insert(AuthID::User(Into::<uuid::Uuid>::into(u.id)));
|
||||
let get_resp = service.get(get_req).await.unwrap();
|
||||
assert_eq!(
|
||||
Some(api::Application {
|
||||
@ -1982,7 +2045,7 @@ pub mod test {
|
||||
let mut up_req = Request::new(up_req);
|
||||
up_req
|
||||
.extensions_mut()
|
||||
.insert(AuthID::User(Into::<uuid::Uuid>::into(u.id).clone()));
|
||||
.insert(AuthID::User(Into::<uuid::Uuid>::into(u.id)));
|
||||
let _ = service.update(up_req).await.unwrap();
|
||||
|
||||
//get
|
||||
@ -1992,7 +2055,7 @@ pub mod test {
|
||||
let mut get_req = Request::new(get_req);
|
||||
get_req
|
||||
.extensions_mut()
|
||||
.insert(AuthID::User(Into::<uuid::Uuid>::into(u.id).clone()));
|
||||
.insert(AuthID::User(Into::<uuid::Uuid>::into(u.id)));
|
||||
let get_resp = service.get(get_req).await.unwrap();
|
||||
assert_eq!(
|
||||
Some(api::Application {
|
||||
@ -2014,7 +2077,7 @@ pub mod test {
|
||||
let mut list_req = Request::new(list_req);
|
||||
list_req
|
||||
.extensions_mut()
|
||||
.insert(AuthID::User(Into::<uuid::Uuid>::into(u.id).clone()));
|
||||
.insert(AuthID::User(Into::<uuid::Uuid>::into(u.id)));
|
||||
let list_resp = service.list(list_req).await.unwrap();
|
||||
assert_eq!(1, list_resp.get_ref().total_count);
|
||||
assert_eq!(1, list_resp.get_ref().result.len());
|
||||
@ -2026,7 +2089,7 @@ pub mod test {
|
||||
let mut del_req = Request::new(del_req);
|
||||
del_req
|
||||
.extensions_mut()
|
||||
.insert(AuthID::User(Into::<uuid::Uuid>::into(u.id).clone()));
|
||||
.insert(AuthID::User(Into::<uuid::Uuid>::into(u.id)));
|
||||
let _ = service.delete(del_req).await.unwrap();
|
||||
|
||||
let del_req = api::DeleteApplicationRequest {
|
||||
@ -2035,7 +2098,7 @@ pub mod test {
|
||||
let mut del_req = Request::new(del_req);
|
||||
del_req
|
||||
.extensions_mut()
|
||||
.insert(AuthID::User(Into::<uuid::Uuid>::into(u.id).clone()));
|
||||
.insert(AuthID::User(Into::<uuid::Uuid>::into(u.id)));
|
||||
let del_resp = service.delete(del_req).await;
|
||||
assert!(del_resp.is_err());
|
||||
}
|
||||
|
@ -12,7 +12,8 @@ use super::error::Error;
|
||||
use crate::api::auth::AuthID;
|
||||
use crate::helpers::errors::PrintFullError;
|
||||
use crate::storage::schema::{
|
||||
api_key, application, device, device_profile, gateway, multicast_group, tenant_user, user,
|
||||
api_key, application, device, device_profile, fuota_deployment, gateway, multicast_group,
|
||||
tenant_user, user,
|
||||
};
|
||||
use crate::storage::{fields, get_async_db_conn};
|
||||
|
||||
@ -2032,11 +2033,227 @@ impl Validator for ValidateMulticastGroupQueueAccess {
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ValidateFuotaDeploymentsAccess {
|
||||
flag: Flag,
|
||||
application_id: Uuid,
|
||||
}
|
||||
|
||||
impl ValidateFuotaDeploymentsAccess {
|
||||
pub fn new(flag: Flag, application_id: Uuid) -> Self {
|
||||
ValidateFuotaDeploymentsAccess {
|
||||
flag,
|
||||
application_id,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl Validator for ValidateFuotaDeploymentsAccess {
|
||||
async fn validate_user(&self, id: &Uuid) -> Result<i64, Error> {
|
||||
let mut q = user::dsl::user
|
||||
.select(dsl::count_star())
|
||||
.filter(
|
||||
user::dsl::id
|
||||
.eq(fields::Uuid::from(id))
|
||||
.and(user::dsl::is_active.eq(true)),
|
||||
)
|
||||
.into_boxed();
|
||||
|
||||
match self.flag {
|
||||
// admin user
|
||||
// tenant admin
|
||||
// tenant device admin
|
||||
Flag::Create => {
|
||||
q =
|
||||
q.filter(
|
||||
user::dsl::is_admin.eq(true).or(dsl::exists(
|
||||
application::dsl::application
|
||||
.inner_join(tenant_user::table.on(
|
||||
tenant_user::dsl::tenant_id.eq(application::dsl::tenant_id),
|
||||
))
|
||||
.filter(
|
||||
application::dsl::id
|
||||
.eq(fields::Uuid::from(self.application_id))
|
||||
.and(tenant_user::dsl::user_id.eq(user::dsl::id))
|
||||
.and(
|
||||
tenant_user::dsl::is_admin
|
||||
.eq(true)
|
||||
.or(tenant_user::dsl::is_device_admin.eq(true)),
|
||||
),
|
||||
),
|
||||
)),
|
||||
);
|
||||
}
|
||||
// admin user
|
||||
// tenant user
|
||||
Flag::List => {
|
||||
q =
|
||||
q.filter(
|
||||
user::dsl::is_admin.eq(true).or(dsl::exists(
|
||||
application::dsl::application
|
||||
.inner_join(tenant_user::table.on(
|
||||
tenant_user::dsl::tenant_id.eq(application::dsl::tenant_id),
|
||||
))
|
||||
.filter(
|
||||
application::dsl::id
|
||||
.eq(fields::Uuid::from(self.application_id))
|
||||
.and(tenant_user::dsl::user_id.eq(user::dsl::id)),
|
||||
),
|
||||
)),
|
||||
);
|
||||
}
|
||||
_ => return Ok(0),
|
||||
}
|
||||
|
||||
Ok(q.first(&mut get_async_db_conn().await?).await?)
|
||||
}
|
||||
|
||||
async fn validate_key(&self, id: &Uuid) -> Result<i64, Error> {
|
||||
let mut q = api_key::dsl::api_key
|
||||
.select(dsl::count_star())
|
||||
.filter(api_key::dsl::id.eq(fields::Uuid::from(id)))
|
||||
.into_boxed();
|
||||
|
||||
match self.flag {
|
||||
// admin api key
|
||||
// tenant api key
|
||||
Flag::Create | Flag::List => {
|
||||
q = q.filter(
|
||||
api_key::dsl::is_admin.eq(true).or(dsl::exists(
|
||||
application::dsl::application.filter(
|
||||
application::dsl::id
|
||||
.eq(fields::Uuid::from(self.application_id))
|
||||
.and(
|
||||
api_key::dsl::tenant_id
|
||||
.eq(application::dsl::tenant_id.nullable()),
|
||||
),
|
||||
),
|
||||
)),
|
||||
);
|
||||
}
|
||||
_ => {
|
||||
return Ok(0);
|
||||
}
|
||||
}
|
||||
|
||||
Ok(q.first(&mut get_async_db_conn().await?).await?)
|
||||
}
|
||||
}
|
||||
|
||||
pub struct ValidateFuotaDeploymentAccess {
|
||||
flag: Flag,
|
||||
fuota_deployment_id: Uuid,
|
||||
}
|
||||
|
||||
impl ValidateFuotaDeploymentAccess {
|
||||
pub fn new(flag: Flag, fuota_deployment_id: Uuid) -> Self {
|
||||
ValidateFuotaDeploymentAccess {
|
||||
flag,
|
||||
fuota_deployment_id,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[async_trait]
|
||||
impl Validator for ValidateFuotaDeploymentAccess {
|
||||
async fn validate_user(&self, id: &Uuid) -> Result<i64, Error> {
|
||||
let mut q = user::dsl::user
|
||||
.select(dsl::count_star())
|
||||
.filter(
|
||||
user::dsl::id
|
||||
.eq(fields::Uuid::from(id))
|
||||
.and(user::dsl::is_active.eq(true)),
|
||||
)
|
||||
.into_boxed();
|
||||
|
||||
match self.flag {
|
||||
// admin user
|
||||
// tenant user
|
||||
Flag::Read => {
|
||||
q =
|
||||
q.filter(
|
||||
user::dsl::is_admin.eq(true).or(dsl::exists(
|
||||
fuota_deployment::dsl::fuota_deployment
|
||||
.inner_join(application::table)
|
||||
.inner_join(tenant_user::table.on(
|
||||
tenant_user::dsl::tenant_id.eq(application::dsl::tenant_id),
|
||||
))
|
||||
.filter(
|
||||
fuota_deployment::dsl::id
|
||||
.eq(fields::Uuid::from(self.fuota_deployment_id))
|
||||
.and(tenant_user::dsl::user_id.eq(user::dsl::id)),
|
||||
),
|
||||
)),
|
||||
);
|
||||
}
|
||||
// admin user
|
||||
// tenant admin
|
||||
// tenant device admin
|
||||
Flag::Update | Flag::Delete => {
|
||||
q =
|
||||
q.filter(
|
||||
user::dsl::is_admin.eq(true).or(dsl::exists(
|
||||
fuota_deployment::dsl::fuota_deployment
|
||||
.inner_join(application::table)
|
||||
.inner_join(tenant_user::table.on(
|
||||
tenant_user::dsl::tenant_id.eq(application::dsl::tenant_id),
|
||||
))
|
||||
.filter(
|
||||
fuota_deployment::dsl::id
|
||||
.eq(fields::Uuid::from(self.fuota_deployment_id))
|
||||
.and(tenant_user::dsl::user_id.eq(user::dsl::id))
|
||||
.and(
|
||||
tenant_user::dsl::is_admin
|
||||
.eq(true)
|
||||
.or(tenant_user::dsl::is_device_admin.eq(true)),
|
||||
),
|
||||
),
|
||||
)),
|
||||
);
|
||||
}
|
||||
_ => return Ok(0),
|
||||
}
|
||||
|
||||
Ok(q.first(&mut get_async_db_conn().await?).await?)
|
||||
}
|
||||
|
||||
async fn validate_key(&self, id: &Uuid) -> Result<i64, Error> {
|
||||
let mut q = api_key::dsl::api_key
|
||||
.select(dsl::count_star())
|
||||
.filter(api_key::dsl::id.eq(fields::Uuid::from(id)))
|
||||
.into_boxed();
|
||||
|
||||
match self.flag {
|
||||
// admin api key
|
||||
// tenant api key
|
||||
Flag::Read | Flag::Update | Flag::Delete => {
|
||||
q = q.filter(
|
||||
api_key::dsl::is_admin.eq(true).or(dsl::exists(
|
||||
fuota_deployment::dsl::fuota_deployment
|
||||
.inner_join(application::table)
|
||||
.filter(
|
||||
fuota_deployment::dsl::id
|
||||
.eq(fields::Uuid::from(self.fuota_deployment_id))
|
||||
.and(
|
||||
api_key::dsl::tenant_id
|
||||
.eq(application::dsl::tenant_id.nullable()),
|
||||
),
|
||||
),
|
||||
)),
|
||||
);
|
||||
}
|
||||
_ => return Ok(0),
|
||||
}
|
||||
|
||||
Ok(q.first(&mut get_async_db_conn().await?).await?)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
pub mod test {
|
||||
use super::*;
|
||||
use crate::storage::{
|
||||
api_key, application, device, device_profile, gateway, multicast, tenant, user,
|
||||
api_key, application, device, device_profile, fuota, gateway, multicast, tenant, user,
|
||||
};
|
||||
use crate::test;
|
||||
use std::str::FromStr;
|
||||
@ -2266,7 +2483,7 @@ pub mod test {
|
||||
|
||||
tenant::add_user(tenant::TenantUser {
|
||||
tenant_id: tenant_a.id,
|
||||
user_id: tenant_user.id.into(),
|
||||
user_id: tenant_user.id,
|
||||
..Default::default()
|
||||
})
|
||||
.await
|
||||
@ -2274,7 +2491,7 @@ pub mod test {
|
||||
|
||||
tenant::add_user(tenant::TenantUser {
|
||||
tenant_id: tenant_a.id,
|
||||
user_id: tenant_admin.id.into(),
|
||||
user_id: tenant_admin.id,
|
||||
is_admin: true,
|
||||
..Default::default()
|
||||
})
|
||||
@ -2510,7 +2727,7 @@ pub mod test {
|
||||
|
||||
tenant::add_user(tenant::TenantUser {
|
||||
tenant_id: tenant_a.id,
|
||||
user_id: tenant_admin.id.into(),
|
||||
user_id: tenant_admin.id,
|
||||
is_admin: true,
|
||||
..Default::default()
|
||||
})
|
||||
@ -2518,21 +2735,21 @@ pub mod test {
|
||||
.unwrap();
|
||||
tenant::add_user(tenant::TenantUser {
|
||||
tenant_id: tenant_a.id,
|
||||
user_id: tenant_user.id.into(),
|
||||
user_id: tenant_user.id,
|
||||
..Default::default()
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
tenant::add_user(tenant::TenantUser {
|
||||
tenant_id: api_key_tenant.tenant_id.unwrap().into(),
|
||||
user_id: tenant_user.id.into(),
|
||||
tenant_id: api_key_tenant.tenant_id.unwrap(),
|
||||
user_id: tenant_user.id,
|
||||
..Default::default()
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
tenant::add_user(tenant::TenantUser {
|
||||
tenant_id: tenant_a.id,
|
||||
user_id: tenant_user_other.id.into(),
|
||||
user_id: tenant_user_other.id,
|
||||
..Default::default()
|
||||
})
|
||||
.await
|
||||
@ -2874,7 +3091,7 @@ pub mod test {
|
||||
|
||||
tenant::add_user(tenant::TenantUser {
|
||||
tenant_id: tenant_a.id,
|
||||
user_id: tenant_admin.id.into(),
|
||||
user_id: tenant_admin.id,
|
||||
is_admin: true,
|
||||
..Default::default()
|
||||
})
|
||||
@ -2882,7 +3099,7 @@ pub mod test {
|
||||
.unwrap();
|
||||
tenant::add_user(tenant::TenantUser {
|
||||
tenant_id: tenant_a.id,
|
||||
user_id: tenant_device_admin.id.into(),
|
||||
user_id: tenant_device_admin.id,
|
||||
is_device_admin: true,
|
||||
..Default::default()
|
||||
})
|
||||
@ -2890,7 +3107,7 @@ pub mod test {
|
||||
.unwrap();
|
||||
tenant::add_user(tenant::TenantUser {
|
||||
tenant_id: tenant_a.id,
|
||||
user_id: tenant_gateway_admin.id.into(),
|
||||
user_id: tenant_gateway_admin.id,
|
||||
is_gateway_admin: true,
|
||||
..Default::default()
|
||||
})
|
||||
@ -2898,7 +3115,7 @@ pub mod test {
|
||||
.unwrap();
|
||||
tenant::add_user(tenant::TenantUser {
|
||||
tenant_id: tenant_a.id,
|
||||
user_id: tenant_user.id.into(),
|
||||
user_id: tenant_user.id,
|
||||
..Default::default()
|
||||
})
|
||||
.await
|
||||
@ -3321,7 +3538,7 @@ pub mod test {
|
||||
|
||||
tenant::add_user(tenant::TenantUser {
|
||||
tenant_id: tenant_a.id,
|
||||
user_id: tenant_admin.id.into(),
|
||||
user_id: tenant_admin.id,
|
||||
is_admin: true,
|
||||
..Default::default()
|
||||
})
|
||||
@ -3329,7 +3546,7 @@ pub mod test {
|
||||
.unwrap();
|
||||
tenant::add_user(tenant::TenantUser {
|
||||
tenant_id: tenant_a.id,
|
||||
user_id: tenant_device_admin.id.into(),
|
||||
user_id: tenant_device_admin.id,
|
||||
is_device_admin: true,
|
||||
..Default::default()
|
||||
})
|
||||
@ -3337,7 +3554,7 @@ pub mod test {
|
||||
.unwrap();
|
||||
tenant::add_user(tenant::TenantUser {
|
||||
tenant_id: tenant_a.id,
|
||||
user_id: tenant_gateway_admin.id.into(),
|
||||
user_id: tenant_gateway_admin.id,
|
||||
is_gateway_admin: true,
|
||||
..Default::default()
|
||||
})
|
||||
@ -3345,7 +3562,7 @@ pub mod test {
|
||||
.unwrap();
|
||||
tenant::add_user(tenant::TenantUser {
|
||||
tenant_id: tenant_a.id,
|
||||
user_id: tenant_user.id.into(),
|
||||
user_id: tenant_user.id,
|
||||
..Default::default()
|
||||
})
|
||||
.await
|
||||
@ -3623,32 +3840,32 @@ pub mod test {
|
||||
.await;
|
||||
|
||||
tenant::add_user(tenant::TenantUser {
|
||||
tenant_id: api_key_tenant.tenant_id.unwrap().into(),
|
||||
user_id: tenant_admin.id.into(),
|
||||
tenant_id: api_key_tenant.tenant_id.unwrap(),
|
||||
user_id: tenant_admin.id,
|
||||
is_admin: true,
|
||||
..Default::default()
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
tenant::add_user(tenant::TenantUser {
|
||||
tenant_id: api_key_tenant.tenant_id.unwrap().into(),
|
||||
user_id: tenant_device_admin.id.into(),
|
||||
tenant_id: api_key_tenant.tenant_id.unwrap(),
|
||||
user_id: tenant_device_admin.id,
|
||||
is_device_admin: true,
|
||||
..Default::default()
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
tenant::add_user(tenant::TenantUser {
|
||||
tenant_id: api_key_tenant.tenant_id.unwrap().into(),
|
||||
user_id: tenant_gateway_admin.id.into(),
|
||||
tenant_id: api_key_tenant.tenant_id.unwrap(),
|
||||
user_id: tenant_gateway_admin.id,
|
||||
is_gateway_admin: true,
|
||||
..Default::default()
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
tenant::add_user(tenant::TenantUser {
|
||||
tenant_id: api_key_tenant.tenant_id.unwrap().into(),
|
||||
user_id: tenant_user.id.into(),
|
||||
tenant_id: api_key_tenant.tenant_id.unwrap(),
|
||||
user_id: tenant_user.id,
|
||||
..Default::default()
|
||||
})
|
||||
.await
|
||||
@ -3876,8 +4093,8 @@ pub mod test {
|
||||
.await;
|
||||
|
||||
tenant::add_user(tenant::TenantUser {
|
||||
tenant_id: api_key_tenant.tenant_id.unwrap().into(),
|
||||
user_id: tenant_user.id.into(),
|
||||
tenant_id: api_key_tenant.tenant_id.unwrap(),
|
||||
user_id: tenant_user.id,
|
||||
..Default::default()
|
||||
})
|
||||
.await
|
||||
@ -4020,7 +4237,7 @@ pub mod test {
|
||||
let gw_api_key_tenant = gateway::create(gateway::Gateway {
|
||||
name: "test-gw-tenant".into(),
|
||||
gateway_id: EUI64::from_str("0202030405060708").unwrap(),
|
||||
tenant_id: api_key_tenant.tenant_id.unwrap().into(),
|
||||
tenant_id: api_key_tenant.tenant_id.unwrap(),
|
||||
..Default::default()
|
||||
})
|
||||
.await
|
||||
@ -4028,7 +4245,7 @@ pub mod test {
|
||||
|
||||
tenant::add_user(tenant::TenantUser {
|
||||
tenant_id: tenant_a.id,
|
||||
user_id: tenant_admin.id.into(),
|
||||
user_id: tenant_admin.id,
|
||||
is_admin: true,
|
||||
..Default::default()
|
||||
})
|
||||
@ -4036,7 +4253,7 @@ pub mod test {
|
||||
.unwrap();
|
||||
tenant::add_user(tenant::TenantUser {
|
||||
tenant_id: tenant_a.id,
|
||||
user_id: tenant_gateway_admin.id.into(),
|
||||
user_id: tenant_gateway_admin.id,
|
||||
is_gateway_admin: true,
|
||||
..Default::default()
|
||||
})
|
||||
@ -4044,7 +4261,7 @@ pub mod test {
|
||||
.unwrap();
|
||||
tenant::add_user(tenant::TenantUser {
|
||||
tenant_id: tenant_a.id,
|
||||
user_id: tenant_user.id.into(),
|
||||
user_id: tenant_user.id,
|
||||
..Default::default()
|
||||
})
|
||||
.await
|
||||
@ -4296,32 +4513,32 @@ pub mod test {
|
||||
.await;
|
||||
|
||||
tenant::add_user(tenant::TenantUser {
|
||||
tenant_id: api_key_tenant.tenant_id.unwrap().into(),
|
||||
user_id: tenant_admin.id.into(),
|
||||
tenant_id: api_key_tenant.tenant_id.unwrap(),
|
||||
user_id: tenant_admin.id,
|
||||
is_admin: true,
|
||||
..Default::default()
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
tenant::add_user(tenant::TenantUser {
|
||||
tenant_id: api_key_tenant.tenant_id.unwrap().into(),
|
||||
user_id: tenant_device_admin.id.into(),
|
||||
tenant_id: api_key_tenant.tenant_id.unwrap(),
|
||||
user_id: tenant_device_admin.id,
|
||||
is_device_admin: true,
|
||||
..Default::default()
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
tenant::add_user(tenant::TenantUser {
|
||||
tenant_id: api_key_tenant.tenant_id.unwrap().into(),
|
||||
user_id: tenant_gateway_admin.id.into(),
|
||||
tenant_id: api_key_tenant.tenant_id.unwrap(),
|
||||
user_id: tenant_gateway_admin.id,
|
||||
is_gateway_admin: true,
|
||||
..Default::default()
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
tenant::add_user(tenant::TenantUser {
|
||||
tenant_id: api_key_tenant.tenant_id.unwrap().into(),
|
||||
user_id: tenant_user.id.into(),
|
||||
tenant_id: api_key_tenant.tenant_id.unwrap(),
|
||||
user_id: tenant_user.id,
|
||||
..Default::default()
|
||||
})
|
||||
.await
|
||||
@ -4619,4 +4836,298 @@ pub mod test {
|
||||
];
|
||||
run_tests(tests).await;
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
async fn fuota_deployment() {
|
||||
let _guard = test::prepare().await;
|
||||
|
||||
let user_active = user::User {
|
||||
email: "user@user".into(),
|
||||
is_active: true,
|
||||
..Default::default()
|
||||
};
|
||||
let user_admin = user::User {
|
||||
email: "admin@user".into(),
|
||||
is_active: true,
|
||||
is_admin: true,
|
||||
..Default::default()
|
||||
};
|
||||
let tenant_admin = user::User {
|
||||
email: "tenant-admin@user".into(),
|
||||
is_active: true,
|
||||
..Default::default()
|
||||
};
|
||||
let tenant_device_admin = user::User {
|
||||
email: "tenant-device-admin@user".into(),
|
||||
is_active: true,
|
||||
..Default::default()
|
||||
};
|
||||
let tenant_gateway_admin = user::User {
|
||||
email: "tenant-gateway-admin@user".into(),
|
||||
is_active: true,
|
||||
..Default::default()
|
||||
};
|
||||
let tenant_user = user::User {
|
||||
email: "tenant-user@user".into(),
|
||||
is_active: true,
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
for u in [
|
||||
&user_active,
|
||||
&user_admin,
|
||||
&tenant_admin,
|
||||
&tenant_gateway_admin,
|
||||
&tenant_device_admin,
|
||||
&tenant_user,
|
||||
] {
|
||||
user::create(u.clone()).await.unwrap();
|
||||
}
|
||||
|
||||
let api_key_admin = api_key::test::create_api_key(true, false).await;
|
||||
let api_key_tenant = api_key::test::create_api_key(false, true).await;
|
||||
let api_key_other_tenant = api_key::test::create_api_key(false, true).await;
|
||||
|
||||
let app =
|
||||
application::test::create_application(Some(api_key_tenant.tenant_id.unwrap().into()))
|
||||
.await;
|
||||
|
||||
tenant::add_user(tenant::TenantUser {
|
||||
tenant_id: api_key_tenant.tenant_id.unwrap(),
|
||||
user_id: tenant_admin.id,
|
||||
is_admin: true,
|
||||
..Default::default()
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
tenant::add_user(tenant::TenantUser {
|
||||
tenant_id: api_key_tenant.tenant_id.unwrap(),
|
||||
user_id: tenant_device_admin.id,
|
||||
is_device_admin: true,
|
||||
..Default::default()
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
tenant::add_user(tenant::TenantUser {
|
||||
tenant_id: api_key_tenant.tenant_id.unwrap(),
|
||||
user_id: tenant_gateway_admin.id,
|
||||
is_gateway_admin: true,
|
||||
..Default::default()
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
tenant::add_user(tenant::TenantUser {
|
||||
tenant_id: api_key_tenant.tenant_id.unwrap(),
|
||||
user_id: tenant_user.id,
|
||||
..Default::default()
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
// fuota deployments with user
|
||||
let tests = vec![
|
||||
// admin user can create and list
|
||||
ValidatorTest {
|
||||
validators: vec![
|
||||
ValidateFuotaDeploymentsAccess::new(Flag::Create, app.id.into()),
|
||||
ValidateFuotaDeploymentsAccess::new(Flag::List, app.id.into()),
|
||||
],
|
||||
id: AuthID::User(user_admin.id.into()),
|
||||
ok: true,
|
||||
},
|
||||
// tenant admin can create and list
|
||||
ValidatorTest {
|
||||
validators: vec![
|
||||
ValidateFuotaDeploymentsAccess::new(Flag::Create, app.id.into()),
|
||||
ValidateFuotaDeploymentsAccess::new(Flag::List, app.id.into()),
|
||||
],
|
||||
id: AuthID::User(tenant_admin.id.into()),
|
||||
ok: true,
|
||||
},
|
||||
// tenant device admin can create and list
|
||||
ValidatorTest {
|
||||
validators: vec![
|
||||
ValidateFuotaDeploymentsAccess::new(Flag::Create, app.id.into()),
|
||||
ValidateFuotaDeploymentsAccess::new(Flag::List, app.id.into()),
|
||||
],
|
||||
id: AuthID::User(tenant_device_admin.id.into()),
|
||||
ok: true,
|
||||
},
|
||||
// tenant user can list
|
||||
ValidatorTest {
|
||||
validators: vec![ValidateFuotaDeploymentsAccess::new(
|
||||
Flag::List,
|
||||
app.id.into(),
|
||||
)],
|
||||
id: AuthID::User(tenant_user.id.into()),
|
||||
ok: true,
|
||||
},
|
||||
// tenant user can not create
|
||||
ValidatorTest {
|
||||
validators: vec![ValidateFuotaDeploymentsAccess::new(
|
||||
Flag::Create,
|
||||
app.id.into(),
|
||||
)],
|
||||
id: AuthID::User(tenant_user.id.into()),
|
||||
ok: false,
|
||||
},
|
||||
// other user can not create or list
|
||||
ValidatorTest {
|
||||
validators: vec![
|
||||
ValidateFuotaDeploymentsAccess::new(Flag::Create, app.id.into()),
|
||||
ValidateFuotaDeploymentsAccess::new(Flag::List, app.id.into()),
|
||||
],
|
||||
id: AuthID::User(user_active.id.into()),
|
||||
ok: false,
|
||||
},
|
||||
];
|
||||
run_tests(tests).await;
|
||||
|
||||
// fuota deployments with api key
|
||||
let tests = vec![
|
||||
// admin api key can create and list
|
||||
ValidatorTest {
|
||||
validators: vec![
|
||||
ValidateFuotaDeploymentsAccess::new(Flag::Create, app.id.into()),
|
||||
ValidateFuotaDeploymentsAccess::new(Flag::List, app.id.into()),
|
||||
],
|
||||
id: AuthID::Key(api_key_admin.id.into()),
|
||||
ok: true,
|
||||
},
|
||||
// tenant api key can create and list
|
||||
ValidatorTest {
|
||||
validators: vec![
|
||||
ValidateFuotaDeploymentsAccess::new(Flag::Create, app.id.into()),
|
||||
ValidateFuotaDeploymentsAccess::new(Flag::List, app.id.into()),
|
||||
],
|
||||
id: AuthID::Key(api_key_tenant.id.into()),
|
||||
ok: true,
|
||||
},
|
||||
// tenant api key can not create or list for other tenant
|
||||
ValidatorTest {
|
||||
validators: vec![
|
||||
ValidateFuotaDeploymentsAccess::new(Flag::Create, app.id.into()),
|
||||
ValidateFuotaDeploymentsAccess::new(Flag::List, app.id.into()),
|
||||
],
|
||||
id: AuthID::Key(api_key_other_tenant.id.into()),
|
||||
ok: false,
|
||||
},
|
||||
];
|
||||
run_tests(tests).await;
|
||||
|
||||
let dp = device_profile::create(device_profile::DeviceProfile {
|
||||
tenant_id: app.tenant_id,
|
||||
name: "test-dp".into(),
|
||||
..Default::default()
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
let fuota = fuota::create_deployment(fuota::FuotaDeployment {
|
||||
name: "test-fuota".into(),
|
||||
application_id: app.id,
|
||||
device_profile_id: dp.id,
|
||||
..Default::default()
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
// fuota deployment with user
|
||||
let tests = vec![
|
||||
// admin user can read, update and delete
|
||||
ValidatorTest {
|
||||
validators: vec![
|
||||
ValidateFuotaDeploymentAccess::new(Flag::Read, fuota.id.into()),
|
||||
ValidateFuotaDeploymentAccess::new(Flag::Update, fuota.id.into()),
|
||||
ValidateFuotaDeploymentAccess::new(Flag::Delete, fuota.id.into()),
|
||||
],
|
||||
id: AuthID::User(user_admin.id.into()),
|
||||
ok: true,
|
||||
},
|
||||
// tenant admin can read, update and delete
|
||||
ValidatorTest {
|
||||
validators: vec![
|
||||
ValidateFuotaDeploymentAccess::new(Flag::Read, fuota.id.into()),
|
||||
ValidateFuotaDeploymentAccess::new(Flag::Update, fuota.id.into()),
|
||||
ValidateFuotaDeploymentAccess::new(Flag::Delete, fuota.id.into()),
|
||||
],
|
||||
id: AuthID::User(tenant_admin.id.into()),
|
||||
ok: true,
|
||||
},
|
||||
// tenant device admin can read, update and delete
|
||||
ValidatorTest {
|
||||
validators: vec![
|
||||
ValidateFuotaDeploymentAccess::new(Flag::Read, fuota.id.into()),
|
||||
ValidateFuotaDeploymentAccess::new(Flag::Update, fuota.id.into()),
|
||||
ValidateFuotaDeploymentAccess::new(Flag::Delete, fuota.id.into()),
|
||||
],
|
||||
id: AuthID::User(tenant_device_admin.id.into()),
|
||||
ok: true,
|
||||
},
|
||||
// tenant user can read
|
||||
ValidatorTest {
|
||||
validators: vec![ValidateFuotaDeploymentAccess::new(
|
||||
Flag::Read,
|
||||
fuota.id.into(),
|
||||
)],
|
||||
id: AuthID::User(tenant_user.id.into()),
|
||||
ok: true,
|
||||
},
|
||||
// tenant user can not update or delete
|
||||
ValidatorTest {
|
||||
validators: vec![
|
||||
ValidateFuotaDeploymentAccess::new(Flag::Update, fuota.id.into()),
|
||||
ValidateFuotaDeploymentAccess::new(Flag::Delete, fuota.id.into()),
|
||||
],
|
||||
id: AuthID::User(tenant_user.id.into()),
|
||||
ok: false,
|
||||
},
|
||||
// other user can not read, update or delete
|
||||
ValidatorTest {
|
||||
validators: vec![
|
||||
ValidateFuotaDeploymentAccess::new(Flag::Read, fuota.id.into()),
|
||||
ValidateFuotaDeploymentAccess::new(Flag::Update, fuota.id.into()),
|
||||
ValidateFuotaDeploymentAccess::new(Flag::Delete, fuota.id.into()),
|
||||
],
|
||||
id: AuthID::User(user_active.id.into()),
|
||||
ok: false,
|
||||
},
|
||||
];
|
||||
run_tests(tests).await;
|
||||
|
||||
// fuota deployment with api key
|
||||
let tests = vec![
|
||||
// admin api key can read, update and delete
|
||||
ValidatorTest {
|
||||
validators: vec![
|
||||
ValidateFuotaDeploymentAccess::new(Flag::Read, fuota.id.into()),
|
||||
ValidateFuotaDeploymentAccess::new(Flag::Update, fuota.id.into()),
|
||||
ValidateFuotaDeploymentAccess::new(Flag::Delete, fuota.id.into()),
|
||||
],
|
||||
id: AuthID::Key(api_key_admin.id.into()),
|
||||
ok: true,
|
||||
},
|
||||
// tenant api key can read, update and delete
|
||||
ValidatorTest {
|
||||
validators: vec![
|
||||
ValidateFuotaDeploymentAccess::new(Flag::Read, fuota.id.into()),
|
||||
ValidateFuotaDeploymentAccess::new(Flag::Update, fuota.id.into()),
|
||||
ValidateFuotaDeploymentAccess::new(Flag::Delete, fuota.id.into()),
|
||||
],
|
||||
id: AuthID::Key(api_key_admin.id.into()),
|
||||
ok: true,
|
||||
},
|
||||
// other api key can not read, update or delete
|
||||
ValidatorTest {
|
||||
validators: vec![
|
||||
ValidateFuotaDeploymentAccess::new(Flag::Read, fuota.id.into()),
|
||||
ValidateFuotaDeploymentAccess::new(Flag::Update, fuota.id.into()),
|
||||
ValidateFuotaDeploymentAccess::new(Flag::Delete, fuota.id.into()),
|
||||
],
|
||||
id: AuthID::Key(api_key_other_tenant.id.into()),
|
||||
ok: false,
|
||||
},
|
||||
];
|
||||
run_tests(tests).await;
|
||||
}
|
||||
}
|
||||
|
@ -328,6 +328,7 @@ async fn _handle_pr_start_req_data(
|
||||
let kek_label = roaming::get_passive_roaming_kek_label(sender_id)?;
|
||||
let ds = d.get_device_session()?;
|
||||
|
||||
// Only in case validate_mic=true and LoRaWAN=1.0.x.
|
||||
let nwk_s_key = if validate_mic && ds.mac_version().to_string().starts_with("1.0") {
|
||||
Some(keywrap::wrap(
|
||||
&kek_label,
|
||||
@ -337,13 +338,14 @@ async fn _handle_pr_start_req_data(
|
||||
None
|
||||
};
|
||||
|
||||
let f_nwk_s_int_key = if validate_mic && ds.mac_version().to_string().starts_with("1.0") {
|
||||
None
|
||||
} else {
|
||||
// Only in case validate_mic=true and LoRaWAN=1.1.x.
|
||||
let f_nwk_s_int_key = if validate_mic && ds.mac_version().to_string().starts_with("1.1") {
|
||||
Some(keywrap::wrap(
|
||||
&kek_label,
|
||||
AES128Key::from_slice(&ds.f_nwk_s_int_key)?,
|
||||
)?)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
// In case of stateless, the payload is directly handled
|
||||
@ -599,7 +601,7 @@ async fn handle_async_ans(bp: &BasePayload, b: &[u8]) -> Result<Response> {
|
||||
|
||||
let key = redis_key(format!("backend:async:{}", transaction_id));
|
||||
|
||||
redis::pipe()
|
||||
() = redis::pipe()
|
||||
.atomic()
|
||||
.cmd("XADD")
|
||||
.arg(&key)
|
||||
|
@ -250,6 +250,11 @@ impl DeviceService for Device {
|
||||
} else {
|
||||
Some(Uuid::from_str(&req.multicast_group_id).map_err(|e| e.status())?)
|
||||
};
|
||||
let dp_id: Option<Uuid> = if req.device_profile_id.is_empty() {
|
||||
None
|
||||
} else {
|
||||
Some(Uuid::from_str(&req.device_profile_id).map_err(|e| e.status())?)
|
||||
};
|
||||
|
||||
self.validator
|
||||
.validate(
|
||||
@ -270,17 +275,25 @@ impl DeviceService for Device {
|
||||
let filters = device::Filters {
|
||||
application_id: Some(app_id),
|
||||
multicast_group_id: mg_id,
|
||||
device_profile_id: dp_id,
|
||||
search: if req.search.is_empty() {
|
||||
None
|
||||
} else {
|
||||
Some(req.search.to_string())
|
||||
},
|
||||
tags: req.tags.clone(),
|
||||
};
|
||||
|
||||
let count = device::get_count(&filters).await.map_err(|e| e.status())?;
|
||||
let items = device::list(req.limit as i64, req.offset as i64, &filters)
|
||||
.await
|
||||
.map_err(|e| e.status())?;
|
||||
let items = device::list(
|
||||
req.limit as i64,
|
||||
req.offset as i64,
|
||||
&filters,
|
||||
req.order_by().from_proto(),
|
||||
req.order_by_desc,
|
||||
)
|
||||
.await
|
||||
.map_err(|e| e.status())?;
|
||||
|
||||
let mut resp = Response::new(api::ListDevicesResponse {
|
||||
total_count: count as u32,
|
||||
@ -309,6 +322,7 @@ impl DeviceService for Device {
|
||||
}),
|
||||
false => None,
|
||||
},
|
||||
tags: d.tags.into_hashmap(),
|
||||
})
|
||||
.collect(),
|
||||
});
|
||||
@ -340,11 +354,8 @@ impl DeviceService for Device {
|
||||
let dk = device_keys::DeviceKeys {
|
||||
dev_eui,
|
||||
nwk_key: AES128Key::from_str(&req_dk.nwk_key).map_err(|e| e.status())?,
|
||||
app_key: if !req_dk.app_key.is_empty() {
|
||||
AES128Key::from_str(&req_dk.app_key).map_err(|e| e.status())?
|
||||
} else {
|
||||
AES128Key::null()
|
||||
},
|
||||
app_key: AES128Key::from_str(&req_dk.app_key).map_err(|e| e.status())?,
|
||||
gen_app_key: AES128Key::from_str(&req_dk.gen_app_key).map_err(|e| e.status())?,
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
@ -378,6 +389,7 @@ impl DeviceService for Device {
|
||||
dev_eui: dk.dev_eui.to_string(),
|
||||
nwk_key: dk.nwk_key.to_string(),
|
||||
app_key: dk.app_key.to_string(),
|
||||
gen_app_key: dk.gen_app_key.to_string(),
|
||||
}),
|
||||
created_at: Some(helpers::datetime_to_prost_timestamp(&dk.created_at)),
|
||||
updated_at: Some(helpers::datetime_to_prost_timestamp(&dk.updated_at)),
|
||||
@ -414,11 +426,8 @@ impl DeviceService for Device {
|
||||
dev_nonces: dk.dev_nonces,
|
||||
join_nonce: dk.join_nonce,
|
||||
nwk_key: AES128Key::from_str(&req_dk.nwk_key).map_err(|e| e.status())?,
|
||||
app_key: if !req_dk.app_key.is_empty() {
|
||||
AES128Key::from_str(&req_dk.app_key).map_err(|e| e.status())?
|
||||
} else {
|
||||
AES128Key::null()
|
||||
},
|
||||
app_key: AES128Key::from_str(&req_dk.app_key).map_err(|e| e.status())?,
|
||||
gen_app_key: AES128Key::from_str(&req_dk.gen_app_key).map_err(|e| e.status())?,
|
||||
..Default::default()
|
||||
};
|
||||
let _ = device_keys::update(dk).await.map_err(|e| e.status())?;
|
||||
@ -469,7 +478,7 @@ impl DeviceService for Device {
|
||||
)
|
||||
.await?;
|
||||
|
||||
device_keys::set_dev_nonces(&dev_eui, &Vec::new())
|
||||
device_keys::set_dev_nonces(dev_eui, &fields::DevNonces::default())
|
||||
.await
|
||||
.map_err(|e| e.status())?;
|
||||
|
||||
@ -1362,6 +1371,9 @@ pub mod test {
|
||||
multicast_group_id: "".into(),
|
||||
limit: 10,
|
||||
offset: 0,
|
||||
order_by: api::list_devices_request::OrderBy::Name.into(),
|
||||
order_by_desc: true,
|
||||
..Default::default()
|
||||
},
|
||||
);
|
||||
let list_resp = service.list(list_req).await.unwrap();
|
||||
@ -1376,6 +1388,7 @@ pub mod test {
|
||||
dev_eui: "0102030405060708".into(),
|
||||
nwk_key: "01020304050607080102030405060708".into(),
|
||||
app_key: "02020304050607080202030405060708".into(),
|
||||
gen_app_key: "03020304050607080202030405060708".into(),
|
||||
}),
|
||||
},
|
||||
);
|
||||
@ -1394,6 +1407,7 @@ pub mod test {
|
||||
dev_eui: "0102030405060708".into(),
|
||||
nwk_key: "01020304050607080102030405060708".into(),
|
||||
app_key: "02020304050607080202030405060708".into(),
|
||||
gen_app_key: "03020304050607080202030405060708".into(),
|
||||
}),
|
||||
get_keys_resp.get_ref().device_keys
|
||||
);
|
||||
@ -1406,6 +1420,7 @@ pub mod test {
|
||||
dev_eui: "0102030405060708".into(),
|
||||
nwk_key: "01020304050607080102030405060708".into(),
|
||||
app_key: "03020304050607080302030405060708".into(),
|
||||
gen_app_key: "03020304050607080202030405060708".into(),
|
||||
}),
|
||||
},
|
||||
);
|
||||
@ -1424,15 +1439,19 @@ pub mod test {
|
||||
dev_eui: "0102030405060708".into(),
|
||||
nwk_key: "01020304050607080102030405060708".into(),
|
||||
app_key: "03020304050607080302030405060708".into(),
|
||||
gen_app_key: "03020304050607080202030405060708".into(),
|
||||
}),
|
||||
get_keys_resp.get_ref().device_keys
|
||||
);
|
||||
|
||||
// flush dev nonces
|
||||
let _ =
|
||||
device_keys::set_dev_nonces(&EUI64::from_str("0102030405060708").unwrap(), &[1, 2, 3])
|
||||
.await
|
||||
.unwrap();
|
||||
let _ = device_keys::set_dev_nonces(EUI64::from_str("0102030405060708").unwrap(), &{
|
||||
let mut dev_nonces = fields::DevNonces::default();
|
||||
dev_nonces.insert(EUI64::from_str("0102030405060708").unwrap(), 123);
|
||||
dev_nonces
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
let flush_dev_nonces_req = get_request(
|
||||
&u.id,
|
||||
api::FlushDevNoncesRequest {
|
||||
@ -1446,7 +1465,7 @@ pub mod test {
|
||||
let dk = device_keys::get(&EUI64::from_str("0102030405060708").unwrap())
|
||||
.await
|
||||
.unwrap();
|
||||
assert_eq!(0, dk.dev_nonces.len());
|
||||
assert_eq!(fields::DevNonces::default(), dk.dev_nonces);
|
||||
|
||||
// delete keys
|
||||
let del_keys_req = get_request(
|
||||
|
@ -60,15 +60,6 @@ impl DeviceProfileService for DeviceProfile {
|
||||
supports_otaa: req_dp.supports_otaa,
|
||||
supports_class_b: req_dp.supports_class_b,
|
||||
supports_class_c: req_dp.supports_class_c,
|
||||
class_b_timeout: req_dp.class_b_timeout as i32,
|
||||
class_b_ping_slot_nb_k: req_dp.class_b_ping_slot_nb_k as i32,
|
||||
class_b_ping_slot_dr: req_dp.class_b_ping_slot_dr as i16,
|
||||
class_b_ping_slot_freq: req_dp.class_b_ping_slot_freq as i64,
|
||||
class_c_timeout: req_dp.class_c_timeout as i32,
|
||||
abp_rx1_delay: req_dp.abp_rx1_delay as i16,
|
||||
abp_rx1_dr_offset: req_dp.abp_rx1_dr_offset as i16,
|
||||
abp_rx2_dr: req_dp.abp_rx2_dr as i16,
|
||||
abp_rx2_freq: req_dp.abp_rx2_freq as i64,
|
||||
tags: fields::KeyValue::new(req_dp.tags.clone()),
|
||||
measurements: fields::Measurements::new(
|
||||
req_dp
|
||||
@ -88,32 +79,77 @@ impl DeviceProfileService for DeviceProfile {
|
||||
auto_detect_measurements: req_dp.auto_detect_measurements,
|
||||
region_config_id: (!req_dp.region_config_id.is_empty())
|
||||
.then(|| req_dp.region_config_id.clone()),
|
||||
is_relay: req_dp.is_relay,
|
||||
is_relay_ed: req_dp.is_relay_ed,
|
||||
relay_ed_relay_only: req_dp.relay_ed_relay_only,
|
||||
relay_enabled: req_dp.relay_enabled,
|
||||
relay_cad_periodicity: req_dp.relay_cad_periodicity as i16,
|
||||
relay_default_channel_index: req_dp.relay_default_channel_index as i16,
|
||||
relay_second_channel_freq: req_dp.relay_second_channel_freq as i64,
|
||||
relay_second_channel_dr: req_dp.relay_second_channel_dr as i16,
|
||||
relay_second_channel_ack_offset: req_dp.relay_second_channel_ack_offset as i16,
|
||||
relay_ed_activation_mode: req_dp.relay_ed_activation_mode().from_proto(),
|
||||
relay_ed_smart_enable_level: req_dp.relay_ed_smart_enable_level as i16,
|
||||
relay_ed_back_off: req_dp.relay_ed_back_off as i16,
|
||||
relay_ed_uplink_limit_bucket_size: req_dp.relay_ed_uplink_limit_bucket_size as i16,
|
||||
relay_ed_uplink_limit_reload_rate: req_dp.relay_ed_uplink_limit_reload_rate as i16,
|
||||
relay_join_req_limit_reload_rate: req_dp.relay_join_req_limit_reload_rate as i16,
|
||||
relay_notify_limit_reload_rate: req_dp.relay_notify_limit_reload_rate as i16,
|
||||
relay_global_uplink_limit_reload_rate: req_dp.relay_global_uplink_limit_reload_rate
|
||||
as i16,
|
||||
relay_overall_limit_reload_rate: req_dp.relay_overall_limit_reload_rate as i16,
|
||||
relay_join_req_limit_bucket_size: req_dp.relay_join_req_limit_bucket_size as i16,
|
||||
relay_notify_limit_bucket_size: req_dp.relay_notify_limit_bucket_size as i16,
|
||||
relay_global_uplink_limit_bucket_size: req_dp.relay_global_uplink_limit_bucket_size
|
||||
as i16,
|
||||
relay_overall_limit_bucket_size: req_dp.relay_overall_limit_bucket_size as i16,
|
||||
allow_roaming: req_dp.allow_roaming,
|
||||
rx1_delay: req_dp.rx1_delay as i16,
|
||||
abp_params: if req_dp.supports_otaa {
|
||||
None
|
||||
} else {
|
||||
Some(fields::AbpParams {
|
||||
rx1_delay: req_dp.abp_rx1_delay as u8,
|
||||
rx1_dr_offset: req_dp.abp_rx1_dr_offset as u8,
|
||||
rx2_dr: req_dp.abp_rx2_dr as u8,
|
||||
rx2_freq: req_dp.abp_rx2_freq,
|
||||
})
|
||||
},
|
||||
class_b_params: if req_dp.supports_class_b {
|
||||
Some(fields::ClassBParams {
|
||||
timeout: req_dp.class_b_timeout as u16,
|
||||
ping_slot_nb_k: req_dp.class_b_ping_slot_nb_k as u8,
|
||||
ping_slot_dr: req_dp.class_b_ping_slot_dr as u8,
|
||||
ping_slot_freq: req_dp.class_b_ping_slot_freq,
|
||||
})
|
||||
} else {
|
||||
None
|
||||
},
|
||||
class_c_params: if req_dp.supports_class_c {
|
||||
Some(fields::ClassCParams {
|
||||
timeout: req_dp.class_c_timeout as u16,
|
||||
})
|
||||
} else {
|
||||
None
|
||||
},
|
||||
relay_params: if req_dp.is_relay || req_dp.is_relay_ed {
|
||||
Some(fields::RelayParams {
|
||||
is_relay: req_dp.is_relay,
|
||||
is_relay_ed: req_dp.is_relay_ed,
|
||||
ed_relay_only: req_dp.relay_ed_relay_only,
|
||||
relay_enabled: req_dp.relay_enabled,
|
||||
relay_cad_periodicity: req_dp.relay_cad_periodicity as u8,
|
||||
default_channel_index: req_dp.relay_default_channel_index as u8,
|
||||
second_channel_freq: req_dp.relay_second_channel_freq,
|
||||
second_channel_dr: req_dp.relay_second_channel_dr as u8,
|
||||
second_channel_ack_offset: req_dp.relay_second_channel_ack_offset as u8,
|
||||
ed_activation_mode: req_dp.relay_ed_activation_mode().from_proto(),
|
||||
ed_smart_enable_level: req_dp.relay_ed_smart_enable_level as u8,
|
||||
ed_back_off: req_dp.relay_ed_back_off as u8,
|
||||
ed_uplink_limit_bucket_size: req_dp.relay_ed_uplink_limit_bucket_size as u8,
|
||||
ed_uplink_limit_reload_rate: req_dp.relay_ed_uplink_limit_reload_rate as u8,
|
||||
relay_join_req_limit_reload_rate: req_dp.relay_join_req_limit_reload_rate as u8,
|
||||
relay_notify_limit_reload_rate: req_dp.relay_notify_limit_reload_rate as u8,
|
||||
relay_global_uplink_limit_reload_rate: req_dp
|
||||
.relay_global_uplink_limit_reload_rate
|
||||
as u8,
|
||||
relay_overall_limit_reload_rate: req_dp.relay_overall_limit_reload_rate as u8,
|
||||
relay_join_req_limit_bucket_size: req_dp.relay_join_req_limit_bucket_size as u8,
|
||||
relay_notify_limit_bucket_size: req_dp.relay_notify_limit_bucket_size as u8,
|
||||
relay_global_uplink_limit_bucket_size: req_dp
|
||||
.relay_global_uplink_limit_bucket_size
|
||||
as u8,
|
||||
relay_overall_limit_bucket_size: req_dp.relay_overall_limit_bucket_size as u8,
|
||||
})
|
||||
} else {
|
||||
None
|
||||
},
|
||||
app_layer_params: {
|
||||
let app_layer_params = req_dp.app_layer_params.unwrap_or_default();
|
||||
|
||||
fields::AppLayerParams {
|
||||
ts003_version: app_layer_params.ts003_version().from_proto(),
|
||||
ts004_version: app_layer_params.ts004_version().from_proto(),
|
||||
ts005_version: app_layer_params.ts005_version().from_proto(),
|
||||
..Default::default()
|
||||
}
|
||||
},
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
@ -145,6 +181,10 @@ impl DeviceProfileService for DeviceProfile {
|
||||
.await?;
|
||||
|
||||
let dp = device_profile::get(&dp_id).await.map_err(|e| e.status())?;
|
||||
let abp_params = dp.abp_params.clone().unwrap_or_default();
|
||||
let class_b_params = dp.class_b_params.clone().unwrap_or_default();
|
||||
let class_c_params = dp.class_c_params.clone().unwrap_or_default();
|
||||
let relay_params = dp.relay_params.clone().unwrap_or_default();
|
||||
|
||||
let mut resp = Response::new(api::GetDeviceProfileResponse {
|
||||
device_profile: Some(api::DeviceProfile {
|
||||
@ -164,15 +204,15 @@ impl DeviceProfileService for DeviceProfile {
|
||||
supports_otaa: dp.supports_otaa,
|
||||
supports_class_b: dp.supports_class_b,
|
||||
supports_class_c: dp.supports_class_c,
|
||||
class_b_timeout: dp.class_b_timeout as u32,
|
||||
class_b_ping_slot_nb_k: dp.class_b_ping_slot_nb_k as u32,
|
||||
class_b_ping_slot_dr: dp.class_b_ping_slot_dr as u32,
|
||||
class_b_ping_slot_freq: dp.class_b_ping_slot_freq as u32,
|
||||
class_c_timeout: dp.class_c_timeout as u32,
|
||||
abp_rx1_delay: dp.abp_rx1_delay as u32,
|
||||
abp_rx1_dr_offset: dp.abp_rx1_dr_offset as u32,
|
||||
abp_rx2_dr: dp.abp_rx2_dr as u32,
|
||||
abp_rx2_freq: dp.abp_rx2_freq as u32,
|
||||
class_b_timeout: class_b_params.timeout as u32,
|
||||
class_b_ping_slot_nb_k: class_b_params.ping_slot_nb_k as u32,
|
||||
class_b_ping_slot_dr: class_b_params.ping_slot_dr as u32,
|
||||
class_b_ping_slot_freq: class_b_params.ping_slot_freq as u32,
|
||||
class_c_timeout: class_c_params.timeout as u32,
|
||||
abp_rx1_delay: abp_params.rx1_delay as u32,
|
||||
abp_rx1_dr_offset: abp_params.rx1_dr_offset as u32,
|
||||
abp_rx2_dr: abp_params.rx2_dr as u32,
|
||||
abp_rx2_freq: abp_params.rx2_freq as u32,
|
||||
tags: dp.tags.into_hashmap(),
|
||||
measurements: dp
|
||||
.measurements
|
||||
@ -190,32 +230,46 @@ impl DeviceProfileService for DeviceProfile {
|
||||
.collect(),
|
||||
auto_detect_measurements: dp.auto_detect_measurements,
|
||||
region_config_id: dp.region_config_id.clone().unwrap_or_default(),
|
||||
is_relay: dp.is_relay,
|
||||
is_relay_ed: dp.is_relay_ed,
|
||||
relay_ed_relay_only: dp.relay_ed_relay_only,
|
||||
relay_enabled: dp.relay_enabled,
|
||||
relay_cad_periodicity: dp.relay_cad_periodicity as i32,
|
||||
relay_default_channel_index: dp.relay_default_channel_index as u32,
|
||||
relay_second_channel_freq: dp.relay_second_channel_freq as u32,
|
||||
relay_second_channel_dr: dp.relay_second_channel_dr as u32,
|
||||
relay_second_channel_ack_offset: dp.relay_second_channel_ack_offset as i32,
|
||||
relay_ed_activation_mode: dp.relay_ed_activation_mode.to_proto().into(),
|
||||
relay_ed_smart_enable_level: dp.relay_ed_smart_enable_level as u32,
|
||||
relay_ed_back_off: dp.relay_ed_back_off as u32,
|
||||
relay_ed_uplink_limit_bucket_size: dp.relay_ed_uplink_limit_bucket_size as u32,
|
||||
relay_ed_uplink_limit_reload_rate: dp.relay_ed_uplink_limit_reload_rate as u32,
|
||||
relay_join_req_limit_reload_rate: dp.relay_join_req_limit_reload_rate as u32,
|
||||
relay_notify_limit_reload_rate: dp.relay_notify_limit_reload_rate as u32,
|
||||
relay_global_uplink_limit_reload_rate: dp.relay_global_uplink_limit_reload_rate
|
||||
is_relay: relay_params.is_relay,
|
||||
is_relay_ed: relay_params.is_relay_ed,
|
||||
relay_ed_relay_only: relay_params.ed_relay_only,
|
||||
relay_enabled: relay_params.relay_enabled,
|
||||
relay_cad_periodicity: relay_params.relay_cad_periodicity as i32,
|
||||
relay_default_channel_index: relay_params.default_channel_index as u32,
|
||||
relay_second_channel_freq: relay_params.second_channel_freq as u32,
|
||||
relay_second_channel_dr: relay_params.second_channel_dr as u32,
|
||||
relay_second_channel_ack_offset: relay_params.second_channel_ack_offset as i32,
|
||||
relay_ed_activation_mode: relay_params.ed_activation_mode.to_proto().into(),
|
||||
relay_ed_smart_enable_level: relay_params.ed_smart_enable_level as u32,
|
||||
relay_ed_back_off: relay_params.ed_back_off as u32,
|
||||
relay_ed_uplink_limit_bucket_size: relay_params.ed_uplink_limit_bucket_size as u32,
|
||||
relay_ed_uplink_limit_reload_rate: relay_params.ed_uplink_limit_reload_rate as u32,
|
||||
relay_join_req_limit_reload_rate: relay_params.relay_join_req_limit_reload_rate
|
||||
as u32,
|
||||
relay_overall_limit_reload_rate: dp.relay_overall_limit_reload_rate as u32,
|
||||
relay_join_req_limit_bucket_size: dp.relay_join_req_limit_bucket_size as u32,
|
||||
relay_notify_limit_bucket_size: dp.relay_notify_limit_bucket_size as u32,
|
||||
relay_global_uplink_limit_bucket_size: dp.relay_global_uplink_limit_bucket_size
|
||||
relay_notify_limit_reload_rate: relay_params.relay_notify_limit_reload_rate as u32,
|
||||
relay_global_uplink_limit_reload_rate: relay_params
|
||||
.relay_global_uplink_limit_reload_rate
|
||||
as u32,
|
||||
relay_overall_limit_reload_rate: relay_params.relay_overall_limit_reload_rate
|
||||
as u32,
|
||||
relay_join_req_limit_bucket_size: relay_params.relay_join_req_limit_bucket_size
|
||||
as u32,
|
||||
relay_notify_limit_bucket_size: relay_params.relay_notify_limit_bucket_size as u32,
|
||||
relay_global_uplink_limit_bucket_size: relay_params
|
||||
.relay_global_uplink_limit_bucket_size
|
||||
as u32,
|
||||
relay_overall_limit_bucket_size: relay_params.relay_overall_limit_bucket_size
|
||||
as u32,
|
||||
relay_overall_limit_bucket_size: dp.relay_overall_limit_bucket_size as u32,
|
||||
allow_roaming: dp.allow_roaming,
|
||||
rx1_delay: dp.rx1_delay as u32,
|
||||
app_layer_params: Some(api::AppLayerParams {
|
||||
ts003_version: dp.app_layer_params.ts003_version.to_proto().into(),
|
||||
ts003_f_port: dp.app_layer_params.ts003_f_port as u32,
|
||||
ts004_version: dp.app_layer_params.ts004_version.to_proto().into(),
|
||||
ts004_f_port: dp.app_layer_params.ts004_f_port as u32,
|
||||
ts005_version: dp.app_layer_params.ts005_version.to_proto().into(),
|
||||
ts005_f_port: dp.app_layer_params.ts005_f_port as u32,
|
||||
}),
|
||||
}),
|
||||
created_at: Some(helpers::datetime_to_prost_timestamp(&dp.created_at)),
|
||||
updated_at: Some(helpers::datetime_to_prost_timestamp(&dp.updated_at)),
|
||||
@ -262,15 +316,6 @@ impl DeviceProfileService for DeviceProfile {
|
||||
supports_otaa: req_dp.supports_otaa,
|
||||
supports_class_b: req_dp.supports_class_b,
|
||||
supports_class_c: req_dp.supports_class_c,
|
||||
class_b_timeout: req_dp.class_b_timeout as i32,
|
||||
class_b_ping_slot_nb_k: req_dp.class_b_ping_slot_nb_k as i32,
|
||||
class_b_ping_slot_dr: req_dp.class_b_ping_slot_dr as i16,
|
||||
class_b_ping_slot_freq: req_dp.class_b_ping_slot_freq as i64,
|
||||
class_c_timeout: req_dp.class_c_timeout as i32,
|
||||
abp_rx1_delay: req_dp.abp_rx1_delay as i16,
|
||||
abp_rx1_dr_offset: req_dp.abp_rx1_dr_offset as i16,
|
||||
abp_rx2_dr: req_dp.abp_rx2_dr as i16,
|
||||
abp_rx2_freq: req_dp.abp_rx2_freq as i64,
|
||||
tags: fields::KeyValue::new(req_dp.tags.clone()),
|
||||
measurements: fields::Measurements::new(
|
||||
req_dp
|
||||
@ -290,32 +335,79 @@ impl DeviceProfileService for DeviceProfile {
|
||||
auto_detect_measurements: req_dp.auto_detect_measurements,
|
||||
region_config_id: (!req_dp.region_config_id.is_empty())
|
||||
.then(|| req_dp.region_config_id.clone()),
|
||||
is_relay: req_dp.is_relay,
|
||||
is_relay_ed: req_dp.is_relay_ed,
|
||||
relay_ed_relay_only: req_dp.relay_ed_relay_only,
|
||||
relay_enabled: req_dp.relay_enabled,
|
||||
relay_cad_periodicity: req_dp.relay_cad_periodicity as i16,
|
||||
relay_default_channel_index: req_dp.relay_default_channel_index as i16,
|
||||
relay_second_channel_freq: req_dp.relay_second_channel_freq as i64,
|
||||
relay_second_channel_dr: req_dp.relay_second_channel_dr as i16,
|
||||
relay_second_channel_ack_offset: req_dp.relay_second_channel_ack_offset as i16,
|
||||
relay_ed_activation_mode: req_dp.relay_ed_activation_mode().from_proto(),
|
||||
relay_ed_smart_enable_level: req_dp.relay_ed_smart_enable_level as i16,
|
||||
relay_ed_back_off: req_dp.relay_ed_back_off as i16,
|
||||
relay_ed_uplink_limit_bucket_size: req_dp.relay_ed_uplink_limit_bucket_size as i16,
|
||||
relay_ed_uplink_limit_reload_rate: req_dp.relay_ed_uplink_limit_reload_rate as i16,
|
||||
relay_join_req_limit_reload_rate: req_dp.relay_join_req_limit_reload_rate as i16,
|
||||
relay_notify_limit_reload_rate: req_dp.relay_notify_limit_reload_rate as i16,
|
||||
relay_global_uplink_limit_reload_rate: req_dp.relay_global_uplink_limit_reload_rate
|
||||
as i16,
|
||||
relay_overall_limit_reload_rate: req_dp.relay_overall_limit_reload_rate as i16,
|
||||
relay_join_req_limit_bucket_size: req_dp.relay_join_req_limit_bucket_size as i16,
|
||||
relay_notify_limit_bucket_size: req_dp.relay_notify_limit_bucket_size as i16,
|
||||
relay_global_uplink_limit_bucket_size: req_dp.relay_global_uplink_limit_bucket_size
|
||||
as i16,
|
||||
relay_overall_limit_bucket_size: req_dp.relay_overall_limit_bucket_size as i16,
|
||||
allow_roaming: req_dp.allow_roaming,
|
||||
rx1_delay: req_dp.rx1_delay as i16,
|
||||
abp_params: if req_dp.supports_otaa {
|
||||
None
|
||||
} else {
|
||||
Some(fields::AbpParams {
|
||||
rx1_delay: req_dp.abp_rx1_delay as u8,
|
||||
rx1_dr_offset: req_dp.abp_rx1_dr_offset as u8,
|
||||
rx2_dr: req_dp.abp_rx2_dr as u8,
|
||||
rx2_freq: req_dp.abp_rx2_freq,
|
||||
})
|
||||
},
|
||||
class_b_params: if req_dp.supports_class_b {
|
||||
Some(fields::ClassBParams {
|
||||
timeout: req_dp.class_b_timeout as u16,
|
||||
ping_slot_nb_k: req_dp.class_b_ping_slot_nb_k as u8,
|
||||
ping_slot_dr: req_dp.class_b_ping_slot_dr as u8,
|
||||
ping_slot_freq: req_dp.class_b_ping_slot_freq,
|
||||
})
|
||||
} else {
|
||||
None
|
||||
},
|
||||
class_c_params: if req_dp.supports_class_c {
|
||||
Some(fields::ClassCParams {
|
||||
timeout: req_dp.class_c_timeout as u16,
|
||||
})
|
||||
} else {
|
||||
None
|
||||
},
|
||||
relay_params: if req_dp.is_relay || req_dp.is_relay_ed {
|
||||
Some(fields::RelayParams {
|
||||
is_relay: req_dp.is_relay,
|
||||
is_relay_ed: req_dp.is_relay_ed,
|
||||
ed_relay_only: req_dp.relay_ed_relay_only,
|
||||
relay_enabled: req_dp.relay_enabled,
|
||||
relay_cad_periodicity: req_dp.relay_cad_periodicity as u8,
|
||||
default_channel_index: req_dp.relay_default_channel_index as u8,
|
||||
second_channel_freq: req_dp.relay_second_channel_freq,
|
||||
second_channel_dr: req_dp.relay_second_channel_dr as u8,
|
||||
second_channel_ack_offset: req_dp.relay_second_channel_ack_offset as u8,
|
||||
ed_activation_mode: req_dp.relay_ed_activation_mode().from_proto(),
|
||||
ed_smart_enable_level: req_dp.relay_ed_smart_enable_level as u8,
|
||||
ed_back_off: req_dp.relay_ed_back_off as u8,
|
||||
ed_uplink_limit_bucket_size: req_dp.relay_ed_uplink_limit_bucket_size as u8,
|
||||
ed_uplink_limit_reload_rate: req_dp.relay_ed_uplink_limit_reload_rate as u8,
|
||||
relay_join_req_limit_reload_rate: req_dp.relay_join_req_limit_reload_rate as u8,
|
||||
relay_notify_limit_reload_rate: req_dp.relay_notify_limit_reload_rate as u8,
|
||||
relay_global_uplink_limit_reload_rate: req_dp
|
||||
.relay_global_uplink_limit_reload_rate
|
||||
as u8,
|
||||
relay_overall_limit_reload_rate: req_dp.relay_overall_limit_reload_rate as u8,
|
||||
relay_join_req_limit_bucket_size: req_dp.relay_join_req_limit_bucket_size as u8,
|
||||
relay_notify_limit_bucket_size: req_dp.relay_notify_limit_bucket_size as u8,
|
||||
relay_global_uplink_limit_bucket_size: req_dp
|
||||
.relay_global_uplink_limit_bucket_size
|
||||
as u8,
|
||||
relay_overall_limit_bucket_size: req_dp.relay_overall_limit_bucket_size as u8,
|
||||
})
|
||||
} else {
|
||||
None
|
||||
},
|
||||
app_layer_params: {
|
||||
let app_layer_params = req_dp.app_layer_params.unwrap_or_default();
|
||||
|
||||
fields::AppLayerParams {
|
||||
ts003_version: app_layer_params.ts003_version().from_proto(),
|
||||
ts003_f_port: app_layer_params.ts003_f_port as u8,
|
||||
ts004_version: app_layer_params.ts004_version().from_proto(),
|
||||
ts004_f_port: app_layer_params.ts004_f_port as u8,
|
||||
ts005_version: app_layer_params.ts005_version().from_proto(),
|
||||
ts005_f_port: app_layer_params.ts005_f_port as u8,
|
||||
}
|
||||
},
|
||||
..Default::default()
|
||||
})
|
||||
.await
|
||||
@ -506,6 +598,14 @@ pub mod test {
|
||||
mac_version: common::MacVersion::Lorawan103.into(),
|
||||
reg_params_revision: common::RegParamsRevision::A.into(),
|
||||
adr_algorithm_id: "default".into(),
|
||||
app_layer_params: Some(api::AppLayerParams {
|
||||
ts003_version: api::Ts003Version::Ts003NotImplemented.into(),
|
||||
ts003_f_port: 202,
|
||||
ts004_version: api::Ts004Version::Ts004NotImplemented.into(),
|
||||
ts004_f_port: 201,
|
||||
ts005_version: api::Ts005Version::Ts005NotImplemented.into(),
|
||||
ts005_f_port: 200,
|
||||
}),
|
||||
..Default::default()
|
||||
}),
|
||||
get_resp.get_ref().device_profile
|
||||
@ -546,6 +646,7 @@ pub mod test {
|
||||
mac_version: common::MacVersion::Lorawan103.into(),
|
||||
reg_params_revision: common::RegParamsRevision::A.into(),
|
||||
adr_algorithm_id: "default".into(),
|
||||
app_layer_params: Some(api::AppLayerParams::default()),
|
||||
..Default::default()
|
||||
}),
|
||||
get_resp.get_ref().device_profile
|
||||
|
@ -47,6 +47,17 @@ impl ToStatus for storage::error::Error {
|
||||
storage::error::Error::ProstDecode(_) => {
|
||||
Status::new(Code::Internal, format!("{:#}", self))
|
||||
}
|
||||
storage::error::Error::ValidatorValidate(_) => {
|
||||
Status::new(Code::InvalidArgument, format!("{:#}", self))
|
||||
}
|
||||
storage::error::Error::Multi(errors) => {
|
||||
let errors = errors
|
||||
.iter()
|
||||
.map(|e| e.to_string())
|
||||
.collect::<Vec<String>>()
|
||||
.join(", ");
|
||||
Status::new(Code::InvalidArgument, errors)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
935
chirpstack/src/api/fuota.rs
Normal file
935
chirpstack/src/api/fuota.rs
Normal file
@ -0,0 +1,935 @@
|
||||
use std::str::FromStr;
|
||||
|
||||
use chrono::Utc;
|
||||
use tonic::{Request, Response, Status};
|
||||
use uuid::Uuid;
|
||||
|
||||
use chirpstack_api::api;
|
||||
use chirpstack_api::api::fuota_service_server::FuotaService;
|
||||
use lrwn::EUI64;
|
||||
|
||||
use crate::aeskey::get_random_aes_key;
|
||||
use crate::api::auth::validator;
|
||||
use crate::api::error::ToStatus;
|
||||
use crate::api::helpers::{self, FromProto, ToProto};
|
||||
use crate::devaddr::get_random_dev_addr;
|
||||
use crate::storage::{fields, fuota};
|
||||
|
||||
pub struct Fuota {
|
||||
validator: validator::RequestValidator,
|
||||
}
|
||||
|
||||
impl Fuota {
|
||||
pub fn new(validator: validator::RequestValidator) -> Self {
|
||||
Fuota { validator }
|
||||
}
|
||||
}
|
||||
|
||||
#[tonic::async_trait]
|
||||
impl FuotaService for Fuota {
|
||||
async fn create_deployment(
|
||||
&self,
|
||||
request: Request<api::CreateFuotaDeploymentRequest>,
|
||||
) -> Result<Response<api::CreateFuotaDeploymentResponse>, Status> {
|
||||
let req_dp = match &request.get_ref().deployment {
|
||||
Some(v) => v,
|
||||
None => {
|
||||
return Err(Status::invalid_argument("deployment is missing"));
|
||||
}
|
||||
};
|
||||
|
||||
let app_id = Uuid::from_str(&req_dp.application_id).map_err(|e| e.status())?;
|
||||
let dp_id = Uuid::from_str(&req_dp.device_profile_id).map_err(|e| e.status())?;
|
||||
|
||||
self.validator
|
||||
.validate(
|
||||
request.extensions(),
|
||||
validator::ValidateFuotaDeploymentsAccess::new(validator::Flag::Create, app_id),
|
||||
)
|
||||
.await?;
|
||||
|
||||
let mut dp = fuota::FuotaDeployment {
|
||||
name: req_dp.name.clone(),
|
||||
application_id: app_id.into(),
|
||||
device_profile_id: dp_id.into(),
|
||||
multicast_addr: get_random_dev_addr(),
|
||||
multicast_key: get_random_aes_key(),
|
||||
multicast_group_type: match req_dp.multicast_group_type() {
|
||||
api::MulticastGroupType::ClassB => "B",
|
||||
api::MulticastGroupType::ClassC => "C",
|
||||
}
|
||||
.to_string(),
|
||||
multicast_class_c_scheduling_type: req_dp
|
||||
.multicast_class_c_scheduling_type()
|
||||
.from_proto(),
|
||||
multicast_dr: req_dp.multicast_dr as i16,
|
||||
multicast_class_b_ping_slot_nb_k: req_dp.multicast_class_b_ping_slot_nb_k as i16,
|
||||
multicast_frequency: req_dp.multicast_frequency as i64,
|
||||
multicast_timeout: req_dp.multicast_timeout as i16,
|
||||
unicast_max_retry_count: req_dp.unicast_max_retry_count as i16,
|
||||
fragmentation_fragment_size: req_dp.fragmentation_fragment_size as i16,
|
||||
fragmentation_redundancy_percentage: req_dp.fragmentation_redundancy_percentage as i16,
|
||||
fragmentation_session_index: req_dp.fragmentation_session_index as i16,
|
||||
fragmentation_matrix: req_dp.fragmentation_matrix as i16,
|
||||
fragmentation_block_ack_delay: req_dp.fragmentation_block_ack_delay as i16,
|
||||
fragmentation_descriptor: req_dp.fragmentation_descriptor.clone(),
|
||||
request_fragmentation_session_status: req_dp
|
||||
.request_fragmentation_session_status()
|
||||
.from_proto(),
|
||||
payload: req_dp.payload.clone(),
|
||||
on_complete_set_device_tags: fields::KeyValue::new(
|
||||
req_dp.on_complete_set_device_tags.clone(),
|
||||
),
|
||||
..Default::default()
|
||||
};
|
||||
if req_dp.calculate_fragmentation_fragment_size {
|
||||
dp.fragmentation_fragment_size = fuota::get_max_fragment_size(&dp)
|
||||
.await
|
||||
.map_err(|e| e.status())? as i16;
|
||||
}
|
||||
if req_dp.calculate_multicast_timeout {
|
||||
dp.multicast_timeout =
|
||||
fuota::get_multicast_timeout(&dp).map_err(|e| e.status())? as i16;
|
||||
}
|
||||
|
||||
let dp = fuota::create_deployment(dp).await.map_err(|e| e.status())?;
|
||||
|
||||
let mut resp = Response::new(api::CreateFuotaDeploymentResponse {
|
||||
id: dp.id.to_string(),
|
||||
});
|
||||
resp.metadata_mut().insert(
|
||||
"x-log-fuota_deployment_id",
|
||||
dp.id.to_string().parse().unwrap(),
|
||||
);
|
||||
|
||||
Ok(resp)
|
||||
}
|
||||
|
||||
async fn get_deployment(
|
||||
&self,
|
||||
request: Request<api::GetFuotaDeploymentRequest>,
|
||||
) -> Result<Response<api::GetFuotaDeploymentResponse>, Status> {
|
||||
let req = request.get_ref();
|
||||
let dp_id = Uuid::from_str(&req.id).map_err(|e| e.status())?;
|
||||
|
||||
self.validator
|
||||
.validate(
|
||||
request.extensions(),
|
||||
validator::ValidateFuotaDeploymentAccess::new(validator::Flag::Read, dp_id),
|
||||
)
|
||||
.await?;
|
||||
|
||||
let dp = fuota::get_deployment(dp_id).await.map_err(|e| e.status())?;
|
||||
|
||||
let mut resp = Response::new(api::GetFuotaDeploymentResponse {
|
||||
deployment: Some(api::FuotaDeployment {
|
||||
id: dp.id.to_string(),
|
||||
application_id: dp.application_id.to_string(),
|
||||
device_profile_id: dp.device_profile_id.to_string(),
|
||||
name: dp.name.clone(),
|
||||
multicast_group_type: match dp.multicast_group_type.as_ref() {
|
||||
"B" => api::MulticastGroupType::ClassB,
|
||||
"C" => api::MulticastGroupType::ClassC,
|
||||
_ => return Err(Status::invalid_argument("Invalid multicast_group_type")),
|
||||
}
|
||||
.into(),
|
||||
multicast_class_c_scheduling_type: dp
|
||||
.multicast_class_c_scheduling_type
|
||||
.to_proto()
|
||||
.into(),
|
||||
multicast_dr: dp.multicast_dr as u32,
|
||||
multicast_class_b_ping_slot_nb_k: dp.multicast_class_b_ping_slot_nb_k as u32,
|
||||
multicast_frequency: dp.multicast_frequency as u32,
|
||||
multicast_timeout: dp.multicast_timeout as u32,
|
||||
unicast_max_retry_count: dp.unicast_max_retry_count as u32,
|
||||
fragmentation_fragment_size: dp.fragmentation_fragment_size as u32,
|
||||
fragmentation_redundancy_percentage: dp.fragmentation_redundancy_percentage as u32,
|
||||
fragmentation_session_index: dp.fragmentation_session_index as u32,
|
||||
fragmentation_matrix: dp.fragmentation_matrix as u32,
|
||||
fragmentation_block_ack_delay: dp.fragmentation_block_ack_delay as u32,
|
||||
fragmentation_descriptor: dp.fragmentation_descriptor.clone(),
|
||||
request_fragmentation_session_status: dp
|
||||
.request_fragmentation_session_status
|
||||
.to_proto()
|
||||
.into(),
|
||||
payload: dp.payload.clone(),
|
||||
calculate_multicast_timeout: false,
|
||||
calculate_fragmentation_fragment_size: false,
|
||||
on_complete_set_device_tags: dp.on_complete_set_device_tags.into_hashmap(),
|
||||
}),
|
||||
created_at: Some(helpers::datetime_to_prost_timestamp(&dp.created_at)),
|
||||
updated_at: Some(helpers::datetime_to_prost_timestamp(&dp.updated_at)),
|
||||
started_at: dp
|
||||
.started_at
|
||||
.as_ref()
|
||||
.map(helpers::datetime_to_prost_timestamp),
|
||||
completed_at: dp
|
||||
.completed_at
|
||||
.as_ref()
|
||||
.map(helpers::datetime_to_prost_timestamp),
|
||||
});
|
||||
resp.metadata_mut()
|
||||
.insert("x-log-fuota_deployment_id", req.id.parse().unwrap());
|
||||
|
||||
Ok(resp)
|
||||
}
|
||||
|
||||
async fn update_deployment(
|
||||
&self,
|
||||
request: Request<api::UpdateFuotaDeploymentRequest>,
|
||||
) -> Result<Response<()>, Status> {
|
||||
let req_dp = match &request.get_ref().deployment {
|
||||
Some(v) => v,
|
||||
None => {
|
||||
return Err(Status::invalid_argument("deployment is missing"));
|
||||
}
|
||||
};
|
||||
|
||||
let id = Uuid::from_str(&req_dp.id).map_err(|e| e.status())?;
|
||||
let app_id = Uuid::from_str(&req_dp.application_id).map_err(|e| e.status())?;
|
||||
let dp_id = Uuid::from_str(&req_dp.device_profile_id).map_err(|e| e.status())?;
|
||||
|
||||
self.validator
|
||||
.validate(
|
||||
request.extensions(),
|
||||
validator::ValidateFuotaDeploymentAccess::new(validator::Flag::Update, dp_id),
|
||||
)
|
||||
.await?;
|
||||
|
||||
let d = fuota::get_deployment(id).await.map_err(|e| e.status())?;
|
||||
if d.started_at.is_some() {
|
||||
return Err(Status::failed_precondition(
|
||||
"FUOTA deployment has already started",
|
||||
));
|
||||
}
|
||||
|
||||
let mut dp = fuota::FuotaDeployment {
|
||||
id: id.into(),
|
||||
name: req_dp.name.clone(),
|
||||
application_id: app_id.into(),
|
||||
device_profile_id: dp_id.into(),
|
||||
multicast_group_type: match req_dp.multicast_group_type() {
|
||||
api::MulticastGroupType::ClassB => "B",
|
||||
api::MulticastGroupType::ClassC => "C",
|
||||
}
|
||||
.to_string(),
|
||||
multicast_class_c_scheduling_type: req_dp
|
||||
.multicast_class_c_scheduling_type()
|
||||
.from_proto(),
|
||||
multicast_dr: req_dp.multicast_dr as i16,
|
||||
multicast_class_b_ping_slot_nb_k: req_dp.multicast_class_b_ping_slot_nb_k as i16,
|
||||
multicast_frequency: req_dp.multicast_frequency as i64,
|
||||
multicast_timeout: req_dp.multicast_timeout as i16,
|
||||
unicast_max_retry_count: req_dp.unicast_max_retry_count as i16,
|
||||
fragmentation_fragment_size: req_dp.fragmentation_fragment_size as i16,
|
||||
fragmentation_redundancy_percentage: req_dp.fragmentation_redundancy_percentage as i16,
|
||||
fragmentation_session_index: req_dp.fragmentation_session_index as i16,
|
||||
fragmentation_matrix: req_dp.fragmentation_matrix as i16,
|
||||
fragmentation_block_ack_delay: req_dp.fragmentation_block_ack_delay as i16,
|
||||
fragmentation_descriptor: req_dp.fragmentation_descriptor.clone(),
|
||||
request_fragmentation_session_status: req_dp
|
||||
.request_fragmentation_session_status()
|
||||
.from_proto(),
|
||||
payload: req_dp.payload.clone(),
|
||||
on_complete_set_device_tags: fields::KeyValue::new(
|
||||
req_dp.on_complete_set_device_tags.clone(),
|
||||
),
|
||||
..Default::default()
|
||||
};
|
||||
if req_dp.calculate_fragmentation_fragment_size {
|
||||
dp.fragmentation_fragment_size = fuota::get_max_fragment_size(&dp)
|
||||
.await
|
||||
.map_err(|e| e.status())? as i16;
|
||||
}
|
||||
if req_dp.calculate_multicast_timeout {
|
||||
dp.multicast_timeout =
|
||||
fuota::get_multicast_timeout(&dp).map_err(|e| e.status())? as i16;
|
||||
}
|
||||
|
||||
let _ = fuota::update_deployment(dp).await.map_err(|e| e.status())?;
|
||||
|
||||
let mut resp = Response::new(());
|
||||
resp.metadata_mut()
|
||||
.insert("x-log-fuota_deployment_id", req_dp.id.parse().unwrap());
|
||||
Ok(resp)
|
||||
}
|
||||
|
||||
async fn delete_deployment(
|
||||
&self,
|
||||
request: Request<api::DeleteFuotaDeploymentRequest>,
|
||||
) -> Result<Response<()>, Status> {
|
||||
let req = request.get_ref();
|
||||
let id = Uuid::from_str(&req.id).map_err(|e| e.status())?;
|
||||
|
||||
self.validator
|
||||
.validate(
|
||||
request.extensions(),
|
||||
validator::ValidateFuotaDeploymentAccess::new(validator::Flag::Delete, id),
|
||||
)
|
||||
.await?;
|
||||
|
||||
let _ = fuota::delete_deployment(id).await.map_err(|e| e.status())?;
|
||||
|
||||
let mut resp = Response::new(());
|
||||
resp.metadata_mut()
|
||||
.insert("x-log-fuota_deployment_id", req.id.parse().unwrap());
|
||||
Ok(resp)
|
||||
}
|
||||
|
||||
async fn start_deployment(
|
||||
&self,
|
||||
request: Request<api::StartFuotaDeploymentRequest>,
|
||||
) -> Result<Response<()>, Status> {
|
||||
let req = request.get_ref();
|
||||
let id = Uuid::from_str(&req.id).map_err(|e| e.status())?;
|
||||
|
||||
self.validator
|
||||
.validate(
|
||||
request.extensions(),
|
||||
validator::ValidateFuotaDeploymentAccess::new(validator::Flag::Update, id),
|
||||
)
|
||||
.await?;
|
||||
|
||||
let mut d = fuota::get_deployment(id).await.map_err(|e| e.status())?;
|
||||
if d.started_at.is_some() {
|
||||
return Err(Status::failed_precondition(
|
||||
"FUOTA deployment has already started",
|
||||
));
|
||||
}
|
||||
|
||||
d.started_at = Some(Utc::now());
|
||||
let d = fuota::update_deployment(d).await.map_err(|e| e.status())?;
|
||||
|
||||
fuota::create_job(fuota::FuotaDeploymentJob {
|
||||
fuota_deployment_id: d.id,
|
||||
job: fields::FuotaJob::CreateMcGroup,
|
||||
..Default::default()
|
||||
})
|
||||
.await
|
||||
.map_err(|e| e.status())?;
|
||||
|
||||
let mut resp = Response::new(());
|
||||
resp.metadata_mut()
|
||||
.insert("x-log-fuota_deployment_id", req.id.parse().unwrap());
|
||||
Ok(resp)
|
||||
}
|
||||
|
||||
async fn list_deployments(
|
||||
&self,
|
||||
request: Request<api::ListFuotaDeploymentsRequest>,
|
||||
) -> Result<Response<api::ListFuotaDeploymentsResponse>, Status> {
|
||||
let req = request.get_ref();
|
||||
let app_id = Uuid::from_str(&req.application_id).map_err(|e| e.status())?;
|
||||
|
||||
self.validator
|
||||
.validate(
|
||||
request.extensions(),
|
||||
validator::ValidateFuotaDeploymentsAccess::new(validator::Flag::List, app_id),
|
||||
)
|
||||
.await?;
|
||||
|
||||
let count = fuota::get_deployment_count(app_id)
|
||||
.await
|
||||
.map_err(|e| e.status())?;
|
||||
let items = fuota::list_deployments(app_id, req.limit as i64, req.offset as i64)
|
||||
.await
|
||||
.map_err(|e| e.status())?;
|
||||
|
||||
let mut resp = Response::new(api::ListFuotaDeploymentsResponse {
|
||||
total_count: count as u32,
|
||||
result: items
|
||||
.iter()
|
||||
.map(|d| api::FuotaDeploymentListItem {
|
||||
id: d.id.to_string(),
|
||||
created_at: Some(helpers::datetime_to_prost_timestamp(&d.created_at)),
|
||||
updated_at: Some(helpers::datetime_to_prost_timestamp(&d.created_at)),
|
||||
started_at: d
|
||||
.started_at
|
||||
.as_ref()
|
||||
.map(helpers::datetime_to_prost_timestamp),
|
||||
completed_at: d
|
||||
.completed_at
|
||||
.as_ref()
|
||||
.map(helpers::datetime_to_prost_timestamp),
|
||||
name: d.name.clone(),
|
||||
})
|
||||
.collect(),
|
||||
});
|
||||
resp.metadata_mut()
|
||||
.insert("x-log-application_id", req.application_id.parse().unwrap());
|
||||
|
||||
Ok(resp)
|
||||
}
|
||||
|
||||
async fn add_devices(
|
||||
&self,
|
||||
request: Request<api::AddDevicesToFuotaDeploymentRequest>,
|
||||
) -> Result<Response<()>, Status> {
|
||||
let req = request.get_ref();
|
||||
let dp_id = Uuid::from_str(&req.fuota_deployment_id).map_err(|e| e.status())?;
|
||||
|
||||
self.validator
|
||||
.validate(
|
||||
request.extensions(),
|
||||
validator::ValidateFuotaDeploymentAccess::new(validator::Flag::Update, dp_id),
|
||||
)
|
||||
.await?;
|
||||
|
||||
let d = fuota::get_deployment(dp_id).await.map_err(|e| e.status())?;
|
||||
if d.started_at.is_some() {
|
||||
return Err(Status::failed_precondition(
|
||||
"FUOTA deployment has already started",
|
||||
));
|
||||
}
|
||||
|
||||
let mut dev_euis = Vec::with_capacity(req.dev_euis.len());
|
||||
for dev_eui in &req.dev_euis {
|
||||
dev_euis.push(EUI64::from_str(dev_eui).map_err(|e| e.status())?);
|
||||
}
|
||||
|
||||
fuota::add_devices(dp_id, dev_euis)
|
||||
.await
|
||||
.map_err(|e| e.status())?;
|
||||
|
||||
let mut resp = Response::new(());
|
||||
resp.metadata_mut().insert(
|
||||
"x-log-fuota_deployment_id",
|
||||
req.fuota_deployment_id.parse().unwrap(),
|
||||
);
|
||||
Ok(resp)
|
||||
}
|
||||
|
||||
async fn remove_devices(
|
||||
&self,
|
||||
request: Request<api::RemoveDevicesFromFuotaDeploymentRequest>,
|
||||
) -> Result<Response<()>, Status> {
|
||||
let req = request.get_ref();
|
||||
let dp_id = Uuid::from_str(&req.fuota_deployment_id).map_err(|e| e.status())?;
|
||||
|
||||
self.validator
|
||||
.validate(
|
||||
request.extensions(),
|
||||
validator::ValidateFuotaDeploymentAccess::new(validator::Flag::Update, dp_id),
|
||||
)
|
||||
.await?;
|
||||
|
||||
let mut dev_euis = Vec::with_capacity(req.dev_euis.len());
|
||||
for dev_eui in &req.dev_euis {
|
||||
dev_euis.push(EUI64::from_str(dev_eui).map_err(|e| e.status())?);
|
||||
}
|
||||
|
||||
fuota::remove_devices(dp_id, dev_euis)
|
||||
.await
|
||||
.map_err(|e| e.status())?;
|
||||
|
||||
let mut resp = Response::new(());
|
||||
resp.metadata_mut().insert(
|
||||
"x-log-fuota_deployment_id",
|
||||
req.fuota_deployment_id.parse().unwrap(),
|
||||
);
|
||||
Ok(resp)
|
||||
}
|
||||
|
||||
async fn list_devices(
|
||||
&self,
|
||||
request: Request<api::ListFuotaDeploymentDevicesRequest>,
|
||||
) -> Result<Response<api::ListFuotaDeploymentDevicesResponse>, Status> {
|
||||
let req = request.get_ref();
|
||||
let dp_id = Uuid::from_str(&req.fuota_deployment_id).map_err(|e| e.status())?;
|
||||
|
||||
self.validator
|
||||
.validate(
|
||||
request.extensions(),
|
||||
validator::ValidateFuotaDeploymentAccess::new(validator::Flag::Read, dp_id),
|
||||
)
|
||||
.await?;
|
||||
|
||||
let count = fuota::get_device_count(dp_id)
|
||||
.await
|
||||
.map_err(|e| e.status())?;
|
||||
let items = fuota::get_devices(dp_id, req.limit as i64, req.offset as i64)
|
||||
.await
|
||||
.map_err(|e| e.status())?;
|
||||
|
||||
let mut resp = Response::new(api::ListFuotaDeploymentDevicesResponse {
|
||||
total_count: count as u32,
|
||||
result: items
|
||||
.iter()
|
||||
.map(|d| api::FuotaDeploymentDeviceListItem {
|
||||
fuota_deployment_id: d.fuota_deployment_id.to_string(),
|
||||
dev_eui: d.dev_eui.to_string(),
|
||||
created_at: Some(helpers::datetime_to_prost_timestamp(&d.created_at)),
|
||||
completed_at: d
|
||||
.completed_at
|
||||
.as_ref()
|
||||
.map(helpers::datetime_to_prost_timestamp),
|
||||
mc_group_setup_completed_at: d
|
||||
.mc_group_setup_completed_at
|
||||
.as_ref()
|
||||
.map(helpers::datetime_to_prost_timestamp),
|
||||
mc_session_completed_at: d
|
||||
.mc_session_completed_at
|
||||
.as_ref()
|
||||
.map(helpers::datetime_to_prost_timestamp),
|
||||
frag_session_setup_completed_at: d
|
||||
.frag_session_setup_completed_at
|
||||
.as_ref()
|
||||
.map(helpers::datetime_to_prost_timestamp),
|
||||
frag_status_completed_at: d
|
||||
.frag_status_completed_at
|
||||
.as_ref()
|
||||
.map(helpers::datetime_to_prost_timestamp),
|
||||
error_msg: d.error_msg.clone(),
|
||||
})
|
||||
.collect(),
|
||||
});
|
||||
resp.metadata_mut().insert(
|
||||
"x-log-fuota_deployment_id",
|
||||
req.fuota_deployment_id.parse().unwrap(),
|
||||
);
|
||||
|
||||
Ok(resp)
|
||||
}
|
||||
|
||||
async fn add_gateways(
|
||||
&self,
|
||||
request: Request<api::AddGatewaysToFuotaDeploymentRequest>,
|
||||
) -> Result<Response<()>, Status> {
|
||||
let req = request.get_ref();
|
||||
let dp_id = Uuid::from_str(&req.fuota_deployment_id).map_err(|e| e.status())?;
|
||||
|
||||
self.validator
|
||||
.validate(
|
||||
request.extensions(),
|
||||
validator::ValidateFuotaDeploymentAccess::new(validator::Flag::Update, dp_id),
|
||||
)
|
||||
.await?;
|
||||
|
||||
let d = fuota::get_deployment(dp_id).await.map_err(|e| e.status())?;
|
||||
if d.started_at.is_some() {
|
||||
return Err(Status::failed_precondition(
|
||||
"FUOTA deployment has already started",
|
||||
));
|
||||
}
|
||||
|
||||
let mut gateway_ids = Vec::with_capacity(req.gateway_ids.len());
|
||||
for gateway_id in &req.gateway_ids {
|
||||
gateway_ids.push(EUI64::from_str(gateway_id).map_err(|e| e.status())?);
|
||||
}
|
||||
|
||||
fuota::add_gateways(dp_id, gateway_ids)
|
||||
.await
|
||||
.map_err(|e| e.status())?;
|
||||
|
||||
let mut resp = Response::new(());
|
||||
resp.metadata_mut().insert(
|
||||
"x-log-fuota_deployment_id",
|
||||
req.fuota_deployment_id.parse().unwrap(),
|
||||
);
|
||||
Ok(resp)
|
||||
}
|
||||
|
||||
async fn remove_gateways(
|
||||
&self,
|
||||
request: Request<api::RemoveGatewaysFromFuotaDeploymentRequest>,
|
||||
) -> Result<Response<()>, Status> {
|
||||
let req = request.get_ref();
|
||||
let dp_id = Uuid::from_str(&req.fuota_deployment_id).map_err(|e| e.status())?;
|
||||
|
||||
self.validator
|
||||
.validate(
|
||||
request.extensions(),
|
||||
validator::ValidateFuotaDeploymentAccess::new(validator::Flag::Update, dp_id),
|
||||
)
|
||||
.await?;
|
||||
|
||||
let mut gateway_ids = Vec::with_capacity(req.gateway_ids.len());
|
||||
for gateway_id in &req.gateway_ids {
|
||||
gateway_ids.push(EUI64::from_str(gateway_id).map_err(|e| e.status())?);
|
||||
}
|
||||
|
||||
fuota::remove_gateways(dp_id, gateway_ids)
|
||||
.await
|
||||
.map_err(|e| e.status())?;
|
||||
|
||||
let mut resp = Response::new(());
|
||||
resp.metadata_mut().insert(
|
||||
"x-log-fuota_deployment_id",
|
||||
req.fuota_deployment_id.parse().unwrap(),
|
||||
);
|
||||
Ok(resp)
|
||||
}
|
||||
|
||||
async fn list_gateways(
|
||||
&self,
|
||||
request: Request<api::ListFuotaDeploymentGatewaysRequest>,
|
||||
) -> Result<Response<api::ListFuotaDeploymentGatewaysResponse>, Status> {
|
||||
let req = request.get_ref();
|
||||
let dp_id = Uuid::from_str(&req.fuota_deployment_id).map_err(|e| e.status())?;
|
||||
|
||||
self.validator
|
||||
.validate(
|
||||
request.extensions(),
|
||||
validator::ValidateFuotaDeploymentAccess::new(validator::Flag::Read, dp_id),
|
||||
)
|
||||
.await?;
|
||||
|
||||
let count = fuota::get_gateway_count(dp_id)
|
||||
.await
|
||||
.map_err(|e| e.status())?;
|
||||
let items = fuota::get_gateways(dp_id, req.limit as i64, req.offset as i64)
|
||||
.await
|
||||
.map_err(|e| e.status())?;
|
||||
|
||||
let mut resp = Response::new(api::ListFuotaDeploymentGatewaysResponse {
|
||||
total_count: count as u32,
|
||||
result: items
|
||||
.iter()
|
||||
.map(|gw| api::FuotaDeploymentGatewayListItem {
|
||||
fuota_deployment_id: gw.fuota_deployment_id.to_string(),
|
||||
gateway_id: gw.gateway_id.to_string(),
|
||||
created_at: Some(helpers::datetime_to_prost_timestamp(&gw.created_at)),
|
||||
})
|
||||
.collect(),
|
||||
});
|
||||
resp.metadata_mut().insert(
|
||||
"x-log-fuota_deployment_id",
|
||||
req.fuota_deployment_id.parse().unwrap(),
|
||||
);
|
||||
Ok(resp)
|
||||
}
|
||||
|
||||
async fn list_jobs(
|
||||
&self,
|
||||
request: Request<api::ListFuotaDeploymentJobsRequest>,
|
||||
) -> Result<Response<api::ListFuotaDeploymentJobsResponse>, Status> {
|
||||
let req = request.get_ref();
|
||||
let dp_id = Uuid::from_str(&req.fuota_deployment_id).map_err(|e| e.status())?;
|
||||
|
||||
self.validator
|
||||
.validate(
|
||||
request.extensions(),
|
||||
validator::ValidateFuotaDeploymentAccess::new(validator::Flag::Read, dp_id),
|
||||
)
|
||||
.await?;
|
||||
|
||||
let jobs = fuota::list_jobs(dp_id).await.map_err(|e| e.status())?;
|
||||
|
||||
let mut resp = Response::new(api::ListFuotaDeploymentJobsResponse {
|
||||
jobs: jobs
|
||||
.iter()
|
||||
.map(|j| api::FuotaDeploymentJob {
|
||||
job: j.job.to_string(),
|
||||
created_at: Some(helpers::datetime_to_prost_timestamp(&j.created_at)),
|
||||
completed_at: j
|
||||
.completed_at
|
||||
.as_ref()
|
||||
.map(helpers::datetime_to_prost_timestamp),
|
||||
max_retry_count: j.max_retry_count as u32,
|
||||
attempt_count: j.attempt_count as u32,
|
||||
scheduler_run_after: Some(helpers::datetime_to_prost_timestamp(
|
||||
&j.scheduler_run_after,
|
||||
)),
|
||||
warning_msg: j.warning_msg.clone(),
|
||||
error_msg: j.error_msg.clone(),
|
||||
})
|
||||
.collect(),
|
||||
});
|
||||
resp.metadata_mut().insert(
|
||||
"x-log-fuota_deployment_id",
|
||||
req.fuota_deployment_id.parse().unwrap(),
|
||||
);
|
||||
Ok(resp)
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use super::*;
|
||||
use crate::api::auth::validator::RequestValidator;
|
||||
use crate::api::auth::AuthID;
|
||||
use crate::storage::{application, device, device_profile, gateway, tenant, user};
|
||||
use crate::test;
|
||||
|
||||
#[tokio::test]
|
||||
async fn test_fuota() {
|
||||
let _guard = test::prepare().await;
|
||||
|
||||
// setup admin user
|
||||
let u = user::User {
|
||||
is_admin: true,
|
||||
is_active: true,
|
||||
email: "admin@admin".into(),
|
||||
email_verified: true,
|
||||
..Default::default()
|
||||
};
|
||||
let u = user::create(u).await.unwrap();
|
||||
|
||||
// create tenant
|
||||
let t = tenant::create(tenant::Tenant {
|
||||
name: "test-tenant".into(),
|
||||
can_have_gateways: true,
|
||||
..Default::default()
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
// create app
|
||||
let app = application::create(application::Application {
|
||||
tenant_id: t.id,
|
||||
name: "test-app".into(),
|
||||
..Default::default()
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
// create dp
|
||||
let dp = device_profile::create(device_profile::DeviceProfile {
|
||||
tenant_id: t.id,
|
||||
name: "test-dp".into(),
|
||||
..Default::default()
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
// create device
|
||||
let dev = device::create(device::Device {
|
||||
dev_eui: EUI64::from_be_bytes([1, 2, 3, 4, 5, 6, 7, 8]),
|
||||
application_id: app.id,
|
||||
device_profile_id: dp.id,
|
||||
..Default::default()
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
// create gateway
|
||||
let gw = gateway::create(gateway::Gateway {
|
||||
gateway_id: EUI64::from_be_bytes([1, 2, 3, 4, 5, 6, 7, 8]),
|
||||
tenant_id: t.id,
|
||||
name: "test-gw".into(),
|
||||
..Default::default()
|
||||
})
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
// setup api
|
||||
let service = Fuota::new(RequestValidator::new());
|
||||
|
||||
// create deployment
|
||||
let create_req = get_request(
|
||||
&u.id,
|
||||
api::CreateFuotaDeploymentRequest {
|
||||
deployment: Some(api::FuotaDeployment {
|
||||
application_id: app.id.to_string(),
|
||||
device_profile_id: dp.id.to_string(),
|
||||
name: "test-fuota".into(),
|
||||
..Default::default()
|
||||
}),
|
||||
},
|
||||
);
|
||||
let create_resp = service.create_deployment(create_req).await.unwrap();
|
||||
let create_resp = create_resp.get_ref();
|
||||
|
||||
// get deployment
|
||||
let get_req = get_request(
|
||||
&u.id,
|
||||
api::GetFuotaDeploymentRequest {
|
||||
id: create_resp.id.clone(),
|
||||
},
|
||||
);
|
||||
let get_resp = service.get_deployment(get_req).await.unwrap();
|
||||
let get_resp = get_resp.get_ref();
|
||||
assert_eq!(
|
||||
Some(api::FuotaDeployment {
|
||||
id: create_resp.id.clone(),
|
||||
application_id: app.id.to_string(),
|
||||
device_profile_id: dp.id.to_string(),
|
||||
name: "test-fuota".into(),
|
||||
..Default::default()
|
||||
}),
|
||||
get_resp.deployment
|
||||
);
|
||||
|
||||
// update deployment
|
||||
let update_req = get_request(
|
||||
&u.id,
|
||||
api::UpdateFuotaDeploymentRequest {
|
||||
deployment: Some(api::FuotaDeployment {
|
||||
id: create_resp.id.clone(),
|
||||
application_id: app.id.to_string(),
|
||||
device_profile_id: dp.id.to_string(),
|
||||
name: "updated-test-fuota".into(),
|
||||
..Default::default()
|
||||
}),
|
||||
},
|
||||
);
|
||||
service.update_deployment(update_req).await.unwrap();
|
||||
let get_req = get_request(
|
||||
&u.id,
|
||||
api::GetFuotaDeploymentRequest {
|
||||
id: create_resp.id.clone(),
|
||||
},
|
||||
);
|
||||
let get_resp = service.get_deployment(get_req).await.unwrap();
|
||||
let get_resp = get_resp.get_ref();
|
||||
assert_eq!(
|
||||
Some(api::FuotaDeployment {
|
||||
id: create_resp.id.clone(),
|
||||
application_id: app.id.to_string(),
|
||||
device_profile_id: dp.id.to_string(),
|
||||
name: "updated-test-fuota".into(),
|
||||
..Default::default()
|
||||
}),
|
||||
get_resp.deployment
|
||||
);
|
||||
|
||||
// list deployments
|
||||
let list_req = get_request(
|
||||
&u.id,
|
||||
api::ListFuotaDeploymentsRequest {
|
||||
application_id: app.id.to_string(),
|
||||
limit: 10,
|
||||
offset: 0,
|
||||
},
|
||||
);
|
||||
let list_resp = service.list_deployments(list_req).await.unwrap();
|
||||
let list_resp = list_resp.get_ref();
|
||||
assert_eq!(1, list_resp.total_count);
|
||||
assert_eq!(1, list_resp.result.len());
|
||||
assert_eq!(create_resp.id, list_resp.result[0].id);
|
||||
|
||||
// add device
|
||||
let add_dev_req = get_request(
|
||||
&u.id,
|
||||
api::AddDevicesToFuotaDeploymentRequest {
|
||||
fuota_deployment_id: create_resp.id.clone(),
|
||||
dev_euis: vec![dev.dev_eui.to_string()],
|
||||
},
|
||||
);
|
||||
service.add_devices(add_dev_req).await.unwrap();
|
||||
|
||||
// list devices
|
||||
let list_devs_req = get_request(
|
||||
&u.id,
|
||||
api::ListFuotaDeploymentDevicesRequest {
|
||||
fuota_deployment_id: create_resp.id.clone(),
|
||||
limit: 10,
|
||||
offset: 0,
|
||||
},
|
||||
);
|
||||
let list_devs_resp = service.list_devices(list_devs_req).await.unwrap();
|
||||
let list_devs_resp = list_devs_resp.get_ref();
|
||||
assert_eq!(1, list_devs_resp.total_count);
|
||||
assert_eq!(1, list_devs_resp.result.len());
|
||||
assert_eq!(dev.dev_eui.to_string(), list_devs_resp.result[0].dev_eui);
|
||||
|
||||
// remove devices
|
||||
let remove_devs_req = get_request(
|
||||
&u.id,
|
||||
api::RemoveDevicesFromFuotaDeploymentRequest {
|
||||
fuota_deployment_id: create_resp.id.clone(),
|
||||
dev_euis: vec![dev.dev_eui.to_string()],
|
||||
},
|
||||
);
|
||||
service.remove_devices(remove_devs_req).await.unwrap();
|
||||
let list_devs_req = get_request(
|
||||
&u.id,
|
||||
api::ListFuotaDeploymentDevicesRequest {
|
||||
fuota_deployment_id: create_resp.id.clone(),
|
||||
limit: 10,
|
||||
offset: 0,
|
||||
},
|
||||
);
|
||||
let list_devs_resp = service.list_devices(list_devs_req).await.unwrap();
|
||||
let list_devs_resp = list_devs_resp.get_ref();
|
||||
assert_eq!(0, list_devs_resp.total_count);
|
||||
assert_eq!(0, list_devs_resp.result.len());
|
||||
|
||||
// add gateway
|
||||
let add_gws_req = get_request(
|
||||
&u.id,
|
||||
api::AddGatewaysToFuotaDeploymentRequest {
|
||||
fuota_deployment_id: create_resp.id.clone(),
|
||||
gateway_ids: vec![gw.gateway_id.to_string()],
|
||||
},
|
||||
);
|
||||
service.add_gateways(add_gws_req).await.unwrap();
|
||||
|
||||
// list gateways
|
||||
let list_gws_req = get_request(
|
||||
&u.id,
|
||||
api::ListFuotaDeploymentGatewaysRequest {
|
||||
fuota_deployment_id: create_resp.id.clone(),
|
||||
limit: 10,
|
||||
offset: 0,
|
||||
},
|
||||
);
|
||||
let list_gws_resp = service.list_gateways(list_gws_req).await.unwrap();
|
||||
let list_gws_resp = list_gws_resp.get_ref();
|
||||
assert_eq!(1, list_gws_resp.total_count);
|
||||
assert_eq!(1, list_gws_resp.result.len());
|
||||
assert_eq!(
|
||||
gw.gateway_id.to_string(),
|
||||
list_gws_resp.result[0].gateway_id
|
||||
);
|
||||
|
||||
// remove gateways
|
||||
let remove_gws_req = get_request(
|
||||
&u.id,
|
||||
api::RemoveGatewaysFromFuotaDeploymentRequest {
|
||||
fuota_deployment_id: create_resp.id.clone(),
|
||||
gateway_ids: vec![gw.gateway_id.to_string()],
|
||||
},
|
||||
);
|
||||
service.remove_gateways(remove_gws_req).await.unwrap();
|
||||
let list_gws_req = get_request(
|
||||
&u.id,
|
||||
api::ListFuotaDeploymentGatewaysRequest {
|
||||
fuota_deployment_id: create_resp.id.clone(),
|
||||
limit: 10,
|
||||
offset: 0,
|
||||
},
|
||||
);
|
||||
let list_gws_resp = service.list_gateways(list_gws_req).await.unwrap();
|
||||
let list_gws_resp = list_gws_resp.get_ref();
|
||||
assert_eq!(0, list_gws_resp.total_count);
|
||||
assert_eq!(0, list_gws_resp.result.len());
|
||||
|
||||
// start deployment
|
||||
let start_req = get_request(
|
||||
&u.id,
|
||||
api::StartFuotaDeploymentRequest {
|
||||
id: create_resp.id.clone(),
|
||||
},
|
||||
);
|
||||
service.start_deployment(start_req).await.unwrap();
|
||||
let jobs = fuota::list_jobs(Uuid::from_str(&create_resp.id).unwrap())
|
||||
.await
|
||||
.unwrap();
|
||||
assert_eq!(1, jobs.len());
|
||||
assert_eq!(create_resp.id, jobs[0].fuota_deployment_id.to_string());
|
||||
assert_eq!(fields::FuotaJob::CreateMcGroup, jobs[0].job);
|
||||
|
||||
// delete deployment
|
||||
let delete_req = get_request(
|
||||
&u.id,
|
||||
api::DeleteFuotaDeploymentRequest {
|
||||
id: create_resp.id.clone(),
|
||||
},
|
||||
);
|
||||
service.delete_deployment(delete_req).await.unwrap();
|
||||
let delete_req = get_request(
|
||||
&u.id,
|
||||
api::DeleteFuotaDeploymentRequest {
|
||||
id: create_resp.id.clone(),
|
||||
},
|
||||
);
|
||||
assert!(service.delete_deployment(delete_req).await.is_err());
|
||||
}
|
||||
|
||||
fn get_request<T>(user_id: &Uuid, req: T) -> Request<T> {
|
||||
let mut req = Request::new(req);
|
||||
req.extensions_mut().insert(AuthID::User(*user_id));
|
||||
req
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user