mirror of
https://github.com/chirpstack/chirpstack.git
synced 2025-04-24 13:05:46 +00:00
Compare commits
114 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
330f5dcae0 | ||
|
92b2439377 | ||
|
6d084b3b21 | ||
|
75e9106bbb | ||
|
4ce4828a78 | ||
|
9ecf4fef1b | ||
|
8f9316af2c | ||
|
1f2a7d390a | ||
|
990bf57da5 | ||
|
b336690a65 | ||
|
7597bcaabf | ||
|
0ae1294a63 | ||
|
8e0a29ed55 | ||
|
5fd57de6ce | ||
|
d91fb77617 | ||
|
fa63c306fd | ||
|
7d1e85e575 | ||
|
e392f52444 | ||
|
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 |
4
.github/workflows/main.yml
vendored
4
.github/workflows/main.yml
vendored
@ -28,7 +28,7 @@ jobs:
|
|||||||
name: Install Nix
|
name: Install Nix
|
||||||
uses: cachix/install-nix-action@v27
|
uses: cachix/install-nix-action@v27
|
||||||
with:
|
with:
|
||||||
nix_path: nixpkgs=channel:nixos-24.05
|
nix_path: nixpkgs=channel:nixos-24.11
|
||||||
-
|
-
|
||||||
name: Cargo cache
|
name: Cargo cache
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
@ -69,7 +69,7 @@ jobs:
|
|||||||
name: Install Nix
|
name: Install Nix
|
||||||
uses: cachix/install-nix-action@v27
|
uses: cachix/install-nix-action@v27
|
||||||
with:
|
with:
|
||||||
nix_path: nixpkgs=channel:nixos-24.05
|
nix_path: nixpkgs=channel:nixos-24.11
|
||||||
-
|
-
|
||||||
name: Cargo cache
|
name: Cargo cache
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
|
2153
Cargo.lock
generated
2153
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
|||||||
# Copy binary stage
|
# Copy binary stage
|
||||||
FROM --platform=$BUILDPLATFORM alpine:3.18.0 as binary
|
FROM --platform=$BUILDPLATFORM alpine:3.21.0 as binary
|
||||||
|
|
||||||
ARG TARGETPLATFORM
|
ARG TARGETPLATFORM
|
||||||
|
|
||||||
@ -20,11 +20,11 @@ RUN case "$TARGETPLATFORM" in \
|
|||||||
esac;
|
esac;
|
||||||
|
|
||||||
# Final stage
|
# Final stage
|
||||||
FROM alpine:3.18.0
|
FROM alpine:3.21.0
|
||||||
|
|
||||||
RUN apk --no-cache add \
|
RUN apk --no-cache add \
|
||||||
ca-certificates
|
ca-certificates
|
||||||
|
|
||||||
COPY --from=binary /usr/bin/chirpstack /usr/bin/chirpstack
|
COPY --from=binary /usr/bin/chirpstack /usr/bin/chirpstack
|
||||||
USER nobody:nogroup
|
USER nobody:nogroup
|
||||||
ENTRYPOINT ["/usr/bin/chirpstack"]
|
ENTRYPOINT ["/usr/bin/chirpstack"]
|
||||||
|
9
Makefile
9
Makefile
@ -7,10 +7,7 @@ dist:
|
|||||||
|
|
||||||
# Install dev dependencies
|
# Install dev dependencies
|
||||||
dev-dependencies:
|
dev-dependencies:
|
||||||
cargo install cross --version 0.2.5
|
cargo install cargo-generate-rpm --version 0.12.1 --locked
|
||||||
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
|
|
||||||
|
|
||||||
# Set the versions
|
# Set the versions
|
||||||
version:
|
version:
|
||||||
@ -53,10 +50,6 @@ devshell:
|
|||||||
docker-devshell:
|
docker-devshell:
|
||||||
docker compose run --rm --service-ports --name chirpstack chirpstack
|
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
|
# Runs the tests
|
||||||
test:
|
test:
|
||||||
cd api && make rust
|
cd api && make rust
|
||||||
|
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.
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// - protoc-gen-go-grpc v1.3.0
|
// - protoc-gen-go-grpc v1.3.0
|
||||||
// - protoc v4.24.4
|
// - protoc v5.28.3
|
||||||
// source: api/application.proto
|
// source: api/application.proto
|
||||||
|
|
||||||
package api
|
package api
|
||||||
@ -67,6 +67,8 @@ const (
|
|||||||
ApplicationService_UpdateIftttIntegration_FullMethodName = "/api.ApplicationService/UpdateIftttIntegration"
|
ApplicationService_UpdateIftttIntegration_FullMethodName = "/api.ApplicationService/UpdateIftttIntegration"
|
||||||
ApplicationService_DeleteIftttIntegration_FullMethodName = "/api.ApplicationService/DeleteIftttIntegration"
|
ApplicationService_DeleteIftttIntegration_FullMethodName = "/api.ApplicationService/DeleteIftttIntegration"
|
||||||
ApplicationService_GenerateMqttIntegrationClientCertificate_FullMethodName = "/api.ApplicationService/GenerateMqttIntegrationClientCertificate"
|
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.
|
// 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)
|
DeleteIftttIntegration(ctx context.Context, in *DeleteIftttIntegrationRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
||||||
// Generates application ID specific client-certificate.
|
// Generates application ID specific client-certificate.
|
||||||
GenerateMqttIntegrationClientCertificate(ctx context.Context, in *GenerateMqttIntegrationClientCertificateRequest, opts ...grpc.CallOption) (*GenerateMqttIntegrationClientCertificateResponse, error)
|
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 {
|
type applicationServiceClient struct {
|
||||||
@ -600,6 +606,24 @@ func (c *applicationServiceClient) GenerateMqttIntegrationClientCertificate(ctx
|
|||||||
return out, nil
|
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.
|
// ApplicationServiceServer is the server API for ApplicationService service.
|
||||||
// All implementations must embed UnimplementedApplicationServiceServer
|
// All implementations must embed UnimplementedApplicationServiceServer
|
||||||
// for forward compatibility
|
// for forward compatibility
|
||||||
@ -698,6 +722,10 @@ type ApplicationServiceServer interface {
|
|||||||
DeleteIftttIntegration(context.Context, *DeleteIftttIntegrationRequest) (*emptypb.Empty, error)
|
DeleteIftttIntegration(context.Context, *DeleteIftttIntegrationRequest) (*emptypb.Empty, error)
|
||||||
// Generates application ID specific client-certificate.
|
// Generates application ID specific client-certificate.
|
||||||
GenerateMqttIntegrationClientCertificate(context.Context, *GenerateMqttIntegrationClientCertificateRequest) (*GenerateMqttIntegrationClientCertificateResponse, error)
|
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()
|
mustEmbedUnimplementedApplicationServiceServer()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -846,6 +874,12 @@ func (UnimplementedApplicationServiceServer) DeleteIftttIntegration(context.Cont
|
|||||||
func (UnimplementedApplicationServiceServer) GenerateMqttIntegrationClientCertificate(context.Context, *GenerateMqttIntegrationClientCertificateRequest) (*GenerateMqttIntegrationClientCertificateResponse, error) {
|
func (UnimplementedApplicationServiceServer) GenerateMqttIntegrationClientCertificate(context.Context, *GenerateMqttIntegrationClientCertificateRequest) (*GenerateMqttIntegrationClientCertificateResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method GenerateMqttIntegrationClientCertificate not implemented")
|
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() {}
|
func (UnimplementedApplicationServiceServer) mustEmbedUnimplementedApplicationServiceServer() {}
|
||||||
|
|
||||||
// UnsafeApplicationServiceServer may be embedded to opt out of forward compatibility for this service.
|
// 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)
|
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.
|
// ApplicationService_ServiceDesc is the grpc.ServiceDesc for ApplicationService service.
|
||||||
// It's only intended for direct use with grpc.RegisterService,
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
// and not to be introspected or modified (even as a copy)
|
// and not to be introspected or modified (even as a copy)
|
||||||
@ -1900,6 +1970,14 @@ var ApplicationService_ServiceDesc = grpc.ServiceDesc{
|
|||||||
MethodName: "GenerateMqttIntegrationClientCertificate",
|
MethodName: "GenerateMqttIntegrationClientCertificate",
|
||||||
Handler: _ApplicationService_GenerateMqttIntegrationClientCertificate_Handler,
|
Handler: _ApplicationService_GenerateMqttIntegrationClientCertificate_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "ListDeviceProfiles",
|
||||||
|
Handler: _ApplicationService_ListDeviceProfiles_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "ListDeviceTags",
|
||||||
|
Handler: _ApplicationService_ListDeviceTags_Handler,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc.StreamDesc{},
|
Streams: []grpc.StreamDesc{},
|
||||||
Metadata: "api/application.proto",
|
Metadata: "api/application.proto",
|
||||||
|
2040
api/go/api/device.pb.go
vendored
2040
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.
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// - protoc-gen-go-grpc v1.3.0
|
// - protoc-gen-go-grpc v1.3.0
|
||||||
// - protoc v4.24.4
|
// - protoc v5.28.3
|
||||||
// source: api/device.proto
|
// source: api/device.proto
|
||||||
|
|
||||||
package api
|
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.
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// - protoc-gen-go-grpc v1.3.0
|
// - protoc-gen-go-grpc v1.3.0
|
||||||
// - protoc v4.24.4
|
// - protoc v5.28.3
|
||||||
// source: api/device_profile.proto
|
// source: api/device_profile.proto
|
||||||
|
|
||||||
package api
|
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.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.34.1
|
// protoc-gen-go v1.35.1
|
||||||
// protoc v4.24.4
|
// protoc v5.28.3
|
||||||
// source: api/device_profile_template.proto
|
// source: api/device_profile_template.proto
|
||||||
|
|
||||||
package api
|
package api
|
||||||
@ -105,11 +105,9 @@ type DeviceProfileTemplate struct {
|
|||||||
|
|
||||||
func (x *DeviceProfileTemplate) Reset() {
|
func (x *DeviceProfileTemplate) Reset() {
|
||||||
*x = DeviceProfileTemplate{}
|
*x = DeviceProfileTemplate{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_device_profile_template_proto_msgTypes[0]
|
||||||
mi := &file_api_device_profile_template_proto_msgTypes[0]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DeviceProfileTemplate) String() string {
|
func (x *DeviceProfileTemplate) String() string {
|
||||||
@ -120,7 +118,7 @@ func (*DeviceProfileTemplate) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *DeviceProfileTemplate) ProtoReflect() protoreflect.Message {
|
func (x *DeviceProfileTemplate) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_device_profile_template_proto_msgTypes[0]
|
mi := &file_api_device_profile_template_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -371,11 +369,9 @@ type DeviceProfileTemplateListItem struct {
|
|||||||
|
|
||||||
func (x *DeviceProfileTemplateListItem) Reset() {
|
func (x *DeviceProfileTemplateListItem) Reset() {
|
||||||
*x = DeviceProfileTemplateListItem{}
|
*x = DeviceProfileTemplateListItem{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_device_profile_template_proto_msgTypes[1]
|
||||||
mi := &file_api_device_profile_template_proto_msgTypes[1]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DeviceProfileTemplateListItem) String() string {
|
func (x *DeviceProfileTemplateListItem) String() string {
|
||||||
@ -386,7 +382,7 @@ func (*DeviceProfileTemplateListItem) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *DeviceProfileTemplateListItem) ProtoReflect() protoreflect.Message {
|
func (x *DeviceProfileTemplateListItem) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_device_profile_template_proto_msgTypes[1]
|
mi := &file_api_device_profile_template_proto_msgTypes[1]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -496,11 +492,9 @@ type CreateDeviceProfileTemplateRequest struct {
|
|||||||
|
|
||||||
func (x *CreateDeviceProfileTemplateRequest) Reset() {
|
func (x *CreateDeviceProfileTemplateRequest) Reset() {
|
||||||
*x = CreateDeviceProfileTemplateRequest{}
|
*x = CreateDeviceProfileTemplateRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_device_profile_template_proto_msgTypes[2]
|
||||||
mi := &file_api_device_profile_template_proto_msgTypes[2]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *CreateDeviceProfileTemplateRequest) String() string {
|
func (x *CreateDeviceProfileTemplateRequest) String() string {
|
||||||
@ -511,7 +505,7 @@ func (*CreateDeviceProfileTemplateRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *CreateDeviceProfileTemplateRequest) ProtoReflect() protoreflect.Message {
|
func (x *CreateDeviceProfileTemplateRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_device_profile_template_proto_msgTypes[2]
|
mi := &file_api_device_profile_template_proto_msgTypes[2]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -544,11 +538,9 @@ type GetDeviceProfileTemplateRequest struct {
|
|||||||
|
|
||||||
func (x *GetDeviceProfileTemplateRequest) Reset() {
|
func (x *GetDeviceProfileTemplateRequest) Reset() {
|
||||||
*x = GetDeviceProfileTemplateRequest{}
|
*x = GetDeviceProfileTemplateRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_device_profile_template_proto_msgTypes[3]
|
||||||
mi := &file_api_device_profile_template_proto_msgTypes[3]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GetDeviceProfileTemplateRequest) String() string {
|
func (x *GetDeviceProfileTemplateRequest) String() string {
|
||||||
@ -559,7 +551,7 @@ func (*GetDeviceProfileTemplateRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *GetDeviceProfileTemplateRequest) ProtoReflect() protoreflect.Message {
|
func (x *GetDeviceProfileTemplateRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_device_profile_template_proto_msgTypes[3]
|
mi := &file_api_device_profile_template_proto_msgTypes[3]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -596,11 +588,9 @@ type GetDeviceProfileTemplateResponse struct {
|
|||||||
|
|
||||||
func (x *GetDeviceProfileTemplateResponse) Reset() {
|
func (x *GetDeviceProfileTemplateResponse) Reset() {
|
||||||
*x = GetDeviceProfileTemplateResponse{}
|
*x = GetDeviceProfileTemplateResponse{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_device_profile_template_proto_msgTypes[4]
|
||||||
mi := &file_api_device_profile_template_proto_msgTypes[4]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GetDeviceProfileTemplateResponse) String() string {
|
func (x *GetDeviceProfileTemplateResponse) String() string {
|
||||||
@ -611,7 +601,7 @@ func (*GetDeviceProfileTemplateResponse) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *GetDeviceProfileTemplateResponse) ProtoReflect() protoreflect.Message {
|
func (x *GetDeviceProfileTemplateResponse) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_device_profile_template_proto_msgTypes[4]
|
mi := &file_api_device_profile_template_proto_msgTypes[4]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -658,11 +648,9 @@ type UpdateDeviceProfileTemplateRequest struct {
|
|||||||
|
|
||||||
func (x *UpdateDeviceProfileTemplateRequest) Reset() {
|
func (x *UpdateDeviceProfileTemplateRequest) Reset() {
|
||||||
*x = UpdateDeviceProfileTemplateRequest{}
|
*x = UpdateDeviceProfileTemplateRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_device_profile_template_proto_msgTypes[5]
|
||||||
mi := &file_api_device_profile_template_proto_msgTypes[5]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UpdateDeviceProfileTemplateRequest) String() string {
|
func (x *UpdateDeviceProfileTemplateRequest) String() string {
|
||||||
@ -673,7 +661,7 @@ func (*UpdateDeviceProfileTemplateRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *UpdateDeviceProfileTemplateRequest) ProtoReflect() protoreflect.Message {
|
func (x *UpdateDeviceProfileTemplateRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_device_profile_template_proto_msgTypes[5]
|
mi := &file_api_device_profile_template_proto_msgTypes[5]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -706,11 +694,9 @@ type DeleteDeviceProfileTemplateRequest struct {
|
|||||||
|
|
||||||
func (x *DeleteDeviceProfileTemplateRequest) Reset() {
|
func (x *DeleteDeviceProfileTemplateRequest) Reset() {
|
||||||
*x = DeleteDeviceProfileTemplateRequest{}
|
*x = DeleteDeviceProfileTemplateRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_device_profile_template_proto_msgTypes[6]
|
||||||
mi := &file_api_device_profile_template_proto_msgTypes[6]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DeleteDeviceProfileTemplateRequest) String() string {
|
func (x *DeleteDeviceProfileTemplateRequest) String() string {
|
||||||
@ -721,7 +707,7 @@ func (*DeleteDeviceProfileTemplateRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *DeleteDeviceProfileTemplateRequest) ProtoReflect() protoreflect.Message {
|
func (x *DeleteDeviceProfileTemplateRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_device_profile_template_proto_msgTypes[6]
|
mi := &file_api_device_profile_template_proto_msgTypes[6]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -749,6 +735,7 @@ type ListDeviceProfileTemplatesRequest struct {
|
|||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
// Max number of device-profile templates to return in the result-set.
|
// 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"`
|
Limit uint32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"`
|
||||||
// Offset in the result-set (for pagination).
|
// Offset in the result-set (for pagination).
|
||||||
Offset uint32 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
|
Offset uint32 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
|
||||||
@ -756,11 +743,9 @@ type ListDeviceProfileTemplatesRequest struct {
|
|||||||
|
|
||||||
func (x *ListDeviceProfileTemplatesRequest) Reset() {
|
func (x *ListDeviceProfileTemplatesRequest) Reset() {
|
||||||
*x = ListDeviceProfileTemplatesRequest{}
|
*x = ListDeviceProfileTemplatesRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_device_profile_template_proto_msgTypes[7]
|
||||||
mi := &file_api_device_profile_template_proto_msgTypes[7]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ListDeviceProfileTemplatesRequest) String() string {
|
func (x *ListDeviceProfileTemplatesRequest) String() string {
|
||||||
@ -771,7 +756,7 @@ func (*ListDeviceProfileTemplatesRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *ListDeviceProfileTemplatesRequest) ProtoReflect() protoreflect.Message {
|
func (x *ListDeviceProfileTemplatesRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_device_profile_template_proto_msgTypes[7]
|
mi := &file_api_device_profile_template_proto_msgTypes[7]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -813,11 +798,9 @@ type ListDeviceProfileTemplatesResponse struct {
|
|||||||
|
|
||||||
func (x *ListDeviceProfileTemplatesResponse) Reset() {
|
func (x *ListDeviceProfileTemplatesResponse) Reset() {
|
||||||
*x = ListDeviceProfileTemplatesResponse{}
|
*x = ListDeviceProfileTemplatesResponse{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_device_profile_template_proto_msgTypes[8]
|
||||||
mi := &file_api_device_profile_template_proto_msgTypes[8]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ListDeviceProfileTemplatesResponse) String() string {
|
func (x *ListDeviceProfileTemplatesResponse) String() string {
|
||||||
@ -828,7 +811,7 @@ func (*ListDeviceProfileTemplatesResponse) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *ListDeviceProfileTemplatesResponse) ProtoReflect() protoreflect.Message {
|
func (x *ListDeviceProfileTemplatesResponse) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_device_profile_template_proto_msgTypes[8]
|
mi := &file_api_device_profile_template_proto_msgTypes[8]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
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_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
|
(*DeviceProfileTemplate)(nil), // 0: api.DeviceProfileTemplate
|
||||||
(*DeviceProfileTemplateListItem)(nil), // 1: api.DeviceProfileTemplateListItem
|
(*DeviceProfileTemplateListItem)(nil), // 1: api.DeviceProfileTemplateListItem
|
||||||
(*CreateDeviceProfileTemplateRequest)(nil), // 2: api.CreateDeviceProfileTemplateRequest
|
(*CreateDeviceProfileTemplateRequest)(nil), // 2: api.CreateDeviceProfileTemplateRequest
|
||||||
@ -1176,116 +1159,6 @@ func file_api_device_profile_template_proto_init() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
file_api_device_profile_proto_init()
|
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{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// - protoc-gen-go-grpc v1.3.0
|
// - protoc-gen-go-grpc v1.3.0
|
||||||
// - protoc v4.24.4
|
// - protoc v5.28.3
|
||||||
// source: api/device_profile_template.proto
|
// source: api/device_profile_template.proto
|
||||||
|
|
||||||
package api
|
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.
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// - protoc-gen-go-grpc v1.3.0
|
// - protoc-gen-go-grpc v1.3.0
|
||||||
// - protoc v4.24.4
|
// - protoc v5.28.3
|
||||||
// source: api/gateway.proto
|
// source: api/gateway.proto
|
||||||
|
|
||||||
package api
|
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.
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// - protoc-gen-go-grpc v1.3.0
|
// - protoc-gen-go-grpc v1.3.0
|
||||||
// - protoc v4.24.4
|
// - protoc v5.28.3
|
||||||
// source: api/internal.proto
|
// source: api/internal.proto
|
||||||
|
|
||||||
package api
|
package api
|
||||||
|
449
api/go/api/multicast_group.pb.go
vendored
449
api/go/api/multicast_group.pb.go
vendored
@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.34.1
|
// protoc-gen-go v1.35.1
|
||||||
// protoc v4.24.4
|
// protoc v5.28.3
|
||||||
// source: api/multicast_group.proto
|
// source: api/multicast_group.proto
|
||||||
|
|
||||||
package api
|
package api
|
||||||
@ -168,11 +168,9 @@ type MulticastGroup struct {
|
|||||||
|
|
||||||
func (x *MulticastGroup) Reset() {
|
func (x *MulticastGroup) Reset() {
|
||||||
*x = MulticastGroup{}
|
*x = MulticastGroup{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_multicast_group_proto_msgTypes[0]
|
||||||
mi := &file_api_multicast_group_proto_msgTypes[0]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *MulticastGroup) String() string {
|
func (x *MulticastGroup) String() string {
|
||||||
@ -183,7 +181,7 @@ func (*MulticastGroup) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *MulticastGroup) ProtoReflect() protoreflect.Message {
|
func (x *MulticastGroup) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_multicast_group_proto_msgTypes[0]
|
mi := &file_api_multicast_group_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -317,11 +315,9 @@ type MulticastGroupListItem struct {
|
|||||||
|
|
||||||
func (x *MulticastGroupListItem) Reset() {
|
func (x *MulticastGroupListItem) Reset() {
|
||||||
*x = MulticastGroupListItem{}
|
*x = MulticastGroupListItem{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_multicast_group_proto_msgTypes[1]
|
||||||
mi := &file_api_multicast_group_proto_msgTypes[1]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *MulticastGroupListItem) String() string {
|
func (x *MulticastGroupListItem) String() string {
|
||||||
@ -332,7 +328,7 @@ func (*MulticastGroupListItem) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *MulticastGroupListItem) ProtoReflect() protoreflect.Message {
|
func (x *MulticastGroupListItem) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_multicast_group_proto_msgTypes[1]
|
mi := &file_api_multicast_group_proto_msgTypes[1]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -400,11 +396,9 @@ type CreateMulticastGroupRequest struct {
|
|||||||
|
|
||||||
func (x *CreateMulticastGroupRequest) Reset() {
|
func (x *CreateMulticastGroupRequest) Reset() {
|
||||||
*x = CreateMulticastGroupRequest{}
|
*x = CreateMulticastGroupRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_multicast_group_proto_msgTypes[2]
|
||||||
mi := &file_api_multicast_group_proto_msgTypes[2]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *CreateMulticastGroupRequest) String() string {
|
func (x *CreateMulticastGroupRequest) String() string {
|
||||||
@ -415,7 +409,7 @@ func (*CreateMulticastGroupRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *CreateMulticastGroupRequest) ProtoReflect() protoreflect.Message {
|
func (x *CreateMulticastGroupRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_multicast_group_proto_msgTypes[2]
|
mi := &file_api_multicast_group_proto_msgTypes[2]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -448,11 +442,9 @@ type CreateMulticastGroupResponse struct {
|
|||||||
|
|
||||||
func (x *CreateMulticastGroupResponse) Reset() {
|
func (x *CreateMulticastGroupResponse) Reset() {
|
||||||
*x = CreateMulticastGroupResponse{}
|
*x = CreateMulticastGroupResponse{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_multicast_group_proto_msgTypes[3]
|
||||||
mi := &file_api_multicast_group_proto_msgTypes[3]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *CreateMulticastGroupResponse) String() string {
|
func (x *CreateMulticastGroupResponse) String() string {
|
||||||
@ -463,7 +455,7 @@ func (*CreateMulticastGroupResponse) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *CreateMulticastGroupResponse) ProtoReflect() protoreflect.Message {
|
func (x *CreateMulticastGroupResponse) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_multicast_group_proto_msgTypes[3]
|
mi := &file_api_multicast_group_proto_msgTypes[3]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -496,11 +488,9 @@ type GetMulticastGroupRequest struct {
|
|||||||
|
|
||||||
func (x *GetMulticastGroupRequest) Reset() {
|
func (x *GetMulticastGroupRequest) Reset() {
|
||||||
*x = GetMulticastGroupRequest{}
|
*x = GetMulticastGroupRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_multicast_group_proto_msgTypes[4]
|
||||||
mi := &file_api_multicast_group_proto_msgTypes[4]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GetMulticastGroupRequest) String() string {
|
func (x *GetMulticastGroupRequest) String() string {
|
||||||
@ -511,7 +501,7 @@ func (*GetMulticastGroupRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *GetMulticastGroupRequest) ProtoReflect() protoreflect.Message {
|
func (x *GetMulticastGroupRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_multicast_group_proto_msgTypes[4]
|
mi := &file_api_multicast_group_proto_msgTypes[4]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -548,11 +538,9 @@ type GetMulticastGroupResponse struct {
|
|||||||
|
|
||||||
func (x *GetMulticastGroupResponse) Reset() {
|
func (x *GetMulticastGroupResponse) Reset() {
|
||||||
*x = GetMulticastGroupResponse{}
|
*x = GetMulticastGroupResponse{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_multicast_group_proto_msgTypes[5]
|
||||||
mi := &file_api_multicast_group_proto_msgTypes[5]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GetMulticastGroupResponse) String() string {
|
func (x *GetMulticastGroupResponse) String() string {
|
||||||
@ -563,7 +551,7 @@ func (*GetMulticastGroupResponse) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *GetMulticastGroupResponse) ProtoReflect() protoreflect.Message {
|
func (x *GetMulticastGroupResponse) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_multicast_group_proto_msgTypes[5]
|
mi := &file_api_multicast_group_proto_msgTypes[5]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -610,11 +598,9 @@ type UpdateMulticastGroupRequest struct {
|
|||||||
|
|
||||||
func (x *UpdateMulticastGroupRequest) Reset() {
|
func (x *UpdateMulticastGroupRequest) Reset() {
|
||||||
*x = UpdateMulticastGroupRequest{}
|
*x = UpdateMulticastGroupRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_multicast_group_proto_msgTypes[6]
|
||||||
mi := &file_api_multicast_group_proto_msgTypes[6]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UpdateMulticastGroupRequest) String() string {
|
func (x *UpdateMulticastGroupRequest) String() string {
|
||||||
@ -625,7 +611,7 @@ func (*UpdateMulticastGroupRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *UpdateMulticastGroupRequest) ProtoReflect() protoreflect.Message {
|
func (x *UpdateMulticastGroupRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_multicast_group_proto_msgTypes[6]
|
mi := &file_api_multicast_group_proto_msgTypes[6]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -658,11 +644,9 @@ type DeleteMulticastGroupRequest struct {
|
|||||||
|
|
||||||
func (x *DeleteMulticastGroupRequest) Reset() {
|
func (x *DeleteMulticastGroupRequest) Reset() {
|
||||||
*x = DeleteMulticastGroupRequest{}
|
*x = DeleteMulticastGroupRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_multicast_group_proto_msgTypes[7]
|
||||||
mi := &file_api_multicast_group_proto_msgTypes[7]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DeleteMulticastGroupRequest) String() string {
|
func (x *DeleteMulticastGroupRequest) String() string {
|
||||||
@ -673,7 +657,7 @@ func (*DeleteMulticastGroupRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *DeleteMulticastGroupRequest) ProtoReflect() protoreflect.Message {
|
func (x *DeleteMulticastGroupRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_multicast_group_proto_msgTypes[7]
|
mi := &file_api_multicast_group_proto_msgTypes[7]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -701,6 +685,7 @@ type ListMulticastGroupsRequest struct {
|
|||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
// Max number of multicast groups to return in the result-set.
|
// 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"`
|
Limit uint32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"`
|
||||||
// Offset in the result-set (for pagination).
|
// Offset in the result-set (for pagination).
|
||||||
Offset uint32 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
|
Offset uint32 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
|
||||||
@ -712,11 +697,9 @@ type ListMulticastGroupsRequest struct {
|
|||||||
|
|
||||||
func (x *ListMulticastGroupsRequest) Reset() {
|
func (x *ListMulticastGroupsRequest) Reset() {
|
||||||
*x = ListMulticastGroupsRequest{}
|
*x = ListMulticastGroupsRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_multicast_group_proto_msgTypes[8]
|
||||||
mi := &file_api_multicast_group_proto_msgTypes[8]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ListMulticastGroupsRequest) String() string {
|
func (x *ListMulticastGroupsRequest) String() string {
|
||||||
@ -727,7 +710,7 @@ func (*ListMulticastGroupsRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *ListMulticastGroupsRequest) ProtoReflect() protoreflect.Message {
|
func (x *ListMulticastGroupsRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_multicast_group_proto_msgTypes[8]
|
mi := &file_api_multicast_group_proto_msgTypes[8]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -783,11 +766,9 @@ type ListMulticastGroupsResponse struct {
|
|||||||
|
|
||||||
func (x *ListMulticastGroupsResponse) Reset() {
|
func (x *ListMulticastGroupsResponse) Reset() {
|
||||||
*x = ListMulticastGroupsResponse{}
|
*x = ListMulticastGroupsResponse{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_multicast_group_proto_msgTypes[9]
|
||||||
mi := &file_api_multicast_group_proto_msgTypes[9]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ListMulticastGroupsResponse) String() string {
|
func (x *ListMulticastGroupsResponse) String() string {
|
||||||
@ -798,7 +779,7 @@ func (*ListMulticastGroupsResponse) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *ListMulticastGroupsResponse) ProtoReflect() protoreflect.Message {
|
func (x *ListMulticastGroupsResponse) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_multicast_group_proto_msgTypes[9]
|
mi := &file_api_multicast_group_proto_msgTypes[9]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -840,11 +821,9 @@ type AddDeviceToMulticastGroupRequest struct {
|
|||||||
|
|
||||||
func (x *AddDeviceToMulticastGroupRequest) Reset() {
|
func (x *AddDeviceToMulticastGroupRequest) Reset() {
|
||||||
*x = AddDeviceToMulticastGroupRequest{}
|
*x = AddDeviceToMulticastGroupRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_multicast_group_proto_msgTypes[10]
|
||||||
mi := &file_api_multicast_group_proto_msgTypes[10]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *AddDeviceToMulticastGroupRequest) String() string {
|
func (x *AddDeviceToMulticastGroupRequest) String() string {
|
||||||
@ -855,7 +834,7 @@ func (*AddDeviceToMulticastGroupRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *AddDeviceToMulticastGroupRequest) ProtoReflect() protoreflect.Message {
|
func (x *AddDeviceToMulticastGroupRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_multicast_group_proto_msgTypes[10]
|
mi := &file_api_multicast_group_proto_msgTypes[10]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -897,11 +876,9 @@ type RemoveDeviceFromMulticastGroupRequest struct {
|
|||||||
|
|
||||||
func (x *RemoveDeviceFromMulticastGroupRequest) Reset() {
|
func (x *RemoveDeviceFromMulticastGroupRequest) Reset() {
|
||||||
*x = RemoveDeviceFromMulticastGroupRequest{}
|
*x = RemoveDeviceFromMulticastGroupRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_multicast_group_proto_msgTypes[11]
|
||||||
mi := &file_api_multicast_group_proto_msgTypes[11]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *RemoveDeviceFromMulticastGroupRequest) String() string {
|
func (x *RemoveDeviceFromMulticastGroupRequest) String() string {
|
||||||
@ -912,7 +889,7 @@ func (*RemoveDeviceFromMulticastGroupRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *RemoveDeviceFromMulticastGroupRequest) ProtoReflect() protoreflect.Message {
|
func (x *RemoveDeviceFromMulticastGroupRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_multicast_group_proto_msgTypes[11]
|
mi := &file_api_multicast_group_proto_msgTypes[11]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -954,11 +931,9 @@ type AddGatewayToMulticastGroupRequest struct {
|
|||||||
|
|
||||||
func (x *AddGatewayToMulticastGroupRequest) Reset() {
|
func (x *AddGatewayToMulticastGroupRequest) Reset() {
|
||||||
*x = AddGatewayToMulticastGroupRequest{}
|
*x = AddGatewayToMulticastGroupRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_multicast_group_proto_msgTypes[12]
|
||||||
mi := &file_api_multicast_group_proto_msgTypes[12]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *AddGatewayToMulticastGroupRequest) String() string {
|
func (x *AddGatewayToMulticastGroupRequest) String() string {
|
||||||
@ -969,7 +944,7 @@ func (*AddGatewayToMulticastGroupRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *AddGatewayToMulticastGroupRequest) ProtoReflect() protoreflect.Message {
|
func (x *AddGatewayToMulticastGroupRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_multicast_group_proto_msgTypes[12]
|
mi := &file_api_multicast_group_proto_msgTypes[12]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -1011,11 +986,9 @@ type RemoveGatewayFromMulticastGroupRequest struct {
|
|||||||
|
|
||||||
func (x *RemoveGatewayFromMulticastGroupRequest) Reset() {
|
func (x *RemoveGatewayFromMulticastGroupRequest) Reset() {
|
||||||
*x = RemoveGatewayFromMulticastGroupRequest{}
|
*x = RemoveGatewayFromMulticastGroupRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_multicast_group_proto_msgTypes[13]
|
||||||
mi := &file_api_multicast_group_proto_msgTypes[13]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *RemoveGatewayFromMulticastGroupRequest) String() string {
|
func (x *RemoveGatewayFromMulticastGroupRequest) String() string {
|
||||||
@ -1026,7 +999,7 @@ func (*RemoveGatewayFromMulticastGroupRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *RemoveGatewayFromMulticastGroupRequest) ProtoReflect() protoreflect.Message {
|
func (x *RemoveGatewayFromMulticastGroupRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_multicast_group_proto_msgTypes[13]
|
mi := &file_api_multicast_group_proto_msgTypes[13]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -1076,11 +1049,9 @@ type MulticastGroupQueueItem struct {
|
|||||||
|
|
||||||
func (x *MulticastGroupQueueItem) Reset() {
|
func (x *MulticastGroupQueueItem) Reset() {
|
||||||
*x = MulticastGroupQueueItem{}
|
*x = MulticastGroupQueueItem{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_multicast_group_proto_msgTypes[14]
|
||||||
mi := &file_api_multicast_group_proto_msgTypes[14]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *MulticastGroupQueueItem) String() string {
|
func (x *MulticastGroupQueueItem) String() string {
|
||||||
@ -1091,7 +1062,7 @@ func (*MulticastGroupQueueItem) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *MulticastGroupQueueItem) ProtoReflect() protoreflect.Message {
|
func (x *MulticastGroupQueueItem) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_multicast_group_proto_msgTypes[14]
|
mi := &file_api_multicast_group_proto_msgTypes[14]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -1152,11 +1123,9 @@ type EnqueueMulticastGroupQueueItemRequest struct {
|
|||||||
|
|
||||||
func (x *EnqueueMulticastGroupQueueItemRequest) Reset() {
|
func (x *EnqueueMulticastGroupQueueItemRequest) Reset() {
|
||||||
*x = EnqueueMulticastGroupQueueItemRequest{}
|
*x = EnqueueMulticastGroupQueueItemRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_multicast_group_proto_msgTypes[15]
|
||||||
mi := &file_api_multicast_group_proto_msgTypes[15]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *EnqueueMulticastGroupQueueItemRequest) String() string {
|
func (x *EnqueueMulticastGroupQueueItemRequest) String() string {
|
||||||
@ -1167,7 +1136,7 @@ func (*EnqueueMulticastGroupQueueItemRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *EnqueueMulticastGroupQueueItemRequest) ProtoReflect() protoreflect.Message {
|
func (x *EnqueueMulticastGroupQueueItemRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_multicast_group_proto_msgTypes[15]
|
mi := &file_api_multicast_group_proto_msgTypes[15]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -1200,11 +1169,9 @@ type EnqueueMulticastGroupQueueItemResponse struct {
|
|||||||
|
|
||||||
func (x *EnqueueMulticastGroupQueueItemResponse) Reset() {
|
func (x *EnqueueMulticastGroupQueueItemResponse) Reset() {
|
||||||
*x = EnqueueMulticastGroupQueueItemResponse{}
|
*x = EnqueueMulticastGroupQueueItemResponse{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_multicast_group_proto_msgTypes[16]
|
||||||
mi := &file_api_multicast_group_proto_msgTypes[16]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *EnqueueMulticastGroupQueueItemResponse) String() string {
|
func (x *EnqueueMulticastGroupQueueItemResponse) String() string {
|
||||||
@ -1215,7 +1182,7 @@ func (*EnqueueMulticastGroupQueueItemResponse) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *EnqueueMulticastGroupQueueItemResponse) ProtoReflect() protoreflect.Message {
|
func (x *EnqueueMulticastGroupQueueItemResponse) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_multicast_group_proto_msgTypes[16]
|
mi := &file_api_multicast_group_proto_msgTypes[16]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -1248,11 +1215,9 @@ type FlushMulticastGroupQueueRequest struct {
|
|||||||
|
|
||||||
func (x *FlushMulticastGroupQueueRequest) Reset() {
|
func (x *FlushMulticastGroupQueueRequest) Reset() {
|
||||||
*x = FlushMulticastGroupQueueRequest{}
|
*x = FlushMulticastGroupQueueRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_multicast_group_proto_msgTypes[17]
|
||||||
mi := &file_api_multicast_group_proto_msgTypes[17]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *FlushMulticastGroupQueueRequest) String() string {
|
func (x *FlushMulticastGroupQueueRequest) String() string {
|
||||||
@ -1263,7 +1228,7 @@ func (*FlushMulticastGroupQueueRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *FlushMulticastGroupQueueRequest) ProtoReflect() protoreflect.Message {
|
func (x *FlushMulticastGroupQueueRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_multicast_group_proto_msgTypes[17]
|
mi := &file_api_multicast_group_proto_msgTypes[17]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -1296,11 +1261,9 @@ type ListMulticastGroupQueueRequest struct {
|
|||||||
|
|
||||||
func (x *ListMulticastGroupQueueRequest) Reset() {
|
func (x *ListMulticastGroupQueueRequest) Reset() {
|
||||||
*x = ListMulticastGroupQueueRequest{}
|
*x = ListMulticastGroupQueueRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_multicast_group_proto_msgTypes[18]
|
||||||
mi := &file_api_multicast_group_proto_msgTypes[18]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ListMulticastGroupQueueRequest) String() string {
|
func (x *ListMulticastGroupQueueRequest) String() string {
|
||||||
@ -1311,7 +1274,7 @@ func (*ListMulticastGroupQueueRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *ListMulticastGroupQueueRequest) ProtoReflect() protoreflect.Message {
|
func (x *ListMulticastGroupQueueRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_multicast_group_proto_msgTypes[18]
|
mi := &file_api_multicast_group_proto_msgTypes[18]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -1343,11 +1306,9 @@ type ListMulticastGroupQueueResponse struct {
|
|||||||
|
|
||||||
func (x *ListMulticastGroupQueueResponse) Reset() {
|
func (x *ListMulticastGroupQueueResponse) Reset() {
|
||||||
*x = ListMulticastGroupQueueResponse{}
|
*x = ListMulticastGroupQueueResponse{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_multicast_group_proto_msgTypes[19]
|
||||||
mi := &file_api_multicast_group_proto_msgTypes[19]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ListMulticastGroupQueueResponse) String() string {
|
func (x *ListMulticastGroupQueueResponse) String() string {
|
||||||
@ -1358,7 +1319,7 @@ func (*ListMulticastGroupQueueResponse) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *ListMulticastGroupQueueResponse) ProtoReflect() protoreflect.Message {
|
func (x *ListMulticastGroupQueueResponse) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_multicast_group_proto_msgTypes[19]
|
mi := &file_api_multicast_group_proto_msgTypes[19]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -1695,7 +1656,7 @@ func file_api_multicast_group_proto_rawDescGZIP() []byte {
|
|||||||
|
|
||||||
var file_api_multicast_group_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
var file_api_multicast_group_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
|
||||||
var file_api_multicast_group_proto_msgTypes = make([]protoimpl.MessageInfo, 20)
|
var file_api_multicast_group_proto_msgTypes = make([]protoimpl.MessageInfo, 20)
|
||||||
var file_api_multicast_group_proto_goTypes = []interface{}{
|
var file_api_multicast_group_proto_goTypes = []any{
|
||||||
(MulticastGroupType)(0), // 0: api.MulticastGroupType
|
(MulticastGroupType)(0), // 0: api.MulticastGroupType
|
||||||
(MulticastGroupSchedulingType)(0), // 1: api.MulticastGroupSchedulingType
|
(MulticastGroupSchedulingType)(0), // 1: api.MulticastGroupSchedulingType
|
||||||
(*MulticastGroup)(nil), // 2: api.MulticastGroup
|
(*MulticastGroup)(nil), // 2: api.MulticastGroup
|
||||||
@ -1775,248 +1736,6 @@ func file_api_multicast_group_proto_init() {
|
|||||||
if File_api_multicast_group_proto != nil {
|
if File_api_multicast_group_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if !protoimpl.UnsafeEnabled {
|
|
||||||
file_api_multicast_group_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
|
||||||
switch v := v.(*MulticastGroup); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_api_multicast_group_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
|
||||||
switch v := v.(*MulticastGroupListItem); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_api_multicast_group_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
|
|
||||||
switch v := v.(*CreateMulticastGroupRequest); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_api_multicast_group_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
|
|
||||||
switch v := v.(*CreateMulticastGroupResponse); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_api_multicast_group_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
|
|
||||||
switch v := v.(*GetMulticastGroupRequest); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_api_multicast_group_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
|
|
||||||
switch v := v.(*GetMulticastGroupResponse); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_api_multicast_group_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
|
|
||||||
switch v := v.(*UpdateMulticastGroupRequest); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_api_multicast_group_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
|
|
||||||
switch v := v.(*DeleteMulticastGroupRequest); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_api_multicast_group_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
|
|
||||||
switch v := v.(*ListMulticastGroupsRequest); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_api_multicast_group_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
|
|
||||||
switch v := v.(*ListMulticastGroupsResponse); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_api_multicast_group_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
|
|
||||||
switch v := v.(*AddDeviceToMulticastGroupRequest); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_api_multicast_group_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
|
|
||||||
switch v := v.(*RemoveDeviceFromMulticastGroupRequest); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_api_multicast_group_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
|
|
||||||
switch v := v.(*AddGatewayToMulticastGroupRequest); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_api_multicast_group_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
|
|
||||||
switch v := v.(*RemoveGatewayFromMulticastGroupRequest); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_api_multicast_group_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
|
|
||||||
switch v := v.(*MulticastGroupQueueItem); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_api_multicast_group_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
|
|
||||||
switch v := v.(*EnqueueMulticastGroupQueueItemRequest); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_api_multicast_group_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
|
|
||||||
switch v := v.(*EnqueueMulticastGroupQueueItemResponse); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_api_multicast_group_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
|
|
||||||
switch v := v.(*FlushMulticastGroupQueueRequest); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_api_multicast_group_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
|
|
||||||
switch v := v.(*ListMulticastGroupQueueRequest); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
file_api_multicast_group_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
|
|
||||||
switch v := v.(*ListMulticastGroupQueueResponse); i {
|
|
||||||
case 0:
|
|
||||||
return &v.state
|
|
||||||
case 1:
|
|
||||||
return &v.sizeCache
|
|
||||||
case 2:
|
|
||||||
return &v.unknownFields
|
|
||||||
default:
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
|
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.
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// - protoc-gen-go-grpc v1.3.0
|
// - protoc-gen-go-grpc v1.3.0
|
||||||
// - protoc v4.24.4
|
// - protoc v5.28.3
|
||||||
// source: api/multicast_group.proto
|
// source: api/multicast_group.proto
|
||||||
|
|
||||||
package api
|
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.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.34.1
|
// protoc-gen-go v1.35.1
|
||||||
// protoc v4.24.4
|
// protoc v5.28.3
|
||||||
// source: api/relay.proto
|
// source: api/relay.proto
|
||||||
|
|
||||||
package api
|
package api
|
||||||
@ -36,11 +36,9 @@ type RelayListItem struct {
|
|||||||
|
|
||||||
func (x *RelayListItem) Reset() {
|
func (x *RelayListItem) Reset() {
|
||||||
*x = RelayListItem{}
|
*x = RelayListItem{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_relay_proto_msgTypes[0]
|
||||||
mi := &file_api_relay_proto_msgTypes[0]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *RelayListItem) String() string {
|
func (x *RelayListItem) String() string {
|
||||||
@ -51,7 +49,7 @@ func (*RelayListItem) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *RelayListItem) ProtoReflect() protoreflect.Message {
|
func (x *RelayListItem) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_relay_proto_msgTypes[0]
|
mi := &file_api_relay_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -86,6 +84,7 @@ type ListRelaysRequest struct {
|
|||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
// Max number of devices to return in the result-set.
|
// 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"`
|
Limit uint32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"`
|
||||||
// Offset in the result-set (for pagination).
|
// Offset in the result-set (for pagination).
|
||||||
Offset uint32 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
|
Offset uint32 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
|
||||||
@ -95,11 +94,9 @@ type ListRelaysRequest struct {
|
|||||||
|
|
||||||
func (x *ListRelaysRequest) Reset() {
|
func (x *ListRelaysRequest) Reset() {
|
||||||
*x = ListRelaysRequest{}
|
*x = ListRelaysRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_relay_proto_msgTypes[1]
|
||||||
mi := &file_api_relay_proto_msgTypes[1]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ListRelaysRequest) String() string {
|
func (x *ListRelaysRequest) String() string {
|
||||||
@ -110,7 +107,7 @@ func (*ListRelaysRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *ListRelaysRequest) ProtoReflect() protoreflect.Message {
|
func (x *ListRelaysRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_relay_proto_msgTypes[1]
|
mi := &file_api_relay_proto_msgTypes[1]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -159,11 +156,9 @@ type ListRelaysResponse struct {
|
|||||||
|
|
||||||
func (x *ListRelaysResponse) Reset() {
|
func (x *ListRelaysResponse) Reset() {
|
||||||
*x = ListRelaysResponse{}
|
*x = ListRelaysResponse{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_relay_proto_msgTypes[2]
|
||||||
mi := &file_api_relay_proto_msgTypes[2]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ListRelaysResponse) String() string {
|
func (x *ListRelaysResponse) String() string {
|
||||||
@ -174,7 +169,7 @@ func (*ListRelaysResponse) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *ListRelaysResponse) ProtoReflect() protoreflect.Message {
|
func (x *ListRelaysResponse) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_relay_proto_msgTypes[2]
|
mi := &file_api_relay_proto_msgTypes[2]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -216,11 +211,9 @@ type AddRelayDeviceRequest struct {
|
|||||||
|
|
||||||
func (x *AddRelayDeviceRequest) Reset() {
|
func (x *AddRelayDeviceRequest) Reset() {
|
||||||
*x = AddRelayDeviceRequest{}
|
*x = AddRelayDeviceRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_relay_proto_msgTypes[3]
|
||||||
mi := &file_api_relay_proto_msgTypes[3]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *AddRelayDeviceRequest) String() string {
|
func (x *AddRelayDeviceRequest) String() string {
|
||||||
@ -231,7 +224,7 @@ func (*AddRelayDeviceRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *AddRelayDeviceRequest) ProtoReflect() protoreflect.Message {
|
func (x *AddRelayDeviceRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_relay_proto_msgTypes[3]
|
mi := &file_api_relay_proto_msgTypes[3]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -273,11 +266,9 @@ type RemoveRelayDeviceRequest struct {
|
|||||||
|
|
||||||
func (x *RemoveRelayDeviceRequest) Reset() {
|
func (x *RemoveRelayDeviceRequest) Reset() {
|
||||||
*x = RemoveRelayDeviceRequest{}
|
*x = RemoveRelayDeviceRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_relay_proto_msgTypes[4]
|
||||||
mi := &file_api_relay_proto_msgTypes[4]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *RemoveRelayDeviceRequest) String() string {
|
func (x *RemoveRelayDeviceRequest) String() string {
|
||||||
@ -288,7 +279,7 @@ func (*RemoveRelayDeviceRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *RemoveRelayDeviceRequest) ProtoReflect() protoreflect.Message {
|
func (x *RemoveRelayDeviceRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_relay_proto_msgTypes[4]
|
mi := &file_api_relay_proto_msgTypes[4]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -323,6 +314,7 @@ type ListRelayDevicesRequest struct {
|
|||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
// Max number of multicast groups to return in the result-set.
|
// 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"`
|
Limit uint32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"`
|
||||||
// Offset in the result-set (for pagination).
|
// Offset in the result-set (for pagination).
|
||||||
Offset uint32 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
|
Offset uint32 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
|
||||||
@ -332,11 +324,9 @@ type ListRelayDevicesRequest struct {
|
|||||||
|
|
||||||
func (x *ListRelayDevicesRequest) Reset() {
|
func (x *ListRelayDevicesRequest) Reset() {
|
||||||
*x = ListRelayDevicesRequest{}
|
*x = ListRelayDevicesRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_relay_proto_msgTypes[5]
|
||||||
mi := &file_api_relay_proto_msgTypes[5]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ListRelayDevicesRequest) String() string {
|
func (x *ListRelayDevicesRequest) String() string {
|
||||||
@ -347,7 +337,7 @@ func (*ListRelayDevicesRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *ListRelayDevicesRequest) ProtoReflect() protoreflect.Message {
|
func (x *ListRelayDevicesRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_relay_proto_msgTypes[5]
|
mi := &file_api_relay_proto_msgTypes[5]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -398,11 +388,9 @@ type RelayDeviceListItem struct {
|
|||||||
|
|
||||||
func (x *RelayDeviceListItem) Reset() {
|
func (x *RelayDeviceListItem) Reset() {
|
||||||
*x = RelayDeviceListItem{}
|
*x = RelayDeviceListItem{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_relay_proto_msgTypes[6]
|
||||||
mi := &file_api_relay_proto_msgTypes[6]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *RelayDeviceListItem) String() string {
|
func (x *RelayDeviceListItem) String() string {
|
||||||
@ -413,7 +401,7 @@ func (*RelayDeviceListItem) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *RelayDeviceListItem) ProtoReflect() protoreflect.Message {
|
func (x *RelayDeviceListItem) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_relay_proto_msgTypes[6]
|
mi := &file_api_relay_proto_msgTypes[6]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -462,11 +450,9 @@ type ListRelayDevicesResponse struct {
|
|||||||
|
|
||||||
func (x *ListRelayDevicesResponse) Reset() {
|
func (x *ListRelayDevicesResponse) Reset() {
|
||||||
*x = ListRelayDevicesResponse{}
|
*x = ListRelayDevicesResponse{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_relay_proto_msgTypes[7]
|
||||||
mi := &file_api_relay_proto_msgTypes[7]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ListRelayDevicesResponse) String() string {
|
func (x *ListRelayDevicesResponse) String() string {
|
||||||
@ -477,7 +463,7 @@ func (*ListRelayDevicesResponse) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *ListRelayDevicesResponse) ProtoReflect() protoreflect.Message {
|
func (x *ListRelayDevicesResponse) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_relay_proto_msgTypes[7]
|
mi := &file_api_relay_proto_msgTypes[7]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
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_msgTypes = make([]protoimpl.MessageInfo, 8)
|
||||||
var file_api_relay_proto_goTypes = []interface{}{
|
var file_api_relay_proto_goTypes = []any{
|
||||||
(*RelayListItem)(nil), // 0: api.RelayListItem
|
(*RelayListItem)(nil), // 0: api.RelayListItem
|
||||||
(*ListRelaysRequest)(nil), // 1: api.ListRelaysRequest
|
(*ListRelaysRequest)(nil), // 1: api.ListRelaysRequest
|
||||||
(*ListRelaysResponse)(nil), // 2: api.ListRelaysResponse
|
(*ListRelaysResponse)(nil), // 2: api.ListRelaysResponse
|
||||||
@ -657,104 +643,6 @@ func file_api_relay_proto_init() {
|
|||||||
if File_api_relay_proto != nil {
|
if File_api_relay_proto != nil {
|
||||||
return
|
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{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
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.
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// - protoc-gen-go-grpc v1.3.0
|
// - protoc-gen-go-grpc v1.3.0
|
||||||
// - protoc v4.24.4
|
// - protoc v5.28.3
|
||||||
// source: api/relay.proto
|
// source: api/relay.proto
|
||||||
|
|
||||||
package api
|
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.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.34.1
|
// protoc-gen-go v1.35.1
|
||||||
// protoc v4.24.4
|
// protoc v5.28.3
|
||||||
// source: api/tenant.proto
|
// source: api/tenant.proto
|
||||||
|
|
||||||
package api
|
package api
|
||||||
@ -60,11 +60,9 @@ type Tenant struct {
|
|||||||
|
|
||||||
func (x *Tenant) Reset() {
|
func (x *Tenant) Reset() {
|
||||||
*x = Tenant{}
|
*x = Tenant{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_tenant_proto_msgTypes[0]
|
||||||
mi := &file_api_tenant_proto_msgTypes[0]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Tenant) String() string {
|
func (x *Tenant) String() string {
|
||||||
@ -75,7 +73,7 @@ func (*Tenant) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *Tenant) ProtoReflect() protoreflect.Message {
|
func (x *Tenant) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_tenant_proto_msgTypes[0]
|
mi := &file_api_tenant_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -182,11 +180,9 @@ type TenantListItem struct {
|
|||||||
|
|
||||||
func (x *TenantListItem) Reset() {
|
func (x *TenantListItem) Reset() {
|
||||||
*x = TenantListItem{}
|
*x = TenantListItem{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_tenant_proto_msgTypes[1]
|
||||||
mi := &file_api_tenant_proto_msgTypes[1]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *TenantListItem) String() string {
|
func (x *TenantListItem) String() string {
|
||||||
@ -197,7 +193,7 @@ func (*TenantListItem) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *TenantListItem) ProtoReflect() protoreflect.Message {
|
func (x *TenantListItem) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_tenant_proto_msgTypes[1]
|
mi := &file_api_tenant_proto_msgTypes[1]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -286,11 +282,9 @@ type CreateTenantRequest struct {
|
|||||||
|
|
||||||
func (x *CreateTenantRequest) Reset() {
|
func (x *CreateTenantRequest) Reset() {
|
||||||
*x = CreateTenantRequest{}
|
*x = CreateTenantRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_tenant_proto_msgTypes[2]
|
||||||
mi := &file_api_tenant_proto_msgTypes[2]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *CreateTenantRequest) String() string {
|
func (x *CreateTenantRequest) String() string {
|
||||||
@ -301,7 +295,7 @@ func (*CreateTenantRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *CreateTenantRequest) ProtoReflect() protoreflect.Message {
|
func (x *CreateTenantRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_tenant_proto_msgTypes[2]
|
mi := &file_api_tenant_proto_msgTypes[2]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -334,11 +328,9 @@ type CreateTenantResponse struct {
|
|||||||
|
|
||||||
func (x *CreateTenantResponse) Reset() {
|
func (x *CreateTenantResponse) Reset() {
|
||||||
*x = CreateTenantResponse{}
|
*x = CreateTenantResponse{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_tenant_proto_msgTypes[3]
|
||||||
mi := &file_api_tenant_proto_msgTypes[3]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *CreateTenantResponse) String() string {
|
func (x *CreateTenantResponse) String() string {
|
||||||
@ -349,7 +341,7 @@ func (*CreateTenantResponse) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *CreateTenantResponse) ProtoReflect() protoreflect.Message {
|
func (x *CreateTenantResponse) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_tenant_proto_msgTypes[3]
|
mi := &file_api_tenant_proto_msgTypes[3]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -382,11 +374,9 @@ type GetTenantRequest struct {
|
|||||||
|
|
||||||
func (x *GetTenantRequest) Reset() {
|
func (x *GetTenantRequest) Reset() {
|
||||||
*x = GetTenantRequest{}
|
*x = GetTenantRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_tenant_proto_msgTypes[4]
|
||||||
mi := &file_api_tenant_proto_msgTypes[4]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GetTenantRequest) String() string {
|
func (x *GetTenantRequest) String() string {
|
||||||
@ -397,7 +387,7 @@ func (*GetTenantRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *GetTenantRequest) ProtoReflect() protoreflect.Message {
|
func (x *GetTenantRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_tenant_proto_msgTypes[4]
|
mi := &file_api_tenant_proto_msgTypes[4]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -434,11 +424,9 @@ type GetTenantResponse struct {
|
|||||||
|
|
||||||
func (x *GetTenantResponse) Reset() {
|
func (x *GetTenantResponse) Reset() {
|
||||||
*x = GetTenantResponse{}
|
*x = GetTenantResponse{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_tenant_proto_msgTypes[5]
|
||||||
mi := &file_api_tenant_proto_msgTypes[5]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GetTenantResponse) String() string {
|
func (x *GetTenantResponse) String() string {
|
||||||
@ -449,7 +437,7 @@ func (*GetTenantResponse) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *GetTenantResponse) ProtoReflect() protoreflect.Message {
|
func (x *GetTenantResponse) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_tenant_proto_msgTypes[5]
|
mi := &file_api_tenant_proto_msgTypes[5]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -496,11 +484,9 @@ type UpdateTenantRequest struct {
|
|||||||
|
|
||||||
func (x *UpdateTenantRequest) Reset() {
|
func (x *UpdateTenantRequest) Reset() {
|
||||||
*x = UpdateTenantRequest{}
|
*x = UpdateTenantRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_tenant_proto_msgTypes[6]
|
||||||
mi := &file_api_tenant_proto_msgTypes[6]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UpdateTenantRequest) String() string {
|
func (x *UpdateTenantRequest) String() string {
|
||||||
@ -511,7 +497,7 @@ func (*UpdateTenantRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *UpdateTenantRequest) ProtoReflect() protoreflect.Message {
|
func (x *UpdateTenantRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_tenant_proto_msgTypes[6]
|
mi := &file_api_tenant_proto_msgTypes[6]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -544,11 +530,9 @@ type DeleteTenantRequest struct {
|
|||||||
|
|
||||||
func (x *DeleteTenantRequest) Reset() {
|
func (x *DeleteTenantRequest) Reset() {
|
||||||
*x = DeleteTenantRequest{}
|
*x = DeleteTenantRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_tenant_proto_msgTypes[7]
|
||||||
mi := &file_api_tenant_proto_msgTypes[7]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DeleteTenantRequest) String() string {
|
func (x *DeleteTenantRequest) String() string {
|
||||||
@ -559,7 +543,7 @@ func (*DeleteTenantRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *DeleteTenantRequest) ProtoReflect() protoreflect.Message {
|
func (x *DeleteTenantRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_tenant_proto_msgTypes[7]
|
mi := &file_api_tenant_proto_msgTypes[7]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -587,6 +571,7 @@ type ListTenantsRequest struct {
|
|||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
// Max number of tenants to return in the result-set.
|
// 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"`
|
Limit uint32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"`
|
||||||
// Offset in the result-set (for pagination).
|
// Offset in the result-set (for pagination).
|
||||||
Offset uint32 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
|
Offset uint32 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
|
||||||
@ -599,11 +584,9 @@ type ListTenantsRequest struct {
|
|||||||
|
|
||||||
func (x *ListTenantsRequest) Reset() {
|
func (x *ListTenantsRequest) Reset() {
|
||||||
*x = ListTenantsRequest{}
|
*x = ListTenantsRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_tenant_proto_msgTypes[8]
|
||||||
mi := &file_api_tenant_proto_msgTypes[8]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ListTenantsRequest) String() string {
|
func (x *ListTenantsRequest) String() string {
|
||||||
@ -614,7 +597,7 @@ func (*ListTenantsRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *ListTenantsRequest) ProtoReflect() protoreflect.Message {
|
func (x *ListTenantsRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_tenant_proto_msgTypes[8]
|
mi := &file_api_tenant_proto_msgTypes[8]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -670,11 +653,9 @@ type ListTenantsResponse struct {
|
|||||||
|
|
||||||
func (x *ListTenantsResponse) Reset() {
|
func (x *ListTenantsResponse) Reset() {
|
||||||
*x = ListTenantsResponse{}
|
*x = ListTenantsResponse{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_tenant_proto_msgTypes[9]
|
||||||
mi := &file_api_tenant_proto_msgTypes[9]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ListTenantsResponse) String() string {
|
func (x *ListTenantsResponse) String() string {
|
||||||
@ -685,7 +666,7 @@ func (*ListTenantsResponse) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *ListTenantsResponse) ProtoReflect() protoreflect.Message {
|
func (x *ListTenantsResponse) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_tenant_proto_msgTypes[9]
|
mi := &file_api_tenant_proto_msgTypes[9]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -737,11 +718,9 @@ type TenantUser struct {
|
|||||||
|
|
||||||
func (x *TenantUser) Reset() {
|
func (x *TenantUser) Reset() {
|
||||||
*x = TenantUser{}
|
*x = TenantUser{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_tenant_proto_msgTypes[10]
|
||||||
mi := &file_api_tenant_proto_msgTypes[10]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *TenantUser) String() string {
|
func (x *TenantUser) String() string {
|
||||||
@ -752,7 +731,7 @@ func (*TenantUser) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *TenantUser) ProtoReflect() protoreflect.Message {
|
func (x *TenantUser) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_tenant_proto_msgTypes[10]
|
mi := &file_api_tenant_proto_msgTypes[10]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -836,11 +815,9 @@ type TenantUserListItem struct {
|
|||||||
|
|
||||||
func (x *TenantUserListItem) Reset() {
|
func (x *TenantUserListItem) Reset() {
|
||||||
*x = TenantUserListItem{}
|
*x = TenantUserListItem{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_tenant_proto_msgTypes[11]
|
||||||
mi := &file_api_tenant_proto_msgTypes[11]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *TenantUserListItem) String() string {
|
func (x *TenantUserListItem) String() string {
|
||||||
@ -851,7 +828,7 @@ func (*TenantUserListItem) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *TenantUserListItem) ProtoReflect() protoreflect.Message {
|
func (x *TenantUserListItem) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_tenant_proto_msgTypes[11]
|
mi := &file_api_tenant_proto_msgTypes[11]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -933,11 +910,9 @@ type AddTenantUserRequest struct {
|
|||||||
|
|
||||||
func (x *AddTenantUserRequest) Reset() {
|
func (x *AddTenantUserRequest) Reset() {
|
||||||
*x = AddTenantUserRequest{}
|
*x = AddTenantUserRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_tenant_proto_msgTypes[12]
|
||||||
mi := &file_api_tenant_proto_msgTypes[12]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *AddTenantUserRequest) String() string {
|
func (x *AddTenantUserRequest) String() string {
|
||||||
@ -948,7 +923,7 @@ func (*AddTenantUserRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *AddTenantUserRequest) ProtoReflect() protoreflect.Message {
|
func (x *AddTenantUserRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_tenant_proto_msgTypes[12]
|
mi := &file_api_tenant_proto_msgTypes[12]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -983,11 +958,9 @@ type GetTenantUserRequest struct {
|
|||||||
|
|
||||||
func (x *GetTenantUserRequest) Reset() {
|
func (x *GetTenantUserRequest) Reset() {
|
||||||
*x = GetTenantUserRequest{}
|
*x = GetTenantUserRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_tenant_proto_msgTypes[13]
|
||||||
mi := &file_api_tenant_proto_msgTypes[13]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GetTenantUserRequest) String() string {
|
func (x *GetTenantUserRequest) String() string {
|
||||||
@ -998,7 +971,7 @@ func (*GetTenantUserRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *GetTenantUserRequest) ProtoReflect() protoreflect.Message {
|
func (x *GetTenantUserRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_tenant_proto_msgTypes[13]
|
mi := &file_api_tenant_proto_msgTypes[13]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -1042,11 +1015,9 @@ type GetTenantUserResponse struct {
|
|||||||
|
|
||||||
func (x *GetTenantUserResponse) Reset() {
|
func (x *GetTenantUserResponse) Reset() {
|
||||||
*x = GetTenantUserResponse{}
|
*x = GetTenantUserResponse{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_tenant_proto_msgTypes[14]
|
||||||
mi := &file_api_tenant_proto_msgTypes[14]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GetTenantUserResponse) String() string {
|
func (x *GetTenantUserResponse) String() string {
|
||||||
@ -1057,7 +1028,7 @@ func (*GetTenantUserResponse) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *GetTenantUserResponse) ProtoReflect() protoreflect.Message {
|
func (x *GetTenantUserResponse) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_tenant_proto_msgTypes[14]
|
mi := &file_api_tenant_proto_msgTypes[14]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -1104,11 +1075,9 @@ type UpdateTenantUserRequest struct {
|
|||||||
|
|
||||||
func (x *UpdateTenantUserRequest) Reset() {
|
func (x *UpdateTenantUserRequest) Reset() {
|
||||||
*x = UpdateTenantUserRequest{}
|
*x = UpdateTenantUserRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_tenant_proto_msgTypes[15]
|
||||||
mi := &file_api_tenant_proto_msgTypes[15]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UpdateTenantUserRequest) String() string {
|
func (x *UpdateTenantUserRequest) String() string {
|
||||||
@ -1119,7 +1088,7 @@ func (*UpdateTenantUserRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *UpdateTenantUserRequest) ProtoReflect() protoreflect.Message {
|
func (x *UpdateTenantUserRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_tenant_proto_msgTypes[15]
|
mi := &file_api_tenant_proto_msgTypes[15]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -1154,11 +1123,9 @@ type DeleteTenantUserRequest struct {
|
|||||||
|
|
||||||
func (x *DeleteTenantUserRequest) Reset() {
|
func (x *DeleteTenantUserRequest) Reset() {
|
||||||
*x = DeleteTenantUserRequest{}
|
*x = DeleteTenantUserRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_tenant_proto_msgTypes[16]
|
||||||
mi := &file_api_tenant_proto_msgTypes[16]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DeleteTenantUserRequest) String() string {
|
func (x *DeleteTenantUserRequest) String() string {
|
||||||
@ -1169,7 +1136,7 @@ func (*DeleteTenantUserRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *DeleteTenantUserRequest) ProtoReflect() protoreflect.Message {
|
func (x *DeleteTenantUserRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_tenant_proto_msgTypes[16]
|
mi := &file_api_tenant_proto_msgTypes[16]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -1206,6 +1173,7 @@ type ListTenantUsersRequest struct {
|
|||||||
// Tenant ID (UUID).
|
// Tenant ID (UUID).
|
||||||
TenantId string `protobuf:"bytes,1,opt,name=tenant_id,json=tenantId,proto3" json:"tenant_id,omitempty"`
|
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.
|
// 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"`
|
Limit uint32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
|
||||||
// Offset in the result-set (for pagination).
|
// Offset in the result-set (for pagination).
|
||||||
Offset uint32 `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"`
|
Offset uint32 `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"`
|
||||||
@ -1213,11 +1181,9 @@ type ListTenantUsersRequest struct {
|
|||||||
|
|
||||||
func (x *ListTenantUsersRequest) Reset() {
|
func (x *ListTenantUsersRequest) Reset() {
|
||||||
*x = ListTenantUsersRequest{}
|
*x = ListTenantUsersRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_tenant_proto_msgTypes[17]
|
||||||
mi := &file_api_tenant_proto_msgTypes[17]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ListTenantUsersRequest) String() string {
|
func (x *ListTenantUsersRequest) String() string {
|
||||||
@ -1228,7 +1194,7 @@ func (*ListTenantUsersRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *ListTenantUsersRequest) ProtoReflect() protoreflect.Message {
|
func (x *ListTenantUsersRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_tenant_proto_msgTypes[17]
|
mi := &file_api_tenant_proto_msgTypes[17]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -1277,11 +1243,9 @@ type ListTenantUsersResponse struct {
|
|||||||
|
|
||||||
func (x *ListTenantUsersResponse) Reset() {
|
func (x *ListTenantUsersResponse) Reset() {
|
||||||
*x = ListTenantUsersResponse{}
|
*x = ListTenantUsersResponse{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_tenant_proto_msgTypes[18]
|
||||||
mi := &file_api_tenant_proto_msgTypes[18]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ListTenantUsersResponse) String() string {
|
func (x *ListTenantUsersResponse) String() string {
|
||||||
@ -1292,7 +1256,7 @@ func (*ListTenantUsersResponse) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *ListTenantUsersResponse) ProtoReflect() protoreflect.Message {
|
func (x *ListTenantUsersResponse) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_tenant_proto_msgTypes[18]
|
mi := &file_api_tenant_proto_msgTypes[18]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
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_msgTypes = make([]protoimpl.MessageInfo, 20)
|
||||||
var file_api_tenant_proto_goTypes = []interface{}{
|
var file_api_tenant_proto_goTypes = []any{
|
||||||
(*Tenant)(nil), // 0: api.Tenant
|
(*Tenant)(nil), // 0: api.Tenant
|
||||||
(*TenantListItem)(nil), // 1: api.TenantListItem
|
(*TenantListItem)(nil), // 1: api.TenantListItem
|
||||||
(*CreateTenantRequest)(nil), // 2: api.CreateTenantRequest
|
(*CreateTenantRequest)(nil), // 2: api.CreateTenantRequest
|
||||||
@ -1664,236 +1628,6 @@ func file_api_tenant_proto_init() {
|
|||||||
if File_api_tenant_proto != nil {
|
if File_api_tenant_proto != nil {
|
||||||
return
|
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{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
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.
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// - protoc-gen-go-grpc v1.3.0
|
// - protoc-gen-go-grpc v1.3.0
|
||||||
// - protoc v4.24.4
|
// - protoc v5.28.3
|
||||||
// source: api/tenant.proto
|
// source: api/tenant.proto
|
||||||
|
|
||||||
package api
|
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.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.34.1
|
// protoc-gen-go v1.35.1
|
||||||
// protoc v4.24.4
|
// protoc v5.28.3
|
||||||
// source: api/user.proto
|
// source: api/user.proto
|
||||||
|
|
||||||
package api
|
package api
|
||||||
@ -43,11 +43,9 @@ type User struct {
|
|||||||
|
|
||||||
func (x *User) Reset() {
|
func (x *User) Reset() {
|
||||||
*x = User{}
|
*x = User{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_user_proto_msgTypes[0]
|
||||||
mi := &file_api_user_proto_msgTypes[0]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *User) String() string {
|
func (x *User) String() string {
|
||||||
@ -58,7 +56,7 @@ func (*User) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *User) ProtoReflect() protoreflect.Message {
|
func (x *User) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_user_proto_msgTypes[0]
|
mi := &file_api_user_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -129,11 +127,9 @@ type UserListItem struct {
|
|||||||
|
|
||||||
func (x *UserListItem) Reset() {
|
func (x *UserListItem) Reset() {
|
||||||
*x = UserListItem{}
|
*x = UserListItem{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_user_proto_msgTypes[1]
|
||||||
mi := &file_api_user_proto_msgTypes[1]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UserListItem) String() string {
|
func (x *UserListItem) String() string {
|
||||||
@ -144,7 +140,7 @@ func (*UserListItem) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *UserListItem) ProtoReflect() protoreflect.Message {
|
func (x *UserListItem) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_user_proto_msgTypes[1]
|
mi := &file_api_user_proto_msgTypes[1]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -220,11 +216,9 @@ type UserTenant struct {
|
|||||||
|
|
||||||
func (x *UserTenant) Reset() {
|
func (x *UserTenant) Reset() {
|
||||||
*x = UserTenant{}
|
*x = UserTenant{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_user_proto_msgTypes[2]
|
||||||
mi := &file_api_user_proto_msgTypes[2]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UserTenant) String() string {
|
func (x *UserTenant) String() string {
|
||||||
@ -235,7 +229,7 @@ func (*UserTenant) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *UserTenant) ProtoReflect() protoreflect.Message {
|
func (x *UserTenant) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_user_proto_msgTypes[2]
|
mi := &file_api_user_proto_msgTypes[2]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -293,11 +287,9 @@ type CreateUserRequest struct {
|
|||||||
|
|
||||||
func (x *CreateUserRequest) Reset() {
|
func (x *CreateUserRequest) Reset() {
|
||||||
*x = CreateUserRequest{}
|
*x = CreateUserRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_user_proto_msgTypes[3]
|
||||||
mi := &file_api_user_proto_msgTypes[3]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *CreateUserRequest) String() string {
|
func (x *CreateUserRequest) String() string {
|
||||||
@ -308,7 +300,7 @@ func (*CreateUserRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *CreateUserRequest) ProtoReflect() protoreflect.Message {
|
func (x *CreateUserRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_user_proto_msgTypes[3]
|
mi := &file_api_user_proto_msgTypes[3]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -355,11 +347,9 @@ type CreateUserResponse struct {
|
|||||||
|
|
||||||
func (x *CreateUserResponse) Reset() {
|
func (x *CreateUserResponse) Reset() {
|
||||||
*x = CreateUserResponse{}
|
*x = CreateUserResponse{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_user_proto_msgTypes[4]
|
||||||
mi := &file_api_user_proto_msgTypes[4]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *CreateUserResponse) String() string {
|
func (x *CreateUserResponse) String() string {
|
||||||
@ -370,7 +360,7 @@ func (*CreateUserResponse) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *CreateUserResponse) ProtoReflect() protoreflect.Message {
|
func (x *CreateUserResponse) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_user_proto_msgTypes[4]
|
mi := &file_api_user_proto_msgTypes[4]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -403,11 +393,9 @@ type GetUserRequest struct {
|
|||||||
|
|
||||||
func (x *GetUserRequest) Reset() {
|
func (x *GetUserRequest) Reset() {
|
||||||
*x = GetUserRequest{}
|
*x = GetUserRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_user_proto_msgTypes[5]
|
||||||
mi := &file_api_user_proto_msgTypes[5]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GetUserRequest) String() string {
|
func (x *GetUserRequest) String() string {
|
||||||
@ -418,7 +406,7 @@ func (*GetUserRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *GetUserRequest) ProtoReflect() protoreflect.Message {
|
func (x *GetUserRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_user_proto_msgTypes[5]
|
mi := &file_api_user_proto_msgTypes[5]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -455,11 +443,9 @@ type GetUserResponse struct {
|
|||||||
|
|
||||||
func (x *GetUserResponse) Reset() {
|
func (x *GetUserResponse) Reset() {
|
||||||
*x = GetUserResponse{}
|
*x = GetUserResponse{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_user_proto_msgTypes[6]
|
||||||
mi := &file_api_user_proto_msgTypes[6]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GetUserResponse) String() string {
|
func (x *GetUserResponse) String() string {
|
||||||
@ -470,7 +456,7 @@ func (*GetUserResponse) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *GetUserResponse) ProtoReflect() protoreflect.Message {
|
func (x *GetUserResponse) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_user_proto_msgTypes[6]
|
mi := &file_api_user_proto_msgTypes[6]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -517,11 +503,9 @@ type UpdateUserRequest struct {
|
|||||||
|
|
||||||
func (x *UpdateUserRequest) Reset() {
|
func (x *UpdateUserRequest) Reset() {
|
||||||
*x = UpdateUserRequest{}
|
*x = UpdateUserRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_user_proto_msgTypes[7]
|
||||||
mi := &file_api_user_proto_msgTypes[7]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UpdateUserRequest) String() string {
|
func (x *UpdateUserRequest) String() string {
|
||||||
@ -532,7 +516,7 @@ func (*UpdateUserRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message {
|
func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_user_proto_msgTypes[7]
|
mi := &file_api_user_proto_msgTypes[7]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -565,11 +549,9 @@ type DeleteUserRequest struct {
|
|||||||
|
|
||||||
func (x *DeleteUserRequest) Reset() {
|
func (x *DeleteUserRequest) Reset() {
|
||||||
*x = DeleteUserRequest{}
|
*x = DeleteUserRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_user_proto_msgTypes[8]
|
||||||
mi := &file_api_user_proto_msgTypes[8]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DeleteUserRequest) String() string {
|
func (x *DeleteUserRequest) String() string {
|
||||||
@ -580,7 +562,7 @@ func (*DeleteUserRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *DeleteUserRequest) ProtoReflect() protoreflect.Message {
|
func (x *DeleteUserRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_user_proto_msgTypes[8]
|
mi := &file_api_user_proto_msgTypes[8]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -608,6 +590,7 @@ type ListUsersRequest struct {
|
|||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
// Max number of tenants to return in the result-set.
|
// 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"`
|
Limit uint32 `protobuf:"varint,1,opt,name=limit,proto3" json:"limit,omitempty"`
|
||||||
// Offset in the result-set (for pagination).
|
// Offset in the result-set (for pagination).
|
||||||
Offset uint32 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
|
Offset uint32 `protobuf:"varint,2,opt,name=offset,proto3" json:"offset,omitempty"`
|
||||||
@ -615,11 +598,9 @@ type ListUsersRequest struct {
|
|||||||
|
|
||||||
func (x *ListUsersRequest) Reset() {
|
func (x *ListUsersRequest) Reset() {
|
||||||
*x = ListUsersRequest{}
|
*x = ListUsersRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_user_proto_msgTypes[9]
|
||||||
mi := &file_api_user_proto_msgTypes[9]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ListUsersRequest) String() string {
|
func (x *ListUsersRequest) String() string {
|
||||||
@ -630,7 +611,7 @@ func (*ListUsersRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *ListUsersRequest) ProtoReflect() protoreflect.Message {
|
func (x *ListUsersRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_user_proto_msgTypes[9]
|
mi := &file_api_user_proto_msgTypes[9]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -672,11 +653,9 @@ type ListUsersResponse struct {
|
|||||||
|
|
||||||
func (x *ListUsersResponse) Reset() {
|
func (x *ListUsersResponse) Reset() {
|
||||||
*x = ListUsersResponse{}
|
*x = ListUsersResponse{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_user_proto_msgTypes[10]
|
||||||
mi := &file_api_user_proto_msgTypes[10]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ListUsersResponse) String() string {
|
func (x *ListUsersResponse) String() string {
|
||||||
@ -687,7 +666,7 @@ func (*ListUsersResponse) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *ListUsersResponse) ProtoReflect() protoreflect.Message {
|
func (x *ListUsersResponse) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_user_proto_msgTypes[10]
|
mi := &file_api_user_proto_msgTypes[10]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -729,11 +708,9 @@ type UpdateUserPasswordRequest struct {
|
|||||||
|
|
||||||
func (x *UpdateUserPasswordRequest) Reset() {
|
func (x *UpdateUserPasswordRequest) Reset() {
|
||||||
*x = UpdateUserPasswordRequest{}
|
*x = UpdateUserPasswordRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_api_user_proto_msgTypes[11]
|
||||||
mi := &file_api_user_proto_msgTypes[11]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UpdateUserPasswordRequest) String() string {
|
func (x *UpdateUserPasswordRequest) String() string {
|
||||||
@ -744,7 +721,7 @@ func (*UpdateUserPasswordRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *UpdateUserPasswordRequest) ProtoReflect() protoreflect.Message {
|
func (x *UpdateUserPasswordRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_api_user_proto_msgTypes[11]
|
mi := &file_api_user_proto_msgTypes[11]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
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_msgTypes = make([]protoimpl.MessageInfo, 12)
|
||||||
var file_api_user_proto_goTypes = []interface{}{
|
var file_api_user_proto_goTypes = []any{
|
||||||
(*User)(nil), // 0: api.User
|
(*User)(nil), // 0: api.User
|
||||||
(*UserListItem)(nil), // 1: api.UserListItem
|
(*UserListItem)(nil), // 1: api.UserListItem
|
||||||
(*UserTenant)(nil), // 2: api.UserTenant
|
(*UserTenant)(nil), // 2: api.UserTenant
|
||||||
@ -967,152 +944,6 @@ func file_api_user_proto_init() {
|
|||||||
if File_api_user_proto != nil {
|
if File_api_user_proto != nil {
|
||||||
return
|
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{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
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.
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// - protoc-gen-go-grpc v1.3.0
|
// - protoc-gen-go-grpc v1.3.0
|
||||||
// - protoc v4.24.4
|
// - protoc v5.28.3
|
||||||
// source: api/user.proto
|
// source: api/user.proto
|
||||||
|
|
||||||
package api
|
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.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.34.1
|
// protoc-gen-go v1.35.1
|
||||||
// protoc v4.24.4
|
// protoc v5.28.3
|
||||||
// source: common/common.proto
|
// source: common/common.proto
|
||||||
|
|
||||||
package common
|
package common
|
||||||
@ -656,11 +656,9 @@ type Location struct {
|
|||||||
|
|
||||||
func (x *Location) Reset() {
|
func (x *Location) Reset() {
|
||||||
*x = Location{}
|
*x = Location{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_common_common_proto_msgTypes[0]
|
||||||
mi := &file_common_common_proto_msgTypes[0]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Location) String() string {
|
func (x *Location) String() string {
|
||||||
@ -671,7 +669,7 @@ func (*Location) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *Location) ProtoReflect() protoreflect.Message {
|
func (x *Location) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_common_common_proto_msgTypes[0]
|
mi := &file_common_common_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -734,11 +732,9 @@ type KeyEnvelope struct {
|
|||||||
|
|
||||||
func (x *KeyEnvelope) Reset() {
|
func (x *KeyEnvelope) Reset() {
|
||||||
*x = KeyEnvelope{}
|
*x = KeyEnvelope{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_common_common_proto_msgTypes[1]
|
||||||
mi := &file_common_common_proto_msgTypes[1]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *KeyEnvelope) String() string {
|
func (x *KeyEnvelope) String() string {
|
||||||
@ -749,7 +745,7 @@ func (*KeyEnvelope) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *KeyEnvelope) ProtoReflect() protoreflect.Message {
|
func (x *KeyEnvelope) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_common_common_proto_msgTypes[1]
|
mi := &file_common_common_proto_msgTypes[1]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -795,11 +791,9 @@ type Metric struct {
|
|||||||
|
|
||||||
func (x *Metric) Reset() {
|
func (x *Metric) Reset() {
|
||||||
*x = Metric{}
|
*x = Metric{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_common_common_proto_msgTypes[2]
|
||||||
mi := &file_common_common_proto_msgTypes[2]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Metric) String() string {
|
func (x *Metric) String() string {
|
||||||
@ -810,7 +804,7 @@ func (*Metric) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *Metric) ProtoReflect() protoreflect.Message {
|
func (x *Metric) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_common_common_proto_msgTypes[2]
|
mi := &file_common_common_proto_msgTypes[2]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -867,11 +861,9 @@ type MetricDataset struct {
|
|||||||
|
|
||||||
func (x *MetricDataset) Reset() {
|
func (x *MetricDataset) Reset() {
|
||||||
*x = MetricDataset{}
|
*x = MetricDataset{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_common_common_proto_msgTypes[3]
|
||||||
mi := &file_common_common_proto_msgTypes[3]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *MetricDataset) String() string {
|
func (x *MetricDataset) String() string {
|
||||||
@ -882,7 +874,7 @@ func (*MetricDataset) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *MetricDataset) ProtoReflect() protoreflect.Message {
|
func (x *MetricDataset) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_common_common_proto_msgTypes[3]
|
mi := &file_common_common_proto_msgTypes[3]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -925,11 +917,9 @@ type JoinServerContext struct {
|
|||||||
|
|
||||||
func (x *JoinServerContext) Reset() {
|
func (x *JoinServerContext) Reset() {
|
||||||
*x = JoinServerContext{}
|
*x = JoinServerContext{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_common_common_proto_msgTypes[4]
|
||||||
mi := &file_common_common_proto_msgTypes[4]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *JoinServerContext) String() string {
|
func (x *JoinServerContext) String() string {
|
||||||
@ -940,7 +930,7 @@ func (*JoinServerContext) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *JoinServerContext) ProtoReflect() protoreflect.Message {
|
func (x *JoinServerContext) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_common_common_proto_msgTypes[4]
|
mi := &file_common_common_proto_msgTypes[4]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
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_enumTypes = make([]protoimpl.EnumInfo, 10)
|
||||||
var file_common_common_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
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
|
(Modulation)(0), // 0: common.Modulation
|
||||||
(Region)(0), // 1: common.Region
|
(Region)(0), // 1: common.Region
|
||||||
(MType)(0), // 2: common.MType
|
(MType)(0), // 2: common.MType
|
||||||
@ -1139,68 +1129,6 @@ func file_common_common_proto_init() {
|
|||||||
if File_common_common_proto != nil {
|
if File_common_common_proto != nil {
|
||||||
return
|
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{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
|
7
api/go/go.mod
vendored
7
api/go/go.mod
vendored
@ -1,6 +1,7 @@
|
|||||||
module github.com/chirpstack/chirpstack/api/go/v4
|
module github.com/chirpstack/chirpstack/api/go/v4
|
||||||
|
|
||||||
go 1.21
|
go 1.21
|
||||||
|
toolchain go1.24.1
|
||||||
|
|
||||||
require (
|
require (
|
||||||
google.golang.org/genproto/googleapis/api v0.0.0-20240325203815-454cdb8f5daa
|
google.golang.org/genproto/googleapis/api v0.0.0-20240325203815-454cdb8f5daa
|
||||||
@ -10,8 +11,8 @@ require (
|
|||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/golang/protobuf v1.5.4 // indirect
|
github.com/golang/protobuf v1.5.4 // indirect
|
||||||
golang.org/x/net v0.23.0 // indirect
|
golang.org/x/net v0.36.0 // indirect
|
||||||
golang.org/x/sys v0.18.0 // indirect
|
golang.org/x/sys v0.30.0 // indirect
|
||||||
golang.org/x/text v0.14.0 // indirect
|
golang.org/x/text v0.22.0 // indirect
|
||||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240325203815-454cdb8f5daa // 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/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 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
||||||
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
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.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA=
|
||||||
golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
|
golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I=
|
||||||
golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4=
|
golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc=
|
||||||
golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
|
||||||
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
|
golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM=
|
||||||
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
|
golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY=
|
||||||
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 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/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=
|
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
590
api/go/integration/integration.pb.go
vendored
590
api/go/integration/integration.pb.go
vendored
@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.34.1
|
// protoc-gen-go v1.35.1
|
||||||
// protoc v4.24.4
|
// protoc v5.28.3
|
||||||
// source: integration/integration.proto
|
// source: integration/integration.proto
|
||||||
|
|
||||||
package integration
|
package integration
|
||||||
@ -195,11 +195,9 @@ type DeviceInfo struct {
|
|||||||
|
|
||||||
func (x *DeviceInfo) Reset() {
|
func (x *DeviceInfo) Reset() {
|
||||||
*x = DeviceInfo{}
|
*x = DeviceInfo{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_integration_integration_proto_msgTypes[0]
|
||||||
mi := &file_integration_integration_proto_msgTypes[0]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DeviceInfo) String() string {
|
func (x *DeviceInfo) String() string {
|
||||||
@ -210,7 +208,7 @@ func (*DeviceInfo) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *DeviceInfo) ProtoReflect() protoreflect.Message {
|
func (x *DeviceInfo) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_integration_integration_proto_msgTypes[0]
|
mi := &file_integration_integration_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -317,11 +315,9 @@ type UplinkRelayRxInfo struct {
|
|||||||
|
|
||||||
func (x *UplinkRelayRxInfo) Reset() {
|
func (x *UplinkRelayRxInfo) Reset() {
|
||||||
*x = UplinkRelayRxInfo{}
|
*x = UplinkRelayRxInfo{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_integration_integration_proto_msgTypes[1]
|
||||||
mi := &file_integration_integration_proto_msgTypes[1]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UplinkRelayRxInfo) String() string {
|
func (x *UplinkRelayRxInfo) String() string {
|
||||||
@ -332,7 +328,7 @@ func (*UplinkRelayRxInfo) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *UplinkRelayRxInfo) ProtoReflect() protoreflect.Message {
|
func (x *UplinkRelayRxInfo) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_integration_integration_proto_msgTypes[1]
|
mi := &file_integration_integration_proto_msgTypes[1]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -429,15 +425,16 @@ type UplinkEvent struct {
|
|||||||
// the AppSKey and that the encryption / decryption of the payloads is
|
// the AppSKey and that the encryption / decryption of the payloads is
|
||||||
// the responsibility of the end-application.
|
// 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"`
|
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() {
|
func (x *UplinkEvent) Reset() {
|
||||||
*x = UplinkEvent{}
|
*x = UplinkEvent{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_integration_integration_proto_msgTypes[2]
|
||||||
mi := &file_integration_integration_proto_msgTypes[2]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UplinkEvent) String() string {
|
func (x *UplinkEvent) String() string {
|
||||||
@ -448,7 +445,7 @@ func (*UplinkEvent) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *UplinkEvent) ProtoReflect() protoreflect.Message {
|
func (x *UplinkEvent) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_integration_integration_proto_msgTypes[2]
|
mi := &file_integration_integration_proto_msgTypes[2]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -568,6 +565,13 @@ func (x *UplinkEvent) GetJoinServerContext() *common.JoinServerContext {
|
|||||||
return nil
|
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.
|
// JoinEvent is the message sent when a device joined the network.
|
||||||
// Note: this event is sent at the first uplink after OTAA.
|
// Note: this event is sent at the first uplink after OTAA.
|
||||||
type JoinEvent struct {
|
type JoinEvent struct {
|
||||||
@ -590,15 +594,16 @@ type JoinEvent struct {
|
|||||||
// the AppSKey and that the encryption / decryption of the payloads is
|
// the AppSKey and that the encryption / decryption of the payloads is
|
||||||
// the responsibility of the end-application.
|
// 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"`
|
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() {
|
func (x *JoinEvent) Reset() {
|
||||||
*x = JoinEvent{}
|
*x = JoinEvent{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_integration_integration_proto_msgTypes[3]
|
||||||
mi := &file_integration_integration_proto_msgTypes[3]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *JoinEvent) String() string {
|
func (x *JoinEvent) String() string {
|
||||||
@ -609,7 +614,7 @@ func (*JoinEvent) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *JoinEvent) ProtoReflect() protoreflect.Message {
|
func (x *JoinEvent) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_integration_integration_proto_msgTypes[3]
|
mi := &file_integration_integration_proto_msgTypes[3]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -666,6 +671,13 @@ func (x *JoinEvent) GetJoinServerContext() *common.JoinServerContext {
|
|||||||
return nil
|
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
|
// AckEvent is the message sent when a confirmation on a confirmed downlink
|
||||||
// has been received -or- when the downlink timed out.
|
// has been received -or- when the downlink timed out.
|
||||||
type AckEvent struct {
|
type AckEvent struct {
|
||||||
@ -689,11 +701,9 @@ type AckEvent struct {
|
|||||||
|
|
||||||
func (x *AckEvent) Reset() {
|
func (x *AckEvent) Reset() {
|
||||||
*x = AckEvent{}
|
*x = AckEvent{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_integration_integration_proto_msgTypes[4]
|
||||||
mi := &file_integration_integration_proto_msgTypes[4]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *AckEvent) String() string {
|
func (x *AckEvent) String() string {
|
||||||
@ -704,7 +714,7 @@ func (*AckEvent) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *AckEvent) ProtoReflect() protoreflect.Message {
|
func (x *AckEvent) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_integration_integration_proto_msgTypes[4]
|
mi := &file_integration_integration_proto_msgTypes[4]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -787,11 +797,9 @@ type TxAckEvent struct {
|
|||||||
|
|
||||||
func (x *TxAckEvent) Reset() {
|
func (x *TxAckEvent) Reset() {
|
||||||
*x = TxAckEvent{}
|
*x = TxAckEvent{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_integration_integration_proto_msgTypes[5]
|
||||||
mi := &file_integration_integration_proto_msgTypes[5]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *TxAckEvent) String() string {
|
func (x *TxAckEvent) String() string {
|
||||||
@ -802,7 +810,7 @@ func (*TxAckEvent) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *TxAckEvent) ProtoReflect() protoreflect.Message {
|
func (x *TxAckEvent) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_integration_integration_proto_msgTypes[5]
|
mi := &file_integration_integration_proto_msgTypes[5]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -888,11 +896,9 @@ type LogEvent struct {
|
|||||||
|
|
||||||
func (x *LogEvent) Reset() {
|
func (x *LogEvent) Reset() {
|
||||||
*x = LogEvent{}
|
*x = LogEvent{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_integration_integration_proto_msgTypes[6]
|
||||||
mi := &file_integration_integration_proto_msgTypes[6]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *LogEvent) String() string {
|
func (x *LogEvent) String() string {
|
||||||
@ -903,7 +909,7 @@ func (*LogEvent) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *LogEvent) ProtoReflect() protoreflect.Message {
|
func (x *LogEvent) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_integration_integration_proto_msgTypes[6]
|
mi := &file_integration_integration_proto_msgTypes[6]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -986,11 +992,9 @@ type StatusEvent struct {
|
|||||||
|
|
||||||
func (x *StatusEvent) Reset() {
|
func (x *StatusEvent) Reset() {
|
||||||
*x = StatusEvent{}
|
*x = StatusEvent{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_integration_integration_proto_msgTypes[7]
|
||||||
mi := &file_integration_integration_proto_msgTypes[7]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *StatusEvent) String() string {
|
func (x *StatusEvent) String() string {
|
||||||
@ -1001,7 +1005,7 @@ func (*StatusEvent) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *StatusEvent) ProtoReflect() protoreflect.Message {
|
func (x *StatusEvent) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_integration_integration_proto_msgTypes[7]
|
mi := &file_integration_integration_proto_msgTypes[7]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -1083,11 +1087,9 @@ type LocationEvent struct {
|
|||||||
|
|
||||||
func (x *LocationEvent) Reset() {
|
func (x *LocationEvent) Reset() {
|
||||||
*x = LocationEvent{}
|
*x = LocationEvent{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_integration_integration_proto_msgTypes[8]
|
||||||
mi := &file_integration_integration_proto_msgTypes[8]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *LocationEvent) String() string {
|
func (x *LocationEvent) String() string {
|
||||||
@ -1098,7 +1100,7 @@ func (*LocationEvent) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *LocationEvent) ProtoReflect() protoreflect.Message {
|
func (x *LocationEvent) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_integration_integration_proto_msgTypes[8]
|
mi := &file_integration_integration_proto_msgTypes[8]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -1165,11 +1167,9 @@ type IntegrationEvent struct {
|
|||||||
|
|
||||||
func (x *IntegrationEvent) Reset() {
|
func (x *IntegrationEvent) Reset() {
|
||||||
*x = IntegrationEvent{}
|
*x = IntegrationEvent{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_integration_integration_proto_msgTypes[9]
|
||||||
mi := &file_integration_integration_proto_msgTypes[9]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *IntegrationEvent) String() string {
|
func (x *IntegrationEvent) String() string {
|
||||||
@ -1180,7 +1180,7 @@ func (*IntegrationEvent) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *IntegrationEvent) ProtoReflect() protoreflect.Message {
|
func (x *IntegrationEvent) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_integration_integration_proto_msgTypes[9]
|
mi := &file_integration_integration_proto_msgTypes[9]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -1263,11 +1263,9 @@ type DownlinkCommand struct {
|
|||||||
|
|
||||||
func (x *DownlinkCommand) Reset() {
|
func (x *DownlinkCommand) Reset() {
|
||||||
*x = DownlinkCommand{}
|
*x = DownlinkCommand{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_integration_integration_proto_msgTypes[10]
|
||||||
mi := &file_integration_integration_proto_msgTypes[10]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DownlinkCommand) String() string {
|
func (x *DownlinkCommand) String() string {
|
||||||
@ -1278,7 +1276,7 @@ func (*DownlinkCommand) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *DownlinkCommand) ProtoReflect() protoreflect.Message {
|
func (x *DownlinkCommand) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_integration_integration_proto_msgTypes[10]
|
mi := &file_integration_integration_proto_msgTypes[10]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -1387,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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x65, 0x64, 0x75, 0x70, 0x6c, 0x69,
|
||||||
@ -1425,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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x04,
|
||||||
@ -1435,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,
|
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,
|
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,
|
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,
|
0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x22, 0x0a, 0x0d, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f,
|
||||||
0x64, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x64, 0x65, 0x76, 0x41, 0x64, 0x64,
|
0x69, 0x74, 0x65, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x71,
|
||||||
0x72, 0x12, 0x42, 0x0a, 0x0d, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x5f, 0x72, 0x78, 0x5f, 0x69, 0x6e,
|
0x75, 0x65, 0x75, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x63,
|
||||||
0x66, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x67,
|
0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08,
|
||||||
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x55, 0x70, 0x6c, 0x69, 0x6e, 0x6b, 0x52, 0x65, 0x6c,
|
0x52, 0x0c, 0x61, 0x63, 0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x64, 0x12, 0x1c,
|
||||||
0x61, 0x79, 0x52, 0x78, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x72, 0x65, 0x6c, 0x61, 0x79, 0x52,
|
0x0a, 0x0a, 0x66, 0x5f, 0x63, 0x6e, 0x74, 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x18, 0x06, 0x20, 0x01,
|
||||||
0x78, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x49, 0x0a, 0x13, 0x6a, 0x6f, 0x69, 0x6e, 0x5f, 0x73, 0x65,
|
0x28, 0x0d, 0x52, 0x08, 0x66, 0x43, 0x6e, 0x74, 0x44, 0x6f, 0x77, 0x6e, 0x22, 0xa5, 0x02, 0x0a,
|
||||||
0x72, 0x76, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18, 0x06, 0x20, 0x01,
|
0x0a, 0x54, 0x78, 0x41, 0x63, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x64,
|
||||||
0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4a, 0x6f, 0x69, 0x6e,
|
0x6f, 0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d,
|
||||||
0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x52, 0x11, 0x6a,
|
0x52, 0x0a, 0x64, 0x6f, 0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x04,
|
||||||
0x6f, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74,
|
0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f,
|
||||||
0x22, 0x85, 0x02, 0x0a, 0x08, 0x41, 0x63, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x29, 0x0a,
|
0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d,
|
||||||
0x10, 0x64, 0x65, 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69,
|
0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x0b,
|
||||||
0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x65, 0x64, 0x75, 0x70, 0x6c, 0x69,
|
0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28,
|
||||||
0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65,
|
0x0b, 0x32, 0x17, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e,
|
||||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
|
0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69,
|
||||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
|
0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x22, 0x0a, 0x0d, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f,
|
||||||
0x6d, 0x70, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x64, 0x65, 0x76, 0x69,
|
0x69, 0x74, 0x65, 0x6d, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x71,
|
||||||
0x63, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e,
|
0x75, 0x65, 0x75, 0x65, 0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x0a, 0x66, 0x5f,
|
||||||
0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x76, 0x69,
|
0x63, 0x6e, 0x74, 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08,
|
||||||
0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e,
|
0x66, 0x43, 0x6e, 0x74, 0x44, 0x6f, 0x77, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x61, 0x74, 0x65,
|
||||||
0x66, 0x6f, 0x12, 0x22, 0x0a, 0x0d, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f, 0x69, 0x74, 0x65, 0x6d,
|
0x77, 0x61, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x61,
|
||||||
0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x71, 0x75, 0x65, 0x75, 0x65,
|
0x74, 0x65, 0x77, 0x61, 0x79, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x69, 0x6e,
|
||||||
0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x22, 0x0a, 0x0c, 0x61, 0x63, 0x6b, 0x6e, 0x6f, 0x77,
|
0x66, 0x6f, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x77, 0x2e, 0x44, 0x6f,
|
||||||
0x6c, 0x65, 0x64, 0x67, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x61, 0x63,
|
0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x54, 0x78, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x74, 0x78,
|
||||||
0x6b, 0x6e, 0x6f, 0x77, 0x6c, 0x65, 0x64, 0x67, 0x65, 0x64, 0x12, 0x1c, 0x0a, 0x0a, 0x66, 0x5f,
|
0x49, 0x6e, 0x66, 0x6f, 0x22, 0xe7, 0x02, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x45, 0x76, 0x65, 0x6e,
|
||||||
0x63, 0x6e, 0x74, 0x5f, 0x64, 0x6f, 0x77, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08,
|
0x74, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||||
0x66, 0x43, 0x6e, 0x74, 0x44, 0x6f, 0x77, 0x6e, 0x22, 0xa5, 0x02, 0x0a, 0x0a, 0x54, 0x78, 0x41,
|
0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
|
||||||
0x63, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x64, 0x6f, 0x77, 0x6e, 0x6c,
|
0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, 0x74, 0x69, 0x6d,
|
||||||
0x69, 0x6e, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0a, 0x64, 0x6f,
|
0x65, 0x12, 0x38, 0x0a, 0x0b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f,
|
||||||
0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65,
|
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61,
|
||||||
0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
|
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52,
|
||||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
|
0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2b, 0x0a, 0x05, 0x6c,
|
||||||
0x6d, 0x70, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x64, 0x65, 0x76, 0x69,
|
0x65, 0x76, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x69, 0x6e, 0x74,
|
||||||
0x63, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e,
|
0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65,
|
||||||
0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x76, 0x69,
|
0x6c, 0x52, 0x05, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x28, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65,
|
||||||
0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e,
|
0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61,
|
||||||
0x66, 0x6f, 0x12, 0x22, 0x0a, 0x0d, 0x71, 0x75, 0x65, 0x75, 0x65, 0x5f, 0x69, 0x74, 0x65, 0x6d,
|
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f,
|
||||||
0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x71, 0x75, 0x65, 0x75, 0x65,
|
0x64, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,
|
||||||
0x49, 0x74, 0x65, 0x6d, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x0a, 0x66, 0x5f, 0x63, 0x6e, 0x74, 0x5f,
|
0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
|
||||||
0x64, 0x6f, 0x77, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x66, 0x43, 0x6e, 0x74,
|
0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3c, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x18,
|
||||||
0x44, 0x6f, 0x77, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f,
|
0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74,
|
||||||
0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61,
|
0x69, 0x6f, 0x6e, 0x2e, 0x4c, 0x6f, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x2e, 0x43, 0x6f, 0x6e,
|
||||||
0x79, 0x49, 0x64, 0x12, 0x2b, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x07,
|
0x74, 0x65, 0x78, 0x74, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65,
|
||||||
0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x67, 0x77, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x69,
|
0x78, 0x74, 0x1a, 0x3a, 0x0a, 0x0c, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x45, 0x6e, 0x74,
|
||||||
0x6e, 0x6b, 0x54, 0x78, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x06, 0x74, 0x78, 0x49, 0x6e, 0x66, 0x6f,
|
0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||||
0x22, 0xe7, 0x02, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x2e, 0x0a,
|
0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20,
|
||||||
0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f,
|
0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xcf,
|
||||||
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69,
|
0x02, 0x0a, 0x0b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x29,
|
||||||
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,
|
|
||||||
0x0a, 0x10, 0x64, 0x65, 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
|
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, 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,
|
0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x69, 0x6d,
|
||||||
@ -1535,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,
|
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,
|
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,
|
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,
|
0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x18, 0x05, 0x20,
|
||||||
0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4c,
|
0x01, 0x28, 0x05, 0x52, 0x06, 0x6d, 0x61, 0x72, 0x67, 0x69, 0x6e, 0x12, 0x32, 0x0a, 0x15, 0x65,
|
||||||
0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f,
|
0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x5f, 0x73, 0x6f,
|
||||||
0x6e, 0x22, 0xa2, 0x02, 0x0a, 0x10, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f,
|
0x75, 0x72, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x65, 0x78, 0x74, 0x65,
|
||||||
0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x64, 0x65, 0x64, 0x75, 0x70, 0x6c,
|
0x72, 0x6e, 0x61, 0x6c, 0x50, 0x6f, 0x77, 0x65, 0x72, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12,
|
||||||
0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
|
0x3a, 0x0a, 0x19, 0x62, 0x61, 0x74, 0x74, 0x65, 0x72, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c,
|
||||||
0x52, 0x0f, 0x64, 0x65, 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49,
|
0x5f, 0x75, 0x6e, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x07, 0x20, 0x01,
|
||||||
0x64, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
0x28, 0x08, 0x52, 0x17, 0x62, 0x61, 0x74, 0x74, 0x65, 0x72, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c,
|
||||||
0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
|
0x55, 0x6e, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x62,
|
||||||
0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, 0x74, 0x69, 0x6d,
|
0x61, 0x74, 0x74, 0x65, 0x72, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x08, 0x20, 0x01,
|
||||||
0x65, 0x12, 0x38, 0x0a, 0x0b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f,
|
0x28, 0x02, 0x52, 0x0c, 0x62, 0x61, 0x74, 0x74, 0x65, 0x72, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c,
|
||||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61,
|
0x22, 0xd2, 0x01, 0x0a, 0x0d, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65,
|
||||||
0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52,
|
0x6e, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x64, 0x65, 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,
|
||||||
0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x29, 0x0a, 0x10, 0x69,
|
0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x65,
|
||||||
0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18,
|
0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2e, 0x0a,
|
||||||
0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69,
|
0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f,
|
||||||
0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f,
|
0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69,
|
||||||
0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x65, 0x76, 0x65, 0x6e,
|
0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x38, 0x0a,
|
||||||
0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18,
|
0x0b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01,
|
||||||
0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
|
0x28, 0x0b, 0x32, 0x17, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
||||||
0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x06,
|
0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x64, 0x65, 0x76,
|
||||||
0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0xb4, 0x01, 0x0a, 0x0f, 0x44, 0x6f, 0x77, 0x6e, 0x6c,
|
0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x2c, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74,
|
||||||
0x69, 0x6e, 0x6b, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
|
0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x63, 0x6f, 0x6d, 0x6d,
|
||||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x64, 0x65,
|
0x6f, 0x6e, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c, 0x6f, 0x63,
|
||||||
0x76, 0x5f, 0x65, 0x75, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x76,
|
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa2, 0x02, 0x0a, 0x10, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72,
|
||||||
0x45, 0x75, 0x69, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64,
|
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x64, 0x65,
|
||||||
0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65,
|
0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01,
|
||||||
0x64, 0x12, 0x15, 0x0a, 0x06, 0x66, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28,
|
0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x64, 0x65, 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74,
|
||||||
0x0d, 0x52, 0x05, 0x66, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61,
|
0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20,
|
||||||
0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x2f, 0x0a, 0x06,
|
0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
|
||||||
0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67,
|
0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52,
|
||||||
0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53,
|
0x04, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x0b, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x5f,
|
||||||
0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2a, 0x2c, 0x0a,
|
0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x69, 0x6e, 0x74,
|
||||||
0x08, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x4e, 0x46,
|
0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49,
|
||||||
0x4f, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x57, 0x41, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x10, 0x01,
|
0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x64, 0x65, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12,
|
||||||
0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x2a, 0xf7, 0x01, 0x0a, 0x07,
|
0x29, 0x0a, 0x10, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e,
|
||||||
0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f,
|
0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x69, 0x6e, 0x74, 0x65, 0x67,
|
||||||
0x57, 0x4e, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x44, 0x4f, 0x57, 0x4e, 0x4c, 0x49, 0x4e, 0x4b,
|
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x76,
|
||||||
0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x53, 0x49, 0x5a, 0x45, 0x10, 0x01, 0x12,
|
0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
|
||||||
0x10, 0x0a, 0x0c, 0x55, 0x50, 0x4c, 0x49, 0x4e, 0x4b, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x43, 0x10,
|
0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2f, 0x0a, 0x06, 0x6f, 0x62, 0x6a,
|
||||||
0x02, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x4f, 0x57, 0x4e, 0x4c, 0x49, 0x4e, 0x4b, 0x5f, 0x43, 0x4f,
|
0x65, 0x63, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
|
||||||
0x44, 0x45, 0x43, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x4f, 0x54, 0x41, 0x41, 0x10, 0x04, 0x12,
|
0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75,
|
||||||
0x16, 0x0a, 0x12, 0x55, 0x50, 0x4c, 0x49, 0x4e, 0x4b, 0x5f, 0x46, 0x5f, 0x43, 0x4e, 0x54, 0x5f,
|
0x63, 0x74, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0xb4, 0x01, 0x0a, 0x0f, 0x44,
|
||||||
0x52, 0x45, 0x53, 0x45, 0x54, 0x10, 0x05, 0x12, 0x0e, 0x0a, 0x0a, 0x55, 0x50, 0x4c, 0x49, 0x4e,
|
0x6f, 0x77, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x12, 0x0e,
|
||||||
0x4b, 0x5f, 0x4d, 0x49, 0x43, 0x10, 0x06, 0x12, 0x1f, 0x0a, 0x1b, 0x55, 0x50, 0x4c, 0x49, 0x4e,
|
0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x17,
|
||||||
0x4b, 0x5f, 0x46, 0x5f, 0x43, 0x4e, 0x54, 0x5f, 0x52, 0x45, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x4d,
|
0x0a, 0x07, 0x64, 0x65, 0x76, 0x5f, 0x65, 0x75, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||||
0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x10, 0x07, 0x12, 0x14, 0x0a, 0x10, 0x44, 0x4f, 0x57, 0x4e,
|
0x06, 0x64, 0x65, 0x76, 0x45, 0x75, 0x69, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x6f, 0x6e, 0x66, 0x69,
|
||||||
0x4c, 0x49, 0x4e, 0x4b, 0x5f, 0x47, 0x41, 0x54, 0x45, 0x57, 0x41, 0x59, 0x10, 0x08, 0x12, 0x18,
|
0x72, 0x6d, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x63, 0x6f, 0x6e, 0x66,
|
||||||
0x0a, 0x14, 0x52, 0x45, 0x4c, 0x41, 0x59, 0x5f, 0x4e, 0x45, 0x57, 0x5f, 0x45, 0x4e, 0x44, 0x5f,
|
0x69, 0x72, 0x6d, 0x65, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x66, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18,
|
||||||
0x44, 0x45, 0x56, 0x49, 0x43, 0x45, 0x10, 0x09, 0x12, 0x0e, 0x0a, 0x0a, 0x46, 0x5f, 0x43, 0x4e,
|
0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x66, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x12, 0x0a, 0x04,
|
||||||
0x54, 0x5f, 0x44, 0x4f, 0x57, 0x4e, 0x10, 0x0a, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x58, 0x50, 0x49,
|
0x64, 0x61, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61,
|
||||||
0x52, 0x45, 0x44, 0x10, 0x0b, 0x42, 0xbf, 0x01, 0x0a, 0x1d, 0x69, 0x6f, 0x2e, 0x63, 0x68, 0x69,
|
0x12, 0x2f, 0x0a, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b,
|
||||||
0x72, 0x70, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x69, 0x6e, 0x74, 0x65,
|
0x32, 0x17, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
|
||||||
0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x10, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61,
|
0x75, 0x66, 0x2e, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x52, 0x06, 0x6f, 0x62, 0x6a, 0x65, 0x63,
|
||||||
0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x33, 0x67, 0x69, 0x74,
|
0x74, 0x2a, 0x2c, 0x0a, 0x08, 0x4c, 0x6f, 0x67, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x12, 0x08, 0x0a,
|
||||||
0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x72, 0x6f, 0x63, 0x61, 0x61, 0x72, 0x2f,
|
0x04, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x57, 0x41, 0x52, 0x4e, 0x49,
|
||||||
0x63, 0x68, 0x69, 0x72, 0x70, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67,
|
0x4e, 0x47, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x2a,
|
||||||
0x6f, 0x2f, 0x76, 0x34, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
0xf7, 0x01, 0x0a, 0x07, 0x4c, 0x6f, 0x67, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55,
|
||||||
0xaa, 0x02, 0x16, 0x43, 0x68, 0x69, 0x72, 0x70, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x2e, 0x49, 0x6e,
|
0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x44, 0x4f, 0x57, 0x4e,
|
||||||
0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xca, 0x02, 0x16, 0x43, 0x68, 0x69, 0x72,
|
0x4c, 0x49, 0x4e, 0x4b, 0x5f, 0x50, 0x41, 0x59, 0x4c, 0x4f, 0x41, 0x44, 0x5f, 0x53, 0x49, 0x5a,
|
||||||
0x70, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x5c, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x74, 0x69,
|
0x45, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x55, 0x50, 0x4c, 0x49, 0x4e, 0x4b, 0x5f, 0x43, 0x4f,
|
||||||
0x6f, 0x6e, 0xe2, 0x02, 0x22, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
|
0x44, 0x45, 0x43, 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x44, 0x4f, 0x57, 0x4e, 0x4c, 0x49, 0x4e,
|
||||||
0x5c, 0x43, 0x68, 0x69, 0x72, 0x70, 0x73, 0x74, 0x61, 0x63, 0x6b, 0x5c, 0x49, 0x6e, 0x74, 0x65,
|
0x4b, 0x5f, 0x43, 0x4f, 0x44, 0x45, 0x43, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x4f, 0x54, 0x41,
|
||||||
0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
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 (
|
var (
|
||||||
@ -1615,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_enumTypes = make([]protoimpl.EnumInfo, 2)
|
||||||
var file_integration_integration_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
|
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
|
(LogLevel)(0), // 0: integration.LogLevel
|
||||||
(LogCode)(0), // 1: integration.LogCode
|
(LogCode)(0), // 1: integration.LogCode
|
||||||
(*DeviceInfo)(nil), // 2: integration.DeviceInfo
|
(*DeviceInfo)(nil), // 2: integration.DeviceInfo
|
||||||
@ -1685,140 +1689,6 @@ func file_integration_integration_proto_init() {
|
|||||||
if File_integration_integration_proto != nil {
|
if File_integration_integration_proto != nil {
|
||||||
return
|
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{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
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.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.34.1
|
// protoc-gen-go v1.35.1
|
||||||
// protoc v4.24.4
|
// protoc v5.28.3
|
||||||
// source: stream/api_request.proto
|
// source: stream/api_request.proto
|
||||||
|
|
||||||
package stream
|
package stream
|
||||||
@ -38,11 +38,9 @@ type ApiRequestLog struct {
|
|||||||
|
|
||||||
func (x *ApiRequestLog) Reset() {
|
func (x *ApiRequestLog) Reset() {
|
||||||
*x = ApiRequestLog{}
|
*x = ApiRequestLog{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_stream_api_request_proto_msgTypes[0]
|
||||||
mi := &file_stream_api_request_proto_msgTypes[0]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ApiRequestLog) String() string {
|
func (x *ApiRequestLog) String() string {
|
||||||
@ -53,7 +51,7 @@ func (*ApiRequestLog) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *ApiRequestLog) ProtoReflect() protoreflect.Message {
|
func (x *ApiRequestLog) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_stream_api_request_proto_msgTypes[0]
|
mi := &file_stream_api_request_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
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_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
|
(*ApiRequestLog)(nil), // 0: stream.ApiRequestLog
|
||||||
nil, // 1: stream.ApiRequestLog.MetadataEntry
|
nil, // 1: stream.ApiRequestLog.MetadataEntry
|
||||||
}
|
}
|
||||||
@ -155,20 +153,6 @@ func file_stream_api_request_proto_init() {
|
|||||||
if File_stream_api_request_proto != nil {
|
if File_stream_api_request_proto != nil {
|
||||||
return
|
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{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
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.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.34.1
|
// protoc-gen-go v1.35.1
|
||||||
// protoc v4.24.4
|
// protoc v5.28.3
|
||||||
// source: stream/backend_interfaces.proto
|
// source: stream/backend_interfaces.proto
|
||||||
|
|
||||||
package stream
|
package stream
|
||||||
@ -48,11 +48,9 @@ type BackendInterfacesRequest struct {
|
|||||||
|
|
||||||
func (x *BackendInterfacesRequest) Reset() {
|
func (x *BackendInterfacesRequest) Reset() {
|
||||||
*x = BackendInterfacesRequest{}
|
*x = BackendInterfacesRequest{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_stream_backend_interfaces_proto_msgTypes[0]
|
||||||
mi := &file_stream_backend_interfaces_proto_msgTypes[0]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *BackendInterfacesRequest) String() string {
|
func (x *BackendInterfacesRequest) String() string {
|
||||||
@ -63,7 +61,7 @@ func (*BackendInterfacesRequest) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *BackendInterfacesRequest) ProtoReflect() protoreflect.Message {
|
func (x *BackendInterfacesRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_stream_backend_interfaces_proto_msgTypes[0]
|
mi := &file_stream_backend_interfaces_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
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_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
|
(*BackendInterfacesRequest)(nil), // 0: stream.BackendInterfacesRequest
|
||||||
(*timestamppb.Timestamp)(nil), // 1: google.protobuf.Timestamp
|
(*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 {
|
if File_stream_backend_interfaces_proto != nil {
|
||||||
return
|
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{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
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.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.34.1
|
// protoc-gen-go v1.35.1
|
||||||
// protoc v4.24.4
|
// protoc v5.28.3
|
||||||
// source: stream/frame.proto
|
// source: stream/frame.proto
|
||||||
|
|
||||||
package stream
|
package stream
|
||||||
@ -50,11 +50,9 @@ type UplinkFrameLog struct {
|
|||||||
|
|
||||||
func (x *UplinkFrameLog) Reset() {
|
func (x *UplinkFrameLog) Reset() {
|
||||||
*x = UplinkFrameLog{}
|
*x = UplinkFrameLog{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_stream_frame_proto_msgTypes[0]
|
||||||
mi := &file_stream_frame_proto_msgTypes[0]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UplinkFrameLog) String() string {
|
func (x *UplinkFrameLog) String() string {
|
||||||
@ -65,7 +63,7 @@ func (*UplinkFrameLog) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *UplinkFrameLog) ProtoReflect() protoreflect.Message {
|
func (x *UplinkFrameLog) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_stream_frame_proto_msgTypes[0]
|
mi := &file_stream_frame_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -172,11 +170,9 @@ type DownlinkFrameLog struct {
|
|||||||
|
|
||||||
func (x *DownlinkFrameLog) Reset() {
|
func (x *DownlinkFrameLog) Reset() {
|
||||||
*x = DownlinkFrameLog{}
|
*x = DownlinkFrameLog{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_stream_frame_proto_msgTypes[1]
|
||||||
mi := &file_stream_frame_proto_msgTypes[1]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DownlinkFrameLog) String() string {
|
func (x *DownlinkFrameLog) String() string {
|
||||||
@ -187,7 +183,7 @@ func (*DownlinkFrameLog) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *DownlinkFrameLog) ProtoReflect() protoreflect.Message {
|
func (x *DownlinkFrameLog) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_stream_frame_proto_msgTypes[1]
|
mi := &file_stream_frame_proto_msgTypes[1]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
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_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||||
var file_stream_frame_proto_goTypes = []interface{}{
|
var file_stream_frame_proto_goTypes = []any{
|
||||||
(*UplinkFrameLog)(nil), // 0: stream.UplinkFrameLog
|
(*UplinkFrameLog)(nil), // 0: stream.UplinkFrameLog
|
||||||
(*DownlinkFrameLog)(nil), // 1: stream.DownlinkFrameLog
|
(*DownlinkFrameLog)(nil), // 1: stream.DownlinkFrameLog
|
||||||
(*gw.UplinkTxInfo)(nil), // 2: gw.UplinkTxInfo
|
(*gw.UplinkTxInfo)(nil), // 2: gw.UplinkTxInfo
|
||||||
@ -384,32 +380,6 @@ func file_stream_frame_proto_init() {
|
|||||||
if File_stream_frame_proto != nil {
|
if File_stream_frame_proto != nil {
|
||||||
return
|
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{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
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.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.34.1
|
// protoc-gen-go v1.35.1
|
||||||
// protoc v4.24.4
|
// protoc v5.28.3
|
||||||
// source: stream/meta.proto
|
// source: stream/meta.proto
|
||||||
|
|
||||||
package stream
|
package stream
|
||||||
@ -45,11 +45,9 @@ type UplinkMeta struct {
|
|||||||
|
|
||||||
func (x *UplinkMeta) Reset() {
|
func (x *UplinkMeta) Reset() {
|
||||||
*x = UplinkMeta{}
|
*x = UplinkMeta{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_stream_meta_proto_msgTypes[0]
|
||||||
mi := &file_stream_meta_proto_msgTypes[0]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *UplinkMeta) String() string {
|
func (x *UplinkMeta) String() string {
|
||||||
@ -60,7 +58,7 @@ func (*UplinkMeta) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *UplinkMeta) ProtoReflect() protoreflect.Message {
|
func (x *UplinkMeta) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_stream_meta_proto_msgTypes[0]
|
mi := &file_stream_meta_proto_msgTypes[0]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
@ -149,11 +147,9 @@ type DownlinkMeta struct {
|
|||||||
|
|
||||||
func (x *DownlinkMeta) Reset() {
|
func (x *DownlinkMeta) Reset() {
|
||||||
*x = DownlinkMeta{}
|
*x = DownlinkMeta{}
|
||||||
if protoimpl.UnsafeEnabled {
|
mi := &file_stream_meta_proto_msgTypes[1]
|
||||||
mi := &file_stream_meta_proto_msgTypes[1]
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms.StoreMessageInfo(mi)
|
||||||
ms.StoreMessageInfo(mi)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DownlinkMeta) String() string {
|
func (x *DownlinkMeta) String() string {
|
||||||
@ -164,7 +160,7 @@ func (*DownlinkMeta) ProtoMessage() {}
|
|||||||
|
|
||||||
func (x *DownlinkMeta) ProtoReflect() protoreflect.Message {
|
func (x *DownlinkMeta) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_stream_meta_proto_msgTypes[1]
|
mi := &file_stream_meta_proto_msgTypes[1]
|
||||||
if protoimpl.UnsafeEnabled && x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
ms.StoreMessageInfo(mi)
|
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_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||||
var file_stream_meta_proto_goTypes = []interface{}{
|
var file_stream_meta_proto_goTypes = []any{
|
||||||
(*UplinkMeta)(nil), // 0: stream.UplinkMeta
|
(*UplinkMeta)(nil), // 0: stream.UplinkMeta
|
||||||
(*DownlinkMeta)(nil), // 1: stream.DownlinkMeta
|
(*DownlinkMeta)(nil), // 1: stream.DownlinkMeta
|
||||||
(*gw.UplinkTxInfo)(nil), // 2: gw.UplinkTxInfo
|
(*gw.UplinkTxInfo)(nil), // 2: gw.UplinkTxInfo
|
||||||
@ -340,32 +336,6 @@ func file_stream_meta_proto_init() {
|
|||||||
if File_stream_meta_proto != nil {
|
if File_stream_meta_proto != nil {
|
||||||
return
|
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{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
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/gateway.proto
|
||||||
$(PROTOC_PATH) $(PROTOC_ARGS) ../proto/api/multicast_group.proto
|
$(PROTOC_PATH) $(PROTOC_ARGS) ../proto/api/multicast_group.proto
|
||||||
$(PROTOC_PATH) $(PROTOC_ARGS) ../proto/api/relay.proto
|
$(PROTOC_PATH) $(PROTOC_ARGS) ../proto/api/relay.proto
|
||||||
|
$(PROTOC_PATH) $(PROTOC_ARGS) ../proto/api/fuota.proto
|
||||||
|
|
||||||
integration:
|
integration:
|
||||||
mkdir -p 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",
|
"name": "@chirpstack/chirpstack-api-grpc-web",
|
||||||
"version": "4.10.1",
|
"version": "4.12.0",
|
||||||
"description": "Chirpstack gRPC-web API",
|
"description": "Chirpstack gRPC-web API",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
2
api/java/build.gradle.kts
vendored
2
api/java/build.gradle.kts
vendored
@ -8,7 +8,7 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
group = "io.chirpstack"
|
group = "io.chirpstack"
|
||||||
version = "4.10.1"
|
version = "4.12.0"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
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/gateway.proto
|
||||||
$(PROTOC_PATH) ${PROTOC_GRPC_ARGS} ../proto/api/multicast_group.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/relay.proto
|
||||||
|
$(PROTOC_PATH) ${PROTOC_GRPC_ARGS} ../proto/api/fuota.proto
|
||||||
|
|
||||||
integration:
|
integration:
|
||||||
$(PROTOC_PATH) ${PROTOC_ARGS} ../proto/integration/integration.proto
|
$(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",
|
"name": "@chirpstack/chirpstack-api",
|
||||||
"version": "4.10.1",
|
"version": "4.12.0",
|
||||||
"description": "Chirpstack JS and TS API",
|
"description": "Chirpstack JS and TS API",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
2
api/kotlin/build.gradle.kts
vendored
2
api/kotlin/build.gradle.kts
vendored
@ -9,7 +9,7 @@ plugins {
|
|||||||
}
|
}
|
||||||
|
|
||||||
group = "io.chirpstack"
|
group = "io.chirpstack"
|
||||||
version = "4.10.1"
|
version = "4.12.0"
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
2
api/php/composer.json
vendored
2
api/php/composer.json
vendored
@ -3,7 +3,7 @@
|
|||||||
"description": "Chirpstack PHP API",
|
"description": "Chirpstack PHP API",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"version": "4.10.1",
|
"version": "4.12.0",
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=7.0.0",
|
"php": ">=7.0.0",
|
||||||
"grpc/grpc": "^v1.57.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"
|
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 {
|
enum Encoding {
|
||||||
@ -529,6 +543,7 @@ message DeleteApplicationRequest {
|
|||||||
|
|
||||||
message ListApplicationsRequest {
|
message ListApplicationsRequest {
|
||||||
// Max number of applications to return in the result-set.
|
// 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;
|
uint32 limit = 1;
|
||||||
|
|
||||||
// Offset in the result-set (for pagination).
|
// Offset in the result-set (for pagination).
|
||||||
@ -1098,3 +1113,39 @@ message GenerateMqttIntegrationClientCertificateResponse {
|
|||||||
// Expires at defines the expiration date of the certificate.
|
// Expires at defines the expiration date of the certificate.
|
||||||
google.protobuf.Timestamp expires_at = 4;
|
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.
|
// Device status.
|
||||||
DeviceStatus device_status = 9;
|
DeviceStatus device_status = 9;
|
||||||
|
|
||||||
|
// Device tags.
|
||||||
|
map<string, string> tags = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
message DeviceKeys {
|
message DeviceKeys {
|
||||||
@ -275,6 +278,11 @@ message DeviceKeys {
|
|||||||
// Application root key (128 bit).
|
// Application root key (128 bit).
|
||||||
// Note: This field only needs to be set for LoRaWAN 1.1.x devices!
|
// Note: This field only needs to be set for LoRaWAN 1.1.x devices!
|
||||||
string app_key = 3;
|
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 {
|
message CreateDeviceRequest {
|
||||||
@ -319,6 +327,7 @@ message DeleteDeviceRequest {
|
|||||||
|
|
||||||
message ListDevicesRequest {
|
message ListDevicesRequest {
|
||||||
// Max number of devices to return in the result-set.
|
// 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;
|
uint32 limit = 1;
|
||||||
|
|
||||||
// Offset in the result-set (for pagination).
|
// Offset in the result-set (for pagination).
|
||||||
@ -332,6 +341,25 @@ message ListDevicesRequest {
|
|||||||
|
|
||||||
// Multicst-group ID (UUID) to filter devices on.
|
// Multicst-group ID (UUID) to filter devices on.
|
||||||
string multicast_group_id = 5;
|
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 {
|
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;
|
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
|
// DeviceProfileService is the service providing API methods for managing
|
||||||
// device-profiles.
|
// device-profiles.
|
||||||
service DeviceProfileService {
|
service DeviceProfileService {
|
||||||
@ -421,6 +454,9 @@ message DeviceProfile {
|
|||||||
// it.
|
// it.
|
||||||
// Valid options are 1 - 15 (0 = always use system RX1 Delay).
|
// Valid options are 1 - 15 (0 = always use system RX1 Delay).
|
||||||
uint32 rx1_delay = 53;
|
uint32 rx1_delay = 53;
|
||||||
|
|
||||||
|
// Application Layer parameters.
|
||||||
|
AppLayerParams app_layer_params = 54;
|
||||||
}
|
}
|
||||||
|
|
||||||
message Measurement {
|
message Measurement {
|
||||||
@ -431,6 +467,26 @@ message Measurement {
|
|||||||
MeasurementKind kind = 3;
|
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 {
|
message DeviceProfileListItem {
|
||||||
// Device-profile ID (UUID).
|
// Device-profile ID (UUID).
|
||||||
string id = 1;
|
string id = 1;
|
||||||
@ -501,6 +557,7 @@ message DeleteDeviceProfileRequest {
|
|||||||
|
|
||||||
message ListDeviceProfilesRequest {
|
message ListDeviceProfilesRequest {
|
||||||
// Max number of device-profiles to return in the result-set.
|
// 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;
|
uint32 limit = 1;
|
||||||
|
|
||||||
// Offset in the result-set (for pagination).
|
// 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 {
|
message ListDeviceProfileTemplatesRequest {
|
||||||
// Max number of device-profile templates to return in the result-set.
|
// 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;
|
uint32 limit = 1;
|
||||||
|
|
||||||
// Offset in the result-set (for pagination).
|
// 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 {
|
message ListGatewaysRequest {
|
||||||
// Max number of gateways to return in the result-set.
|
// 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;
|
uint32 limit = 1;
|
||||||
|
|
||||||
// Offset in the result-set (for pagination).
|
// Offset in the result-set (for pagination).
|
||||||
@ -229,6 +230,18 @@ message ListGatewaysRequest {
|
|||||||
|
|
||||||
// Multicast-group ID (UUID) to filter gateways on.
|
// Multicast-group ID (UUID) to filter gateways on.
|
||||||
string multicast_group_id = 5;
|
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 {
|
message ListGatewaysResponse {
|
||||||
@ -338,6 +351,7 @@ message GetRelayGatewayResponse {
|
|||||||
|
|
||||||
message ListRelayGatewaysRequest {
|
message ListRelayGatewaysRequest {
|
||||||
// Max number of relay-gateways to return in the result-set.
|
// 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;
|
uint32 limit = 1;
|
||||||
|
|
||||||
// Offset in the result-set (for pagination).
|
// 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 {
|
message ListApiKeysRequest {
|
||||||
// Max number of items to return.
|
// 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;
|
uint32 limit = 1;
|
||||||
|
|
||||||
// Offset in the result-set (for pagination).
|
// Offset in the result-set (for pagination).
|
||||||
@ -177,6 +178,7 @@ message GlobalSearchRequest {
|
|||||||
string search = 1;
|
string search = 1;
|
||||||
|
|
||||||
// Max number of results to return.
|
// 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;
|
int64 limit = 2;
|
||||||
|
|
||||||
// Offset offset of the result-set (for pagination).
|
// 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 {
|
message ListMulticastGroupsRequest {
|
||||||
// Max number of multicast groups to return in the result-set.
|
// 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;
|
uint32 limit = 1;
|
||||||
|
|
||||||
// Offset in the result-set (for pagination).
|
// 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 {
|
message ListRelaysRequest {
|
||||||
// Max number of devices to return in the result-set.
|
// 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;
|
uint32 limit = 1;
|
||||||
|
|
||||||
// Offset in the result-set (for pagination).
|
// Offset in the result-set (for pagination).
|
||||||
@ -92,6 +93,7 @@ message RemoveRelayDeviceRequest {
|
|||||||
|
|
||||||
message ListRelayDevicesRequest {
|
message ListRelayDevicesRequest {
|
||||||
// Max number of multicast groups to return in the result-set.
|
// 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;
|
uint32 limit = 1;
|
||||||
|
|
||||||
// Offset in the result-set (for pagination).
|
// 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 {
|
message ListTenantsRequest {
|
||||||
// Max number of tenants to return in the result-set.
|
// 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;
|
uint32 limit = 1;
|
||||||
|
|
||||||
// Offset in the result-set (for pagination).
|
// Offset in the result-set (for pagination).
|
||||||
@ -313,6 +314,7 @@ message ListTenantUsersRequest {
|
|||||||
string tenant_id = 1;
|
string tenant_id = 1;
|
||||||
|
|
||||||
// Max number of tenants to return in the result-set.
|
// 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;
|
uint32 limit = 2;
|
||||||
|
|
||||||
// Offset in the result-set (for pagination).
|
// 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 {
|
message ListUsersRequest {
|
||||||
// Max number of tenants to return in the result-set.
|
// 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;
|
uint32 limit = 1;
|
||||||
|
|
||||||
// Offset in the result-set (for pagination).
|
// 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 AppSKey and that the encryption / decryption of the payloads is
|
||||||
// the responsibility of the end-application.
|
// the responsibility of the end-application.
|
||||||
common.JoinServerContext join_server_context = 15;
|
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.
|
// 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 AppSKey and that the encryption / decryption of the payloads is
|
||||||
// the responsibility of the end-application.
|
// the responsibility of the end-application.
|
||||||
common.JoinServerContext join_server_context = 6;
|
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
|
// 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(
|
setup(
|
||||||
name='chirpstack-api',
|
name='chirpstack-api',
|
||||||
version = "4.10.1",
|
version = "4.12.0",
|
||||||
url='https://github.com/brocaar/chirpstack-api',
|
url='https://github.com/brocaar/chirpstack-api',
|
||||||
author='Orne Brocaar',
|
author='Orne Brocaar',
|
||||||
author_email='info@brocaar.com',
|
author_email='info@brocaar.com',
|
||||||
|
11
api/rust/Cargo.toml
vendored
11
api/rust/Cargo.toml
vendored
@ -1,7 +1,7 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "chirpstack_api"
|
name = "chirpstack_api"
|
||||||
description = "ChirpStack Protobuf / gRPC API definitions."
|
description = "ChirpStack Protobuf / gRPC API definitions."
|
||||||
version = "4.10.1"
|
version = "4.12.0"
|
||||||
authors = ["Orne Brocaar <info@brocaar.com>"]
|
authors = ["Orne Brocaar <info@brocaar.com>"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
homepage = "https://www.chirpstack.io"
|
homepage = "https://www.chirpstack.io"
|
||||||
@ -18,19 +18,18 @@
|
|||||||
prost = "0.13"
|
prost = "0.13"
|
||||||
prost-types = "0.13"
|
prost-types = "0.13"
|
||||||
hex = "0.4"
|
hex = "0.4"
|
||||||
rand = "0.8"
|
rand = "0.9"
|
||||||
|
tonic = { version = "0.13", features = [
|
||||||
tonic = { version = "0.12", features = [
|
|
||||||
"codegen",
|
"codegen",
|
||||||
"prost",
|
"prost",
|
||||||
], default-features = false, optional = true }
|
], default-features = false, optional = true }
|
||||||
tokio = { version = "1.41", features = ["macros"], optional = true }
|
tokio = { version = "1.44", features = ["macros"], optional = true }
|
||||||
pbjson = { version = "0.7", optional = true }
|
pbjson = { version = "0.7", optional = true }
|
||||||
pbjson-types = { version = "0.7", optional = true }
|
pbjson-types = { version = "0.7", optional = true }
|
||||||
serde = { version = "1.0", optional = true }
|
serde = { version = "1.0", optional = true }
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
tonic-build = { version = "0.12", features = [
|
tonic-build = { version = "0.13", features = [
|
||||||
"prost",
|
"prost",
|
||||||
], default-features = false }
|
], default-features = false }
|
||||||
pbjson-build = "0.7"
|
pbjson-build = "0.7"
|
||||||
|
6
api/rust/build.rs
vendored
6
api/rust/build.rs
vendored
@ -82,11 +82,6 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
.extern_path(".google.protobuf", well_known_types_path)
|
.extern_path(".google.protobuf", well_known_types_path)
|
||||||
.extern_path(".common", "crate::common");
|
.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_protos(
|
builder.compile_protos(
|
||||||
&[cs_dir
|
&[cs_dir
|
||||||
.join("internal")
|
.join("internal")
|
||||||
@ -220,6 +215,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
.to_str()
|
.to_str()
|
||||||
.unwrap(),
|
.unwrap(),
|
||||||
cs_dir.join("api").join("relay.proto").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(),
|
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"
|
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 {
|
enum Encoding {
|
||||||
@ -529,6 +543,7 @@ message DeleteApplicationRequest {
|
|||||||
|
|
||||||
message ListApplicationsRequest {
|
message ListApplicationsRequest {
|
||||||
// Max number of applications to return in the result-set.
|
// 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;
|
uint32 limit = 1;
|
||||||
|
|
||||||
// Offset in the result-set (for pagination).
|
// Offset in the result-set (for pagination).
|
||||||
@ -1098,3 +1113,39 @@ message GenerateMqttIntegrationClientCertificateResponse {
|
|||||||
// Expires at defines the expiration date of the certificate.
|
// Expires at defines the expiration date of the certificate.
|
||||||
google.protobuf.Timestamp expires_at = 4;
|
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.
|
// Device status.
|
||||||
DeviceStatus device_status = 9;
|
DeviceStatus device_status = 9;
|
||||||
|
|
||||||
|
// Device tags.
|
||||||
|
map<string, string> tags = 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
message DeviceKeys {
|
message DeviceKeys {
|
||||||
@ -275,6 +278,11 @@ message DeviceKeys {
|
|||||||
// Application root key (128 bit).
|
// Application root key (128 bit).
|
||||||
// Note: This field only needs to be set for LoRaWAN 1.1.x devices!
|
// Note: This field only needs to be set for LoRaWAN 1.1.x devices!
|
||||||
string app_key = 3;
|
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 {
|
message CreateDeviceRequest {
|
||||||
@ -319,6 +327,7 @@ message DeleteDeviceRequest {
|
|||||||
|
|
||||||
message ListDevicesRequest {
|
message ListDevicesRequest {
|
||||||
// Max number of devices to return in the result-set.
|
// 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;
|
uint32 limit = 1;
|
||||||
|
|
||||||
// Offset in the result-set (for pagination).
|
// Offset in the result-set (for pagination).
|
||||||
@ -332,6 +341,25 @@ message ListDevicesRequest {
|
|||||||
|
|
||||||
// Multicst-group ID (UUID) to filter devices on.
|
// Multicst-group ID (UUID) to filter devices on.
|
||||||
string multicast_group_id = 5;
|
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 {
|
message ListDevicesResponse {
|
||||||
|
@ -98,6 +98,39 @@ enum RelayModeActivation {
|
|||||||
END_DEVICE_CONTROLLED = 3;
|
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
|
// DeviceProfileService is the service providing API methods for managing
|
||||||
// device-profiles.
|
// device-profiles.
|
||||||
service DeviceProfileService {
|
service DeviceProfileService {
|
||||||
@ -421,6 +454,9 @@ message DeviceProfile {
|
|||||||
// it.
|
// it.
|
||||||
// Valid options are 1 - 15 (0 = always use system RX1 Delay).
|
// Valid options are 1 - 15 (0 = always use system RX1 Delay).
|
||||||
uint32 rx1_delay = 53;
|
uint32 rx1_delay = 53;
|
||||||
|
|
||||||
|
// Application Layer parameters.
|
||||||
|
AppLayerParams app_layer_params = 54;
|
||||||
}
|
}
|
||||||
|
|
||||||
message Measurement {
|
message Measurement {
|
||||||
@ -431,6 +467,26 @@ message Measurement {
|
|||||||
MeasurementKind kind = 3;
|
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 {
|
message DeviceProfileListItem {
|
||||||
// Device-profile ID (UUID).
|
// Device-profile ID (UUID).
|
||||||
string id = 1;
|
string id = 1;
|
||||||
@ -501,6 +557,7 @@ message DeleteDeviceProfileRequest {
|
|||||||
|
|
||||||
message ListDeviceProfilesRequest {
|
message ListDeviceProfilesRequest {
|
||||||
// Max number of device-profiles to return in the result-set.
|
// 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;
|
uint32 limit = 1;
|
||||||
|
|
||||||
// Offset in the result-set (for pagination).
|
// Offset in the result-set (for pagination).
|
||||||
|
@ -231,6 +231,7 @@ message DeleteDeviceProfileTemplateRequest {
|
|||||||
|
|
||||||
message ListDeviceProfileTemplatesRequest {
|
message ListDeviceProfileTemplatesRequest {
|
||||||
// Max number of device-profile templates to return in the result-set.
|
// 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;
|
uint32 limit = 1;
|
||||||
|
|
||||||
// Offset in the result-set (for pagination).
|
// 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 {
|
message ListGatewaysRequest {
|
||||||
// Max number of gateways to return in the result-set.
|
// 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;
|
uint32 limit = 1;
|
||||||
|
|
||||||
// Offset in the result-set (for pagination).
|
// Offset in the result-set (for pagination).
|
||||||
@ -229,6 +230,18 @@ message ListGatewaysRequest {
|
|||||||
|
|
||||||
// Multicast-group ID (UUID) to filter gateways on.
|
// Multicast-group ID (UUID) to filter gateways on.
|
||||||
string multicast_group_id = 5;
|
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 {
|
message ListGatewaysResponse {
|
||||||
@ -338,6 +351,7 @@ message GetRelayGatewayResponse {
|
|||||||
|
|
||||||
message ListRelayGatewaysRequest {
|
message ListRelayGatewaysRequest {
|
||||||
// Max number of relay-gateways to return in the result-set.
|
// 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;
|
uint32 limit = 1;
|
||||||
|
|
||||||
// Offset in the result-set (for pagination).
|
// 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 {
|
message ListApiKeysRequest {
|
||||||
// Max number of items to return.
|
// 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;
|
uint32 limit = 1;
|
||||||
|
|
||||||
// Offset in the result-set (for pagination).
|
// Offset in the result-set (for pagination).
|
||||||
@ -177,6 +178,7 @@ message GlobalSearchRequest {
|
|||||||
string search = 1;
|
string search = 1;
|
||||||
|
|
||||||
// Max number of results to return.
|
// 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;
|
int64 limit = 2;
|
||||||
|
|
||||||
// Offset offset of the result-set (for pagination).
|
// Offset offset of the result-set (for pagination).
|
||||||
|
@ -237,6 +237,7 @@ message DeleteMulticastGroupRequest {
|
|||||||
|
|
||||||
message ListMulticastGroupsRequest {
|
message ListMulticastGroupsRequest {
|
||||||
// Max number of multicast groups to return in the result-set.
|
// 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;
|
uint32 limit = 1;
|
||||||
|
|
||||||
// Offset in the result-set (for pagination).
|
// 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 {
|
message ListRelaysRequest {
|
||||||
// Max number of devices to return in the result-set.
|
// 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;
|
uint32 limit = 1;
|
||||||
|
|
||||||
// Offset in the result-set (for pagination).
|
// Offset in the result-set (for pagination).
|
||||||
@ -92,6 +93,7 @@ message RemoveRelayDeviceRequest {
|
|||||||
|
|
||||||
message ListRelayDevicesRequest {
|
message ListRelayDevicesRequest {
|
||||||
// Max number of multicast groups to return in the result-set.
|
// 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;
|
uint32 limit = 1;
|
||||||
|
|
||||||
// Offset in the result-set (for pagination).
|
// 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 {
|
message ListTenantsRequest {
|
||||||
// Max number of tenants to return in the result-set.
|
// 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;
|
uint32 limit = 1;
|
||||||
|
|
||||||
// Offset in the result-set (for pagination).
|
// Offset in the result-set (for pagination).
|
||||||
@ -313,6 +314,7 @@ message ListTenantUsersRequest {
|
|||||||
string tenant_id = 1;
|
string tenant_id = 1;
|
||||||
|
|
||||||
// Max number of tenants to return in the result-set.
|
// 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;
|
uint32 limit = 2;
|
||||||
|
|
||||||
// Offset in the result-set (for pagination).
|
// 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 {
|
message ListUsersRequest {
|
||||||
// Max number of tenants to return in the result-set.
|
// 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;
|
uint32 limit = 1;
|
||||||
|
|
||||||
// Offset in the result-set (for pagination).
|
// 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 AppSKey and that the encryption / decryption of the payloads is
|
||||||
// the responsibility of the end-application.
|
// the responsibility of the end-application.
|
||||||
common.JoinServerContext join_server_context = 15;
|
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.
|
// 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 AppSKey and that the encryption / decryption of the payloads is
|
||||||
// the responsibility of the end-application.
|
// the responsibility of the end-application.
|
||||||
common.JoinServerContext join_server_context = 6;
|
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
|
// 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 let Some(rx_info) = &self.rx_info_legacy {
|
||||||
if self.rx_info.is_none() {
|
if self.rx_info.is_none() {
|
||||||
let mut rng = rand::thread_rng();
|
let mut rng = rand::rng();
|
||||||
|
|
||||||
self.rx_info = Some(UplinkRxInfo {
|
self.rx_info = Some(UplinkRxInfo {
|
||||||
gateway_id: hex::encode(&rx_info.gateway_id),
|
gateway_id: hex::encode(&rx_info.gateway_id),
|
||||||
uplink_id: rng.gen::<u32>(),
|
uplink_id: rng.random::<u32>(),
|
||||||
gw_time: rx_info.time,
|
gw_time: rx_info.time,
|
||||||
ns_time: None,
|
ns_time: None,
|
||||||
time_since_gps_epoch: rx_info.time_since_gps_epoch,
|
time_since_gps_epoch: rx_info.time_since_gps_epoch,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "backend"
|
name = "backend"
|
||||||
version = "4.10.1"
|
version = "4.12.0"
|
||||||
authors = ["Orne Brocaar <info@brocaar.com>"]
|
authors = ["Orne Brocaar <info@brocaar.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
publish = false
|
publish = false
|
||||||
@ -8,18 +8,18 @@
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
serde = { version = "1.0", features = ["derive", "rc"] }
|
serde = { version = "1.0", features = ["derive", "rc"] }
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
thiserror = "1.0"
|
thiserror = "2.0"
|
||||||
anyhow = "1.0"
|
anyhow = "1.0"
|
||||||
tracing = "0.1"
|
tracing = "0.1"
|
||||||
hex = "0.4"
|
hex = "0.4"
|
||||||
rand = "0.8"
|
rand = "0.9"
|
||||||
aes-kw = "0.2"
|
aes-kw = "0.2"
|
||||||
reqwest = { version = "0.12", features = [
|
reqwest = { version = "0.12", features = [
|
||||||
"json",
|
"json",
|
||||||
"rustls-tls",
|
"rustls-tls",
|
||||||
], default-features = false }
|
], default-features = false }
|
||||||
chrono = { version = "0.4", features = ["serde"] }
|
chrono = { version = "0.4", features = ["serde"] }
|
||||||
tokio = { version = "1.41", features = ["macros"] }
|
tokio = { version = "1.44", features = ["macros"] }
|
||||||
chirpstack_api = { path = "../api/rust", default-features = false, features = [
|
chirpstack_api = { path = "../api/rust", default-features = false, features = [
|
||||||
"json",
|
"json",
|
||||||
] }
|
] }
|
||||||
|
@ -3,14 +3,14 @@
|
|||||||
description = "Library for building external ChirpStack integrations"
|
description = "Library for building external ChirpStack integrations"
|
||||||
homepage = "https://www.chirpstack.io/"
|
homepage = "https://www.chirpstack.io/"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
version = "4.10.1"
|
version = "4.12.0"
|
||||||
authors = ["Orne Brocaar <info@brocaar.com>"]
|
authors = ["Orne Brocaar <info@brocaar.com>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
repository = "https://github.com/chirpstack/chirpstack"
|
repository = "https://github.com/chirpstack/chirpstack"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
chirpstack_api = { path = "../api/rust", version = "4.10.1" }
|
chirpstack_api = { path = "../api/rust", version = "4.12.0" }
|
||||||
redis = { version = "0.27", features = [
|
redis = { version = "0.29", features = [
|
||||||
"cluster-async",
|
"cluster-async",
|
||||||
"tokio-rustls-comp",
|
"tokio-rustls-comp",
|
||||||
] }
|
] }
|
||||||
@ -23,7 +23,6 @@
|
|||||||
], default-features = true }
|
], default-features = true }
|
||||||
async-trait = "0.1"
|
async-trait = "0.1"
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
tokio = { version = "1.41", features = ["macros", "rt-multi-thread"] }
|
tokio = { version = "1.44", features = ["macros", "rt-multi-thread"] }
|
||||||
lazy_static = "1.5"
|
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
toml = "0.8"
|
toml = "0.8"
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
#[macro_use]
|
|
||||||
extern crate lazy_static;
|
|
||||||
|
|
||||||
use std::io::Cursor;
|
use std::io::Cursor;
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
use std::sync::LazyLock;
|
||||||
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use async_trait::async_trait;
|
use async_trait::async_trait;
|
||||||
@ -13,10 +11,8 @@ use tracing_subscriber::{filter, prelude::*};
|
|||||||
|
|
||||||
use chirpstack_api::{integration as integration_pb, prost::Message};
|
use chirpstack_api::{integration as integration_pb, prost::Message};
|
||||||
|
|
||||||
lazy_static! {
|
static INTEGRATION: LazyLock<RwLock<Option<Box<dyn IntegrationTrait + Sync + Send>>>> =
|
||||||
static ref INTEGRATION: RwLock<Option<Box<dyn IntegrationTrait + Sync + Send>>> =
|
LazyLock::new(|| RwLock::new(None));
|
||||||
RwLock::new(None);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(Default, Deserialize, Clone)]
|
#[derive(Default, Deserialize, Clone)]
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
@ -203,7 +199,7 @@ impl Integration {
|
|||||||
|
|
||||||
for stream_key in &srr.keys {
|
for stream_key in &srr.keys {
|
||||||
for stream_id in &stream_key.ids {
|
for stream_id in &stream_key.ids {
|
||||||
redis::cmd("XACK")
|
let _: () = redis::cmd("XACK")
|
||||||
.arg(&key)
|
.arg(&key)
|
||||||
.arg(&self.consumer_group)
|
.arg(&self.consumer_group)
|
||||||
.arg(&stream_id.id)
|
.arg(&stream_id.id)
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
description = "ChirpStack is an open-source LoRaWAN(TM) Network Server"
|
description = "ChirpStack is an open-source LoRaWAN(TM) Network Server"
|
||||||
repository = "https://github.com/chirpstack/chirpstack"
|
repository = "https://github.com/chirpstack/chirpstack"
|
||||||
homepage = "https://www.chirpstack.io/"
|
homepage = "https://www.chirpstack.io/"
|
||||||
version = "4.10.1"
|
version = "4.12.0"
|
||||||
authors = ["Orne Brocaar <info@brocaar.com>"]
|
authors = ["Orne Brocaar <info@brocaar.com>"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
publish = false
|
publish = false
|
||||||
@ -20,15 +20,12 @@
|
|||||||
serde_urlencoded = "0.7"
|
serde_urlencoded = "0.7"
|
||||||
humantime-serde = "1.1"
|
humantime-serde = "1.1"
|
||||||
toml = "0.8"
|
toml = "0.8"
|
||||||
handlebars = "6.2"
|
handlebars = "6.3"
|
||||||
|
validator = { version = "0.20", features = ["derive"] }
|
||||||
|
|
||||||
# Database
|
# Database
|
||||||
email_address = "0.2"
|
email_address = "0.2"
|
||||||
diesel = { version = "2.2", features = [
|
diesel = { version = "2.2", features = ["chrono", "numeric"] }
|
||||||
"chrono",
|
|
||||||
"numeric",
|
|
||||||
"64-column-tables",
|
|
||||||
] }
|
|
||||||
diesel_migrations = { version = "2.2" }
|
diesel_migrations = { version = "2.2" }
|
||||||
diesel-async = { version = "0.5", features = [
|
diesel-async = { version = "0.5", features = [
|
||||||
"deadpool",
|
"deadpool",
|
||||||
@ -37,8 +34,8 @@
|
|||||||
tokio-postgres = { version = "0.7", optional = true }
|
tokio-postgres = { version = "0.7", optional = true }
|
||||||
tokio-postgres-rustls = { version = "0.13", optional = true }
|
tokio-postgres-rustls = { version = "0.13", optional = true }
|
||||||
bigdecimal = "0.4"
|
bigdecimal = "0.4"
|
||||||
redis = { version = "0.27", features = ["tls-rustls", "tokio-rustls-comp"] }
|
redis = { version = "0.29", features = ["tls-rustls", "tokio-rustls-comp"] }
|
||||||
deadpool-redis = { version = "0.18", features = ["cluster", "serde"] }
|
deadpool-redis = { version = "0.20", features = ["cluster", "serde"] }
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
tracing = "0.1"
|
tracing = "0.1"
|
||||||
@ -55,6 +52,7 @@
|
|||||||
"diesel",
|
"diesel",
|
||||||
"regions",
|
"regions",
|
||||||
"crypto",
|
"crypto",
|
||||||
|
"applayer",
|
||||||
] }
|
] }
|
||||||
backend = { path = "../backend" }
|
backend = { path = "../backend" }
|
||||||
|
|
||||||
@ -74,40 +72,39 @@
|
|||||||
lapin = { version = "2.5", default-features = false }
|
lapin = { version = "2.5", default-features = false }
|
||||||
tokio-executor-trait = "2.1"
|
tokio-executor-trait = "2.1"
|
||||||
tokio-reactor-trait = "1.1"
|
tokio-reactor-trait = "1.1"
|
||||||
rdkafka = { version = "0.36", default-features = false, features = [
|
rdkafka = { version = "0.37", default-features = false, features = [
|
||||||
"tokio",
|
"tokio",
|
||||||
"cmake-build",
|
"cmake-build",
|
||||||
] }
|
] }
|
||||||
|
|
||||||
# gRPC and Protobuf
|
# gRPC and Protobuf
|
||||||
tonic = "0.12"
|
tonic = "0.13"
|
||||||
tonic-web = "0.12"
|
tonic-web = "0.13"
|
||||||
tonic-reflection = "0.12"
|
tonic-reflection = "0.13"
|
||||||
tokio = { version = "1.41", features = ["macros", "rt-multi-thread"] }
|
tokio = { version = "1.44", features = ["macros", "rt-multi-thread"] }
|
||||||
tokio-stream = "0.1"
|
tokio-stream = "0.1"
|
||||||
prost-types = "0.13"
|
prost-types = "0.13"
|
||||||
prost = "0.13"
|
prost = "0.13"
|
||||||
pbjson-types = "0.7"
|
pbjson-types = "0.7"
|
||||||
|
|
||||||
# gRPC and HTTP multiplexing
|
# gRPC and HTTP multiplexing
|
||||||
axum = "0.7"
|
axum = "0.8"
|
||||||
axum-server = { version = "0.7.1", features = ["tls-rustls-no-provider"] }
|
axum-server = { version = "0.7", features = ["tls-rustls-no-provider"] }
|
||||||
tower = { version = "0.5", features = ["util"] }
|
tower = { version = "0.5", features = ["util"] }
|
||||||
futures = "0.3"
|
futures = "0.3"
|
||||||
futures-util = "0.3"
|
futures-util = "0.3"
|
||||||
http = "1.1"
|
http = "1.3"
|
||||||
http-body = "1.0"
|
http-body = "1.0"
|
||||||
rust-embed = "8.5"
|
rust-embed = "8.7"
|
||||||
mime_guess = "2.0"
|
mime_guess = "2.0"
|
||||||
tower-http = { version = "0.6", features = ["trace", "auth"] }
|
tower-http = { version = "0.6", features = ["trace", "auth"] }
|
||||||
|
|
||||||
# Error handling
|
# Error handling
|
||||||
thiserror = "1.0"
|
thiserror = "2.0"
|
||||||
anyhow = "1.0"
|
anyhow = "1.0"
|
||||||
|
|
||||||
# Authentication
|
# Authentication
|
||||||
pbkdf2 = { version = "0.12", features = ["simple"] }
|
pbkdf2 = { version = "0.12", features = ["simple"] }
|
||||||
rand_core = { version = "0.6", features = ["std"] }
|
|
||||||
jsonwebtoken = "9.3"
|
jsonwebtoken = "9.3"
|
||||||
rustls = { version = "0.23", default-features = false, features = [
|
rustls = { version = "0.23", default-features = false, features = [
|
||||||
"logging",
|
"logging",
|
||||||
@ -118,13 +115,12 @@
|
|||||||
rustls-native-certs = "0.8"
|
rustls-native-certs = "0.8"
|
||||||
rustls-pemfile = "2.2"
|
rustls-pemfile = "2.2"
|
||||||
pem = "3.0"
|
pem = "3.0"
|
||||||
x509-parser = "0.16"
|
x509-parser = "0.17"
|
||||||
rsa = "0.9"
|
rsa = "0.9"
|
||||||
elliptic-curve = { version = "0.13", features = ["pem"] }
|
sec1 = { version = "0.7.3", features = ["alloc", "pem", "pkcs8"] }
|
||||||
p256 = "0.13"
|
|
||||||
rcgen = { version = "0.13.1", features = ["x509-parser"] }
|
rcgen = { version = "0.13.1", features = ["x509-parser"] }
|
||||||
oauth2 = "5.0.0-alpha.4"
|
oauth2 = "5.0.0"
|
||||||
openidconnect = { version = "4.0.0-alpha.2", features = [
|
openidconnect = { version = "4.0.0", features = [
|
||||||
"accept-rfc3339-timestamps",
|
"accept-rfc3339-timestamps",
|
||||||
] }
|
] }
|
||||||
|
|
||||||
@ -133,7 +129,7 @@
|
|||||||
hex = "0.4"
|
hex = "0.4"
|
||||||
|
|
||||||
# Codecs
|
# Codecs
|
||||||
rquickjs = { version = "0.6", features = [
|
rquickjs = { version = "0.9", features = [
|
||||||
"bindgen",
|
"bindgen",
|
||||||
"loader",
|
"loader",
|
||||||
"array-buffer",
|
"array-buffer",
|
||||||
@ -141,17 +137,16 @@
|
|||||||
] }
|
] }
|
||||||
|
|
||||||
# Misc
|
# Misc
|
||||||
lazy_static = "1.5"
|
uuid = { version = "1.16", features = ["v4", "serde"] }
|
||||||
uuid = { version = "1.11", features = ["v4", "serde"] }
|
|
||||||
chrono = "0.4"
|
chrono = "0.4"
|
||||||
async-trait = "0.1"
|
async-trait = "0.1"
|
||||||
aes = "0.8"
|
aes = "0.8"
|
||||||
rand = "0.8"
|
rand = "0.9"
|
||||||
base64 = "0.22"
|
base64 = "0.22"
|
||||||
async-recursion = "1.1"
|
async-recursion = "1.1"
|
||||||
regex = "1.11"
|
regex = "1.11"
|
||||||
petgraph = "0.6"
|
petgraph = "0.7"
|
||||||
prometheus-client = "0.22"
|
prometheus-client = "0.23"
|
||||||
pin-project = "1.1"
|
pin-project = "1.1"
|
||||||
scoped-futures = { version = "0.1", features = ["std"] }
|
scoped-futures = { version = "0.1", features = ["std"] }
|
||||||
signal-hook = "0.3"
|
signal-hook = "0.3"
|
||||||
@ -160,7 +155,7 @@
|
|||||||
# Development and testing
|
# Development and testing
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
httpmock = "0.7.0"
|
httpmock = "0.7.0"
|
||||||
bytes = "1.8"
|
bytes = "1.10"
|
||||||
dotenv = "0.15"
|
dotenv = "0.15"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
@ -47,12 +47,12 @@ dist:
|
|||||||
test:
|
test:
|
||||||
cargo fmt --check
|
cargo fmt --check
|
||||||
cargo clippy --no-deps --no-default-features --features="$(DATABASE)"
|
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:
|
test-all:
|
||||||
cargo fmt --check
|
cargo fmt --check
|
||||||
cargo clippy --no-deps --no-default-features --features="$(DATABASE)"
|
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:
|
migration-generate:
|
||||||
ifeq ($(NAME),)
|
ifeq ($(NAME),)
|
||||||
|
@ -26,7 +26,7 @@ insert into "user" (
|
|||||||
password_hash,
|
password_hash,
|
||||||
note
|
note
|
||||||
) values (
|
) values (
|
||||||
'05244f12-6daf-4e1f-8315-c66783a0ab56',
|
gen_random_uuid(),
|
||||||
now(),
|
now(),
|
||||||
now(),
|
now(),
|
||||||
true,
|
true,
|
||||||
@ -63,7 +63,7 @@ insert into "tenant" (
|
|||||||
max_gateway_count,
|
max_gateway_count,
|
||||||
private_gateways
|
private_gateways
|
||||||
) values (
|
) values (
|
||||||
'52f14cd4-c6f1-4fbd-8f87-4025e1d49242',
|
gen_random_uuid(),
|
||||||
now(),
|
now(),
|
||||||
now(),
|
now(),
|
||||||
'ChirpStack',
|
'ChirpStack',
|
||||||
|
@ -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 anyhow::{Context, Result};
|
||||||
use async_trait::async_trait;
|
use async_trait::async_trait;
|
||||||
use rand::seq::SliceRandom;
|
use rand::seq::IndexedRandom;
|
||||||
|
|
||||||
use super::{Handler, Request, Response};
|
use super::{Handler, Request, Response};
|
||||||
use crate::region;
|
use crate::region;
|
||||||
@ -134,7 +134,7 @@ impl Handler for Algorithm {
|
|||||||
// In case there are multiple with the same coding-rate, we take
|
// In case there are multiple with the same coding-rate, we take
|
||||||
// a random one.
|
// a random one.
|
||||||
resp.dr = drs
|
resp.dr = drs
|
||||||
.choose(&mut rand::thread_rng())
|
.choose(&mut rand::rng())
|
||||||
.cloned()
|
.cloned()
|
||||||
.ok_or_else(|| anyhow!("Random returned None"))?;
|
.ok_or_else(|| anyhow!("Random returned None"))?;
|
||||||
resp.nb_trans = 1; // 1 is the recommeded value
|
resp.nb_trans = 1; // 1 is the recommeded value
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
use std::sync::LazyLock;
|
||||||
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use async_trait::async_trait;
|
use async_trait::async_trait;
|
||||||
@ -14,10 +15,8 @@ pub mod lora_lr_fhss;
|
|||||||
pub mod lr_fhss;
|
pub mod lr_fhss;
|
||||||
pub mod plugin;
|
pub mod plugin;
|
||||||
|
|
||||||
lazy_static! {
|
static ADR_ALGORITHMS: LazyLock<RwLock<HashMap<String, Box<dyn Handler + Sync + Send>>>> =
|
||||||
static ref ADR_ALGORITHMS: RwLock<HashMap<String, Box<dyn Handler + Sync + Send>>> =
|
LazyLock::new(|| RwLock::new(HashMap::new()));
|
||||||
RwLock::new(HashMap::new());
|
|
||||||
}
|
|
||||||
|
|
||||||
pub async fn setup() -> Result<()> {
|
pub async fn setup() -> Result<()> {
|
||||||
info!("Setting up adr algorithms");
|
info!("Setting up adr algorithms");
|
||||||
|
@ -21,7 +21,7 @@ impl Plugin {
|
|||||||
let m = rquickjs::Module::declare(ctx, "script", script.clone())
|
let m = rquickjs::Module::declare(ctx, "script", script.clone())
|
||||||
.context("Declare script")?;
|
.context("Declare script")?;
|
||||||
let (m, m_promise) = m.eval().context("Evaluate 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 id_func: rquickjs::Function = m.get("id").context("Get id function")?;
|
||||||
let name_func: rquickjs::Function = m.get("name").context("Get name 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())
|
let m = rquickjs::Module::declare(ctx.clone(), "script", self.script.clone())
|
||||||
.context("Declare script")?;
|
.context("Declare script")?;
|
||||||
let (m, m_promise) = m.eval().context("Evaluate 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 func: rquickjs::Function = m.get("handle").context("Get handle function")?;
|
||||||
|
|
||||||
let device_variables = rquickjs::Object::new(ctx.clone())?;
|
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)
|
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)]
|
#[cfg(test)]
|
||||||
@ -1947,7 +2010,7 @@ pub mod test {
|
|||||||
let mut create_req = Request::new(create_req);
|
let mut create_req = Request::new(create_req);
|
||||||
create_req
|
create_req
|
||||||
.extensions_mut()
|
.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 = service.create(create_req).await.unwrap();
|
||||||
let create_resp = create_resp.get_ref();
|
let create_resp = create_resp.get_ref();
|
||||||
|
|
||||||
@ -1958,7 +2021,7 @@ pub mod test {
|
|||||||
let mut get_req = Request::new(get_req);
|
let mut get_req = Request::new(get_req);
|
||||||
get_req
|
get_req
|
||||||
.extensions_mut()
|
.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();
|
let get_resp = service.get(get_req).await.unwrap();
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
Some(api::Application {
|
Some(api::Application {
|
||||||
@ -1982,7 +2045,7 @@ pub mod test {
|
|||||||
let mut up_req = Request::new(up_req);
|
let mut up_req = Request::new(up_req);
|
||||||
up_req
|
up_req
|
||||||
.extensions_mut()
|
.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();
|
let _ = service.update(up_req).await.unwrap();
|
||||||
|
|
||||||
//get
|
//get
|
||||||
@ -1992,7 +2055,7 @@ pub mod test {
|
|||||||
let mut get_req = Request::new(get_req);
|
let mut get_req = Request::new(get_req);
|
||||||
get_req
|
get_req
|
||||||
.extensions_mut()
|
.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();
|
let get_resp = service.get(get_req).await.unwrap();
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
Some(api::Application {
|
Some(api::Application {
|
||||||
@ -2014,7 +2077,7 @@ pub mod test {
|
|||||||
let mut list_req = Request::new(list_req);
|
let mut list_req = Request::new(list_req);
|
||||||
list_req
|
list_req
|
||||||
.extensions_mut()
|
.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();
|
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().total_count);
|
||||||
assert_eq!(1, list_resp.get_ref().result.len());
|
assert_eq!(1, list_resp.get_ref().result.len());
|
||||||
@ -2026,7 +2089,7 @@ pub mod test {
|
|||||||
let mut del_req = Request::new(del_req);
|
let mut del_req = Request::new(del_req);
|
||||||
del_req
|
del_req
|
||||||
.extensions_mut()
|
.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 _ = service.delete(del_req).await.unwrap();
|
||||||
|
|
||||||
let del_req = api::DeleteApplicationRequest {
|
let del_req = api::DeleteApplicationRequest {
|
||||||
@ -2035,7 +2098,7 @@ pub mod test {
|
|||||||
let mut del_req = Request::new(del_req);
|
let mut del_req = Request::new(del_req);
|
||||||
del_req
|
del_req
|
||||||
.extensions_mut()
|
.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;
|
let del_resp = service.delete(del_req).await;
|
||||||
assert!(del_resp.is_err());
|
assert!(del_resp.is_err());
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,8 @@ use super::error::Error;
|
|||||||
use crate::api::auth::AuthID;
|
use crate::api::auth::AuthID;
|
||||||
use crate::helpers::errors::PrintFullError;
|
use crate::helpers::errors::PrintFullError;
|
||||||
use crate::storage::schema::{
|
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};
|
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)]
|
#[cfg(test)]
|
||||||
pub mod test {
|
pub mod test {
|
||||||
use super::*;
|
use super::*;
|
||||||
use crate::storage::{
|
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 crate::test;
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
@ -2266,7 +2483,7 @@ pub mod test {
|
|||||||
|
|
||||||
tenant::add_user(tenant::TenantUser {
|
tenant::add_user(tenant::TenantUser {
|
||||||
tenant_id: tenant_a.id,
|
tenant_id: tenant_a.id,
|
||||||
user_id: tenant_user.id.into(),
|
user_id: tenant_user.id,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
})
|
})
|
||||||
.await
|
.await
|
||||||
@ -2274,7 +2491,7 @@ pub mod test {
|
|||||||
|
|
||||||
tenant::add_user(tenant::TenantUser {
|
tenant::add_user(tenant::TenantUser {
|
||||||
tenant_id: tenant_a.id,
|
tenant_id: tenant_a.id,
|
||||||
user_id: tenant_admin.id.into(),
|
user_id: tenant_admin.id,
|
||||||
is_admin: true,
|
is_admin: true,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
})
|
})
|
||||||
@ -2510,7 +2727,7 @@ pub mod test {
|
|||||||
|
|
||||||
tenant::add_user(tenant::TenantUser {
|
tenant::add_user(tenant::TenantUser {
|
||||||
tenant_id: tenant_a.id,
|
tenant_id: tenant_a.id,
|
||||||
user_id: tenant_admin.id.into(),
|
user_id: tenant_admin.id,
|
||||||
is_admin: true,
|
is_admin: true,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
})
|
})
|
||||||
@ -2518,21 +2735,21 @@ pub mod test {
|
|||||||
.unwrap();
|
.unwrap();
|
||||||
tenant::add_user(tenant::TenantUser {
|
tenant::add_user(tenant::TenantUser {
|
||||||
tenant_id: tenant_a.id,
|
tenant_id: tenant_a.id,
|
||||||
user_id: tenant_user.id.into(),
|
user_id: tenant_user.id,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
})
|
})
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
tenant::add_user(tenant::TenantUser {
|
tenant::add_user(tenant::TenantUser {
|
||||||
tenant_id: api_key_tenant.tenant_id.unwrap().into(),
|
tenant_id: api_key_tenant.tenant_id.unwrap(),
|
||||||
user_id: tenant_user.id.into(),
|
user_id: tenant_user.id,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
})
|
})
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
tenant::add_user(tenant::TenantUser {
|
tenant::add_user(tenant::TenantUser {
|
||||||
tenant_id: tenant_a.id,
|
tenant_id: tenant_a.id,
|
||||||
user_id: tenant_user_other.id.into(),
|
user_id: tenant_user_other.id,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
})
|
})
|
||||||
.await
|
.await
|
||||||
@ -2874,7 +3091,7 @@ pub mod test {
|
|||||||
|
|
||||||
tenant::add_user(tenant::TenantUser {
|
tenant::add_user(tenant::TenantUser {
|
||||||
tenant_id: tenant_a.id,
|
tenant_id: tenant_a.id,
|
||||||
user_id: tenant_admin.id.into(),
|
user_id: tenant_admin.id,
|
||||||
is_admin: true,
|
is_admin: true,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
})
|
})
|
||||||
@ -2882,7 +3099,7 @@ pub mod test {
|
|||||||
.unwrap();
|
.unwrap();
|
||||||
tenant::add_user(tenant::TenantUser {
|
tenant::add_user(tenant::TenantUser {
|
||||||
tenant_id: tenant_a.id,
|
tenant_id: tenant_a.id,
|
||||||
user_id: tenant_device_admin.id.into(),
|
user_id: tenant_device_admin.id,
|
||||||
is_device_admin: true,
|
is_device_admin: true,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
})
|
})
|
||||||
@ -2890,7 +3107,7 @@ pub mod test {
|
|||||||
.unwrap();
|
.unwrap();
|
||||||
tenant::add_user(tenant::TenantUser {
|
tenant::add_user(tenant::TenantUser {
|
||||||
tenant_id: tenant_a.id,
|
tenant_id: tenant_a.id,
|
||||||
user_id: tenant_gateway_admin.id.into(),
|
user_id: tenant_gateway_admin.id,
|
||||||
is_gateway_admin: true,
|
is_gateway_admin: true,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
})
|
})
|
||||||
@ -2898,7 +3115,7 @@ pub mod test {
|
|||||||
.unwrap();
|
.unwrap();
|
||||||
tenant::add_user(tenant::TenantUser {
|
tenant::add_user(tenant::TenantUser {
|
||||||
tenant_id: tenant_a.id,
|
tenant_id: tenant_a.id,
|
||||||
user_id: tenant_user.id.into(),
|
user_id: tenant_user.id,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
})
|
})
|
||||||
.await
|
.await
|
||||||
@ -3321,7 +3538,7 @@ pub mod test {
|
|||||||
|
|
||||||
tenant::add_user(tenant::TenantUser {
|
tenant::add_user(tenant::TenantUser {
|
||||||
tenant_id: tenant_a.id,
|
tenant_id: tenant_a.id,
|
||||||
user_id: tenant_admin.id.into(),
|
user_id: tenant_admin.id,
|
||||||
is_admin: true,
|
is_admin: true,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
})
|
})
|
||||||
@ -3329,7 +3546,7 @@ pub mod test {
|
|||||||
.unwrap();
|
.unwrap();
|
||||||
tenant::add_user(tenant::TenantUser {
|
tenant::add_user(tenant::TenantUser {
|
||||||
tenant_id: tenant_a.id,
|
tenant_id: tenant_a.id,
|
||||||
user_id: tenant_device_admin.id.into(),
|
user_id: tenant_device_admin.id,
|
||||||
is_device_admin: true,
|
is_device_admin: true,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
})
|
})
|
||||||
@ -3337,7 +3554,7 @@ pub mod test {
|
|||||||
.unwrap();
|
.unwrap();
|
||||||
tenant::add_user(tenant::TenantUser {
|
tenant::add_user(tenant::TenantUser {
|
||||||
tenant_id: tenant_a.id,
|
tenant_id: tenant_a.id,
|
||||||
user_id: tenant_gateway_admin.id.into(),
|
user_id: tenant_gateway_admin.id,
|
||||||
is_gateway_admin: true,
|
is_gateway_admin: true,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
})
|
})
|
||||||
@ -3345,7 +3562,7 @@ pub mod test {
|
|||||||
.unwrap();
|
.unwrap();
|
||||||
tenant::add_user(tenant::TenantUser {
|
tenant::add_user(tenant::TenantUser {
|
||||||
tenant_id: tenant_a.id,
|
tenant_id: tenant_a.id,
|
||||||
user_id: tenant_user.id.into(),
|
user_id: tenant_user.id,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
})
|
})
|
||||||
.await
|
.await
|
||||||
@ -3623,32 +3840,32 @@ pub mod test {
|
|||||||
.await;
|
.await;
|
||||||
|
|
||||||
tenant::add_user(tenant::TenantUser {
|
tenant::add_user(tenant::TenantUser {
|
||||||
tenant_id: api_key_tenant.tenant_id.unwrap().into(),
|
tenant_id: api_key_tenant.tenant_id.unwrap(),
|
||||||
user_id: tenant_admin.id.into(),
|
user_id: tenant_admin.id,
|
||||||
is_admin: true,
|
is_admin: true,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
})
|
})
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
tenant::add_user(tenant::TenantUser {
|
tenant::add_user(tenant::TenantUser {
|
||||||
tenant_id: api_key_tenant.tenant_id.unwrap().into(),
|
tenant_id: api_key_tenant.tenant_id.unwrap(),
|
||||||
user_id: tenant_device_admin.id.into(),
|
user_id: tenant_device_admin.id,
|
||||||
is_device_admin: true,
|
is_device_admin: true,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
})
|
})
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
tenant::add_user(tenant::TenantUser {
|
tenant::add_user(tenant::TenantUser {
|
||||||
tenant_id: api_key_tenant.tenant_id.unwrap().into(),
|
tenant_id: api_key_tenant.tenant_id.unwrap(),
|
||||||
user_id: tenant_gateway_admin.id.into(),
|
user_id: tenant_gateway_admin.id,
|
||||||
is_gateway_admin: true,
|
is_gateway_admin: true,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
})
|
})
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
tenant::add_user(tenant::TenantUser {
|
tenant::add_user(tenant::TenantUser {
|
||||||
tenant_id: api_key_tenant.tenant_id.unwrap().into(),
|
tenant_id: api_key_tenant.tenant_id.unwrap(),
|
||||||
user_id: tenant_user.id.into(),
|
user_id: tenant_user.id,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
})
|
})
|
||||||
.await
|
.await
|
||||||
@ -3876,8 +4093,8 @@ pub mod test {
|
|||||||
.await;
|
.await;
|
||||||
|
|
||||||
tenant::add_user(tenant::TenantUser {
|
tenant::add_user(tenant::TenantUser {
|
||||||
tenant_id: api_key_tenant.tenant_id.unwrap().into(),
|
tenant_id: api_key_tenant.tenant_id.unwrap(),
|
||||||
user_id: tenant_user.id.into(),
|
user_id: tenant_user.id,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
})
|
})
|
||||||
.await
|
.await
|
||||||
@ -4020,7 +4237,7 @@ pub mod test {
|
|||||||
let gw_api_key_tenant = gateway::create(gateway::Gateway {
|
let gw_api_key_tenant = gateway::create(gateway::Gateway {
|
||||||
name: "test-gw-tenant".into(),
|
name: "test-gw-tenant".into(),
|
||||||
gateway_id: EUI64::from_str("0202030405060708").unwrap(),
|
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()
|
..Default::default()
|
||||||
})
|
})
|
||||||
.await
|
.await
|
||||||
@ -4028,7 +4245,7 @@ pub mod test {
|
|||||||
|
|
||||||
tenant::add_user(tenant::TenantUser {
|
tenant::add_user(tenant::TenantUser {
|
||||||
tenant_id: tenant_a.id,
|
tenant_id: tenant_a.id,
|
||||||
user_id: tenant_admin.id.into(),
|
user_id: tenant_admin.id,
|
||||||
is_admin: true,
|
is_admin: true,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
})
|
})
|
||||||
@ -4036,7 +4253,7 @@ pub mod test {
|
|||||||
.unwrap();
|
.unwrap();
|
||||||
tenant::add_user(tenant::TenantUser {
|
tenant::add_user(tenant::TenantUser {
|
||||||
tenant_id: tenant_a.id,
|
tenant_id: tenant_a.id,
|
||||||
user_id: tenant_gateway_admin.id.into(),
|
user_id: tenant_gateway_admin.id,
|
||||||
is_gateway_admin: true,
|
is_gateway_admin: true,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
})
|
})
|
||||||
@ -4044,7 +4261,7 @@ pub mod test {
|
|||||||
.unwrap();
|
.unwrap();
|
||||||
tenant::add_user(tenant::TenantUser {
|
tenant::add_user(tenant::TenantUser {
|
||||||
tenant_id: tenant_a.id,
|
tenant_id: tenant_a.id,
|
||||||
user_id: tenant_user.id.into(),
|
user_id: tenant_user.id,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
})
|
})
|
||||||
.await
|
.await
|
||||||
@ -4296,32 +4513,32 @@ pub mod test {
|
|||||||
.await;
|
.await;
|
||||||
|
|
||||||
tenant::add_user(tenant::TenantUser {
|
tenant::add_user(tenant::TenantUser {
|
||||||
tenant_id: api_key_tenant.tenant_id.unwrap().into(),
|
tenant_id: api_key_tenant.tenant_id.unwrap(),
|
||||||
user_id: tenant_admin.id.into(),
|
user_id: tenant_admin.id,
|
||||||
is_admin: true,
|
is_admin: true,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
})
|
})
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
tenant::add_user(tenant::TenantUser {
|
tenant::add_user(tenant::TenantUser {
|
||||||
tenant_id: api_key_tenant.tenant_id.unwrap().into(),
|
tenant_id: api_key_tenant.tenant_id.unwrap(),
|
||||||
user_id: tenant_device_admin.id.into(),
|
user_id: tenant_device_admin.id,
|
||||||
is_device_admin: true,
|
is_device_admin: true,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
})
|
})
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
tenant::add_user(tenant::TenantUser {
|
tenant::add_user(tenant::TenantUser {
|
||||||
tenant_id: api_key_tenant.tenant_id.unwrap().into(),
|
tenant_id: api_key_tenant.tenant_id.unwrap(),
|
||||||
user_id: tenant_gateway_admin.id.into(),
|
user_id: tenant_gateway_admin.id,
|
||||||
is_gateway_admin: true,
|
is_gateway_admin: true,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
})
|
})
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
tenant::add_user(tenant::TenantUser {
|
tenant::add_user(tenant::TenantUser {
|
||||||
tenant_id: api_key_tenant.tenant_id.unwrap().into(),
|
tenant_id: api_key_tenant.tenant_id.unwrap(),
|
||||||
user_id: tenant_user.id.into(),
|
user_id: tenant_user.id,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
})
|
})
|
||||||
.await
|
.await
|
||||||
@ -4619,4 +4836,298 @@ pub mod test {
|
|||||||
];
|
];
|
||||||
run_tests(tests).await;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -601,7 +601,7 @@ async fn handle_async_ans(bp: &BasePayload, b: &[u8]) -> Result<Response> {
|
|||||||
|
|
||||||
let key = redis_key(format!("backend:async:{}", transaction_id));
|
let key = redis_key(format!("backend:async:{}", transaction_id));
|
||||||
|
|
||||||
redis::pipe()
|
() = redis::pipe()
|
||||||
.atomic()
|
.atomic()
|
||||||
.cmd("XADD")
|
.cmd("XADD")
|
||||||
.arg(&key)
|
.arg(&key)
|
||||||
|
@ -250,6 +250,11 @@ impl DeviceService for Device {
|
|||||||
} else {
|
} else {
|
||||||
Some(Uuid::from_str(&req.multicast_group_id).map_err(|e| e.status())?)
|
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
|
self.validator
|
||||||
.validate(
|
.validate(
|
||||||
@ -270,17 +275,25 @@ impl DeviceService for Device {
|
|||||||
let filters = device::Filters {
|
let filters = device::Filters {
|
||||||
application_id: Some(app_id),
|
application_id: Some(app_id),
|
||||||
multicast_group_id: mg_id,
|
multicast_group_id: mg_id,
|
||||||
|
device_profile_id: dp_id,
|
||||||
search: if req.search.is_empty() {
|
search: if req.search.is_empty() {
|
||||||
None
|
None
|
||||||
} else {
|
} else {
|
||||||
Some(req.search.to_string())
|
Some(req.search.to_string())
|
||||||
},
|
},
|
||||||
|
tags: req.tags.clone(),
|
||||||
};
|
};
|
||||||
|
|
||||||
let count = device::get_count(&filters).await.map_err(|e| e.status())?;
|
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)
|
let items = device::list(
|
||||||
.await
|
req.limit as i64,
|
||||||
.map_err(|e| e.status())?;
|
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 {
|
let mut resp = Response::new(api::ListDevicesResponse {
|
||||||
total_count: count as u32,
|
total_count: count as u32,
|
||||||
@ -309,6 +322,7 @@ impl DeviceService for Device {
|
|||||||
}),
|
}),
|
||||||
false => None,
|
false => None,
|
||||||
},
|
},
|
||||||
|
tags: d.tags.into_hashmap(),
|
||||||
})
|
})
|
||||||
.collect(),
|
.collect(),
|
||||||
});
|
});
|
||||||
@ -340,11 +354,8 @@ impl DeviceService for Device {
|
|||||||
let dk = device_keys::DeviceKeys {
|
let dk = device_keys::DeviceKeys {
|
||||||
dev_eui,
|
dev_eui,
|
||||||
nwk_key: AES128Key::from_str(&req_dk.nwk_key).map_err(|e| e.status())?,
|
nwk_key: AES128Key::from_str(&req_dk.nwk_key).map_err(|e| e.status())?,
|
||||||
app_key: if !req_dk.app_key.is_empty() {
|
app_key: AES128Key::from_str(&req_dk.app_key).map_err(|e| e.status())?,
|
||||||
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())?,
|
||||||
} else {
|
|
||||||
AES128Key::null()
|
|
||||||
},
|
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -378,6 +389,7 @@ impl DeviceService for Device {
|
|||||||
dev_eui: dk.dev_eui.to_string(),
|
dev_eui: dk.dev_eui.to_string(),
|
||||||
nwk_key: dk.nwk_key.to_string(),
|
nwk_key: dk.nwk_key.to_string(),
|
||||||
app_key: dk.app_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)),
|
created_at: Some(helpers::datetime_to_prost_timestamp(&dk.created_at)),
|
||||||
updated_at: Some(helpers::datetime_to_prost_timestamp(&dk.updated_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,
|
dev_nonces: dk.dev_nonces,
|
||||||
join_nonce: dk.join_nonce,
|
join_nonce: dk.join_nonce,
|
||||||
nwk_key: AES128Key::from_str(&req_dk.nwk_key).map_err(|e| e.status())?,
|
nwk_key: AES128Key::from_str(&req_dk.nwk_key).map_err(|e| e.status())?,
|
||||||
app_key: if !req_dk.app_key.is_empty() {
|
app_key: AES128Key::from_str(&req_dk.app_key).map_err(|e| e.status())?,
|
||||||
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())?,
|
||||||
} else {
|
|
||||||
AES128Key::null()
|
|
||||||
},
|
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
let _ = device_keys::update(dk).await.map_err(|e| e.status())?;
|
let _ = device_keys::update(dk).await.map_err(|e| e.status())?;
|
||||||
@ -469,7 +478,7 @@ impl DeviceService for Device {
|
|||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
device_keys::set_dev_nonces(&dev_eui, &Vec::new())
|
device_keys::set_dev_nonces(dev_eui, &fields::DevNonces::default())
|
||||||
.await
|
.await
|
||||||
.map_err(|e| e.status())?;
|
.map_err(|e| e.status())?;
|
||||||
|
|
||||||
@ -1362,6 +1371,9 @@ pub mod test {
|
|||||||
multicast_group_id: "".into(),
|
multicast_group_id: "".into(),
|
||||||
limit: 10,
|
limit: 10,
|
||||||
offset: 0,
|
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();
|
let list_resp = service.list(list_req).await.unwrap();
|
||||||
@ -1376,6 +1388,7 @@ pub mod test {
|
|||||||
dev_eui: "0102030405060708".into(),
|
dev_eui: "0102030405060708".into(),
|
||||||
nwk_key: "01020304050607080102030405060708".into(),
|
nwk_key: "01020304050607080102030405060708".into(),
|
||||||
app_key: "02020304050607080202030405060708".into(),
|
app_key: "02020304050607080202030405060708".into(),
|
||||||
|
gen_app_key: "03020304050607080202030405060708".into(),
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
@ -1394,6 +1407,7 @@ pub mod test {
|
|||||||
dev_eui: "0102030405060708".into(),
|
dev_eui: "0102030405060708".into(),
|
||||||
nwk_key: "01020304050607080102030405060708".into(),
|
nwk_key: "01020304050607080102030405060708".into(),
|
||||||
app_key: "02020304050607080202030405060708".into(),
|
app_key: "02020304050607080202030405060708".into(),
|
||||||
|
gen_app_key: "03020304050607080202030405060708".into(),
|
||||||
}),
|
}),
|
||||||
get_keys_resp.get_ref().device_keys
|
get_keys_resp.get_ref().device_keys
|
||||||
);
|
);
|
||||||
@ -1406,6 +1420,7 @@ pub mod test {
|
|||||||
dev_eui: "0102030405060708".into(),
|
dev_eui: "0102030405060708".into(),
|
||||||
nwk_key: "01020304050607080102030405060708".into(),
|
nwk_key: "01020304050607080102030405060708".into(),
|
||||||
app_key: "03020304050607080302030405060708".into(),
|
app_key: "03020304050607080302030405060708".into(),
|
||||||
|
gen_app_key: "03020304050607080202030405060708".into(),
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
@ -1424,15 +1439,19 @@ pub mod test {
|
|||||||
dev_eui: "0102030405060708".into(),
|
dev_eui: "0102030405060708".into(),
|
||||||
nwk_key: "01020304050607080102030405060708".into(),
|
nwk_key: "01020304050607080102030405060708".into(),
|
||||||
app_key: "03020304050607080302030405060708".into(),
|
app_key: "03020304050607080302030405060708".into(),
|
||||||
|
gen_app_key: "03020304050607080202030405060708".into(),
|
||||||
}),
|
}),
|
||||||
get_keys_resp.get_ref().device_keys
|
get_keys_resp.get_ref().device_keys
|
||||||
);
|
);
|
||||||
|
|
||||||
// flush dev nonces
|
// flush dev nonces
|
||||||
let _ =
|
let _ = device_keys::set_dev_nonces(EUI64::from_str("0102030405060708").unwrap(), &{
|
||||||
device_keys::set_dev_nonces(&EUI64::from_str("0102030405060708").unwrap(), &[1, 2, 3])
|
let mut dev_nonces = fields::DevNonces::default();
|
||||||
.await
|
dev_nonces.insert(EUI64::from_str("0102030405060708").unwrap(), 123);
|
||||||
.unwrap();
|
dev_nonces
|
||||||
|
})
|
||||||
|
.await
|
||||||
|
.unwrap();
|
||||||
let flush_dev_nonces_req = get_request(
|
let flush_dev_nonces_req = get_request(
|
||||||
&u.id,
|
&u.id,
|
||||||
api::FlushDevNoncesRequest {
|
api::FlushDevNoncesRequest {
|
||||||
@ -1446,7 +1465,7 @@ pub mod test {
|
|||||||
let dk = device_keys::get(&EUI64::from_str("0102030405060708").unwrap())
|
let dk = device_keys::get(&EUI64::from_str("0102030405060708").unwrap())
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
assert_eq!(0, dk.dev_nonces.len());
|
assert_eq!(fields::DevNonces::default(), dk.dev_nonces);
|
||||||
|
|
||||||
// delete keys
|
// delete keys
|
||||||
let del_keys_req = get_request(
|
let del_keys_req = get_request(
|
||||||
|
@ -60,15 +60,6 @@ impl DeviceProfileService for DeviceProfile {
|
|||||||
supports_otaa: req_dp.supports_otaa,
|
supports_otaa: req_dp.supports_otaa,
|
||||||
supports_class_b: req_dp.supports_class_b,
|
supports_class_b: req_dp.supports_class_b,
|
||||||
supports_class_c: req_dp.supports_class_c,
|
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()),
|
tags: fields::KeyValue::new(req_dp.tags.clone()),
|
||||||
measurements: fields::Measurements::new(
|
measurements: fields::Measurements::new(
|
||||||
req_dp
|
req_dp
|
||||||
@ -88,32 +79,77 @@ impl DeviceProfileService for DeviceProfile {
|
|||||||
auto_detect_measurements: req_dp.auto_detect_measurements,
|
auto_detect_measurements: req_dp.auto_detect_measurements,
|
||||||
region_config_id: (!req_dp.region_config_id.is_empty())
|
region_config_id: (!req_dp.region_config_id.is_empty())
|
||||||
.then(|| req_dp.region_config_id.clone()),
|
.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,
|
allow_roaming: req_dp.allow_roaming,
|
||||||
rx1_delay: req_dp.rx1_delay as i16,
|
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()
|
..Default::default()
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -145,6 +181,10 @@ impl DeviceProfileService for DeviceProfile {
|
|||||||
.await?;
|
.await?;
|
||||||
|
|
||||||
let dp = device_profile::get(&dp_id).await.map_err(|e| e.status())?;
|
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 {
|
let mut resp = Response::new(api::GetDeviceProfileResponse {
|
||||||
device_profile: Some(api::DeviceProfile {
|
device_profile: Some(api::DeviceProfile {
|
||||||
@ -164,15 +204,15 @@ impl DeviceProfileService for DeviceProfile {
|
|||||||
supports_otaa: dp.supports_otaa,
|
supports_otaa: dp.supports_otaa,
|
||||||
supports_class_b: dp.supports_class_b,
|
supports_class_b: dp.supports_class_b,
|
||||||
supports_class_c: dp.supports_class_c,
|
supports_class_c: dp.supports_class_c,
|
||||||
class_b_timeout: dp.class_b_timeout as u32,
|
class_b_timeout: class_b_params.timeout as u32,
|
||||||
class_b_ping_slot_nb_k: dp.class_b_ping_slot_nb_k as u32,
|
class_b_ping_slot_nb_k: class_b_params.ping_slot_nb_k as u32,
|
||||||
class_b_ping_slot_dr: dp.class_b_ping_slot_dr as u32,
|
class_b_ping_slot_dr: class_b_params.ping_slot_dr as u32,
|
||||||
class_b_ping_slot_freq: dp.class_b_ping_slot_freq as u32,
|
class_b_ping_slot_freq: class_b_params.ping_slot_freq as u32,
|
||||||
class_c_timeout: dp.class_c_timeout as u32,
|
class_c_timeout: class_c_params.timeout as u32,
|
||||||
abp_rx1_delay: dp.abp_rx1_delay as u32,
|
abp_rx1_delay: abp_params.rx1_delay as u32,
|
||||||
abp_rx1_dr_offset: dp.abp_rx1_dr_offset as u32,
|
abp_rx1_dr_offset: abp_params.rx1_dr_offset as u32,
|
||||||
abp_rx2_dr: dp.abp_rx2_dr as u32,
|
abp_rx2_dr: abp_params.rx2_dr as u32,
|
||||||
abp_rx2_freq: dp.abp_rx2_freq as u32,
|
abp_rx2_freq: abp_params.rx2_freq as u32,
|
||||||
tags: dp.tags.into_hashmap(),
|
tags: dp.tags.into_hashmap(),
|
||||||
measurements: dp
|
measurements: dp
|
||||||
.measurements
|
.measurements
|
||||||
@ -190,32 +230,46 @@ impl DeviceProfileService for DeviceProfile {
|
|||||||
.collect(),
|
.collect(),
|
||||||
auto_detect_measurements: dp.auto_detect_measurements,
|
auto_detect_measurements: dp.auto_detect_measurements,
|
||||||
region_config_id: dp.region_config_id.clone().unwrap_or_default(),
|
region_config_id: dp.region_config_id.clone().unwrap_or_default(),
|
||||||
is_relay: dp.is_relay,
|
is_relay: relay_params.is_relay,
|
||||||
is_relay_ed: dp.is_relay_ed,
|
is_relay_ed: relay_params.is_relay_ed,
|
||||||
relay_ed_relay_only: dp.relay_ed_relay_only,
|
relay_ed_relay_only: relay_params.ed_relay_only,
|
||||||
relay_enabled: dp.relay_enabled,
|
relay_enabled: relay_params.relay_enabled,
|
||||||
relay_cad_periodicity: dp.relay_cad_periodicity as i32,
|
relay_cad_periodicity: relay_params.relay_cad_periodicity as i32,
|
||||||
relay_default_channel_index: dp.relay_default_channel_index as u32,
|
relay_default_channel_index: relay_params.default_channel_index as u32,
|
||||||
relay_second_channel_freq: dp.relay_second_channel_freq as u32,
|
relay_second_channel_freq: relay_params.second_channel_freq as u32,
|
||||||
relay_second_channel_dr: dp.relay_second_channel_dr as u32,
|
relay_second_channel_dr: relay_params.second_channel_dr as u32,
|
||||||
relay_second_channel_ack_offset: dp.relay_second_channel_ack_offset as i32,
|
relay_second_channel_ack_offset: relay_params.second_channel_ack_offset as i32,
|
||||||
relay_ed_activation_mode: dp.relay_ed_activation_mode.to_proto().into(),
|
relay_ed_activation_mode: relay_params.ed_activation_mode.to_proto().into(),
|
||||||
relay_ed_smart_enable_level: dp.relay_ed_smart_enable_level as u32,
|
relay_ed_smart_enable_level: relay_params.ed_smart_enable_level as u32,
|
||||||
relay_ed_back_off: dp.relay_ed_back_off as u32,
|
relay_ed_back_off: relay_params.ed_back_off as u32,
|
||||||
relay_ed_uplink_limit_bucket_size: dp.relay_ed_uplink_limit_bucket_size as u32,
|
relay_ed_uplink_limit_bucket_size: relay_params.ed_uplink_limit_bucket_size as u32,
|
||||||
relay_ed_uplink_limit_reload_rate: dp.relay_ed_uplink_limit_reload_rate as u32,
|
relay_ed_uplink_limit_reload_rate: relay_params.ed_uplink_limit_reload_rate as u32,
|
||||||
relay_join_req_limit_reload_rate: dp.relay_join_req_limit_reload_rate as u32,
|
relay_join_req_limit_reload_rate: relay_params.relay_join_req_limit_reload_rate
|
||||||
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
|
|
||||||
as u32,
|
as u32,
|
||||||
relay_overall_limit_reload_rate: dp.relay_overall_limit_reload_rate as u32,
|
relay_notify_limit_reload_rate: relay_params.relay_notify_limit_reload_rate as u32,
|
||||||
relay_join_req_limit_bucket_size: dp.relay_join_req_limit_bucket_size as u32,
|
relay_global_uplink_limit_reload_rate: relay_params
|
||||||
relay_notify_limit_bucket_size: dp.relay_notify_limit_bucket_size as u32,
|
.relay_global_uplink_limit_reload_rate
|
||||||
relay_global_uplink_limit_bucket_size: dp.relay_global_uplink_limit_bucket_size
|
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,
|
as u32,
|
||||||
relay_overall_limit_bucket_size: dp.relay_overall_limit_bucket_size as u32,
|
|
||||||
allow_roaming: dp.allow_roaming,
|
allow_roaming: dp.allow_roaming,
|
||||||
rx1_delay: dp.rx1_delay as u32,
|
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)),
|
created_at: Some(helpers::datetime_to_prost_timestamp(&dp.created_at)),
|
||||||
updated_at: Some(helpers::datetime_to_prost_timestamp(&dp.updated_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_otaa: req_dp.supports_otaa,
|
||||||
supports_class_b: req_dp.supports_class_b,
|
supports_class_b: req_dp.supports_class_b,
|
||||||
supports_class_c: req_dp.supports_class_c,
|
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()),
|
tags: fields::KeyValue::new(req_dp.tags.clone()),
|
||||||
measurements: fields::Measurements::new(
|
measurements: fields::Measurements::new(
|
||||||
req_dp
|
req_dp
|
||||||
@ -290,32 +335,79 @@ impl DeviceProfileService for DeviceProfile {
|
|||||||
auto_detect_measurements: req_dp.auto_detect_measurements,
|
auto_detect_measurements: req_dp.auto_detect_measurements,
|
||||||
region_config_id: (!req_dp.region_config_id.is_empty())
|
region_config_id: (!req_dp.region_config_id.is_empty())
|
||||||
.then(|| req_dp.region_config_id.clone()),
|
.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,
|
allow_roaming: req_dp.allow_roaming,
|
||||||
rx1_delay: req_dp.rx1_delay as i16,
|
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()
|
..Default::default()
|
||||||
})
|
})
|
||||||
.await
|
.await
|
||||||
@ -506,6 +598,14 @@ pub mod test {
|
|||||||
mac_version: common::MacVersion::Lorawan103.into(),
|
mac_version: common::MacVersion::Lorawan103.into(),
|
||||||
reg_params_revision: common::RegParamsRevision::A.into(),
|
reg_params_revision: common::RegParamsRevision::A.into(),
|
||||||
adr_algorithm_id: "default".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()
|
..Default::default()
|
||||||
}),
|
}),
|
||||||
get_resp.get_ref().device_profile
|
get_resp.get_ref().device_profile
|
||||||
@ -546,6 +646,7 @@ pub mod test {
|
|||||||
mac_version: common::MacVersion::Lorawan103.into(),
|
mac_version: common::MacVersion::Lorawan103.into(),
|
||||||
reg_params_revision: common::RegParamsRevision::A.into(),
|
reg_params_revision: common::RegParamsRevision::A.into(),
|
||||||
adr_algorithm_id: "default".into(),
|
adr_algorithm_id: "default".into(),
|
||||||
|
app_layer_params: Some(api::AppLayerParams::default()),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
}),
|
}),
|
||||||
get_resp.get_ref().device_profile
|
get_resp.get_ref().device_profile
|
||||||
|
@ -47,6 +47,17 @@ impl ToStatus for storage::error::Error {
|
|||||||
storage::error::Error::ProstDecode(_) => {
|
storage::error::Error::ProstDecode(_) => {
|
||||||
Status::new(Code::Internal, format!("{:#}", self))
|
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
|
||||||
|
}
|
||||||
|
}
|
@ -238,9 +238,15 @@ impl GatewayService for Gateway {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let count = gateway::get_count(&filters).await.map_err(|e| e.status())?;
|
let count = gateway::get_count(&filters).await.map_err(|e| e.status())?;
|
||||||
let result = gateway::list(req.limit as i64, req.offset as i64, &filters)
|
let result = gateway::list(
|
||||||
.await
|
req.limit as i64,
|
||||||
.map_err(|e| e.status())?;
|
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::ListGatewaysResponse {
|
let mut resp = Response::new(api::ListGatewaysResponse {
|
||||||
total_count: count as u32,
|
total_count: count as u32,
|
||||||
@ -1030,7 +1036,7 @@ pub mod test {
|
|||||||
let mut create_req = Request::new(create_req);
|
let mut create_req = Request::new(create_req);
|
||||||
create_req
|
create_req
|
||||||
.extensions_mut()
|
.extensions_mut()
|
||||||
.insert(AuthID::User(Into::<uuid::Uuid>::into(u.id).clone()));
|
.insert(AuthID::User(Into::<uuid::Uuid>::into(u.id)));
|
||||||
let _ = service.create(create_req).await.unwrap();
|
let _ = service.create(create_req).await.unwrap();
|
||||||
|
|
||||||
// get
|
// get
|
||||||
@ -1040,7 +1046,7 @@ pub mod test {
|
|||||||
let mut get_req = Request::new(get_req);
|
let mut get_req = Request::new(get_req);
|
||||||
get_req
|
get_req
|
||||||
.extensions_mut()
|
.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();
|
let get_resp = service.get(get_req).await.unwrap();
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
Some(api::Gateway {
|
Some(api::Gateway {
|
||||||
@ -1076,7 +1082,7 @@ pub mod test {
|
|||||||
let mut up_req = Request::new(up_req);
|
let mut up_req = Request::new(up_req);
|
||||||
up_req
|
up_req
|
||||||
.extensions_mut()
|
.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();
|
let _ = service.update(up_req).await.unwrap();
|
||||||
|
|
||||||
// get
|
// get
|
||||||
@ -1086,7 +1092,7 @@ pub mod test {
|
|||||||
let mut get_req = Request::new(get_req);
|
let mut get_req = Request::new(get_req);
|
||||||
get_req
|
get_req
|
||||||
.extensions_mut()
|
.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();
|
let get_resp = service.get(get_req).await.unwrap();
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
Some(api::Gateway {
|
Some(api::Gateway {
|
||||||
@ -1115,7 +1121,7 @@ pub mod test {
|
|||||||
let mut list_req = Request::new(list_req);
|
let mut list_req = Request::new(list_req);
|
||||||
list_req
|
list_req
|
||||||
.extensions_mut()
|
.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();
|
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().total_count);
|
||||||
assert_eq!(1, list_resp.get_ref().result.len());
|
assert_eq!(1, list_resp.get_ref().result.len());
|
||||||
@ -1127,7 +1133,7 @@ pub mod test {
|
|||||||
let mut del_req = Request::new(del_req);
|
let mut del_req = Request::new(del_req);
|
||||||
del_req
|
del_req
|
||||||
.extensions_mut()
|
.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 _ = service.delete(del_req).await.unwrap();
|
||||||
|
|
||||||
let del_req = api::DeleteGatewayRequest {
|
let del_req = api::DeleteGatewayRequest {
|
||||||
@ -1136,7 +1142,7 @@ pub mod test {
|
|||||||
let mut del_req = Request::new(del_req);
|
let mut del_req = Request::new(del_req);
|
||||||
del_req
|
del_req
|
||||||
.extensions_mut()
|
.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;
|
let del_resp = service.delete(del_req).await;
|
||||||
assert!(del_resp.is_err());
|
assert!(del_resp.is_err());
|
||||||
}
|
}
|
||||||
@ -1214,7 +1220,7 @@ pub mod test {
|
|||||||
let mut stats_req = Request::new(stats_req);
|
let mut stats_req = Request::new(stats_req);
|
||||||
stats_req
|
stats_req
|
||||||
.extensions_mut()
|
.extensions_mut()
|
||||||
.insert(AuthID::User(Into::<uuid::Uuid>::into(u.id).clone()));
|
.insert(AuthID::User(Into::<uuid::Uuid>::into(u.id)));
|
||||||
let stats_resp = service.get_metrics(stats_req).await.unwrap();
|
let stats_resp = service.get_metrics(stats_req).await.unwrap();
|
||||||
let stats_resp = stats_resp.get_ref();
|
let stats_resp = stats_resp.get_ref();
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
|
@ -1,11 +1,14 @@
|
|||||||
use chrono::{DateTime, Utc};
|
use chrono::{DateTime, Utc};
|
||||||
|
|
||||||
use crate::codec::Codec;
|
|
||||||
use crate::storage::fields::{MeasurementKind, MulticastGroupSchedulingType};
|
|
||||||
use crate::storage::{device::DeviceClass, metrics::Aggregation};
|
|
||||||
use chirpstack_api::{api, common};
|
use chirpstack_api::{api, common};
|
||||||
use lrwn::region::{CommonName, MacVersion, Revision};
|
use lrwn::region::{CommonName, MacVersion, Revision};
|
||||||
|
|
||||||
|
use crate::codec::Codec;
|
||||||
|
use crate::storage::fields::{
|
||||||
|
self, MeasurementKind, MulticastGroupSchedulingType, RequestFragmentationSessionStatus,
|
||||||
|
};
|
||||||
|
use crate::storage::{device, device::DeviceClass, gateway, metrics::Aggregation};
|
||||||
|
|
||||||
pub trait FromProto<T> {
|
pub trait FromProto<T> {
|
||||||
#[allow(clippy::wrong_self_convention)]
|
#[allow(clippy::wrong_self_convention)]
|
||||||
fn from_proto(self) -> T;
|
fn from_proto(self) -> T;
|
||||||
@ -263,6 +266,107 @@ impl ToProto<common::DeviceClass> for DeviceClass {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl FromProto<device::OrderBy> for api::list_devices_request::OrderBy {
|
||||||
|
fn from_proto(self) -> device::OrderBy {
|
||||||
|
match self {
|
||||||
|
Self::Name => device::OrderBy::Name,
|
||||||
|
Self::DevEui => device::OrderBy::DevEui,
|
||||||
|
Self::LastSeenAt => device::OrderBy::LastSeenAt,
|
||||||
|
Self::DeviceProfileName => device::OrderBy::DeviceProfileName,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl FromProto<gateway::OrderBy> for api::list_gateways_request::OrderBy {
|
||||||
|
fn from_proto(self) -> gateway::OrderBy {
|
||||||
|
match self {
|
||||||
|
Self::Name => gateway::OrderBy::Name,
|
||||||
|
Self::GatewayId => gateway::OrderBy::GatewayId,
|
||||||
|
Self::LastSeenAt => gateway::OrderBy::LastSeenAt,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl ToProto<api::Ts003Version> for Option<fields::device_profile::Ts003Version> {
|
||||||
|
fn to_proto(self) -> api::Ts003Version {
|
||||||
|
match self {
|
||||||
|
None => api::Ts003Version::Ts003NotImplemented,
|
||||||
|
Some(fields::device_profile::Ts003Version::V100) => api::Ts003Version::Ts003V100,
|
||||||
|
Some(fields::device_profile::Ts003Version::V200) => api::Ts003Version::Ts003V200,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl FromProto<Option<fields::device_profile::Ts003Version>> for api::Ts003Version {
|
||||||
|
fn from_proto(self) -> Option<fields::device_profile::Ts003Version> {
|
||||||
|
match self {
|
||||||
|
api::Ts003Version::Ts003NotImplemented => None,
|
||||||
|
api::Ts003Version::Ts003V100 => Some(fields::device_profile::Ts003Version::V100),
|
||||||
|
api::Ts003Version::Ts003V200 => Some(fields::device_profile::Ts003Version::V200),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl ToProto<api::Ts004Version> for Option<fields::device_profile::Ts004Version> {
|
||||||
|
fn to_proto(self) -> api::Ts004Version {
|
||||||
|
match self {
|
||||||
|
None => api::Ts004Version::Ts004NotImplemented,
|
||||||
|
Some(fields::device_profile::Ts004Version::V100) => api::Ts004Version::Ts004V100,
|
||||||
|
Some(fields::device_profile::Ts004Version::V200) => api::Ts004Version::Ts004V200,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl FromProto<Option<fields::device_profile::Ts004Version>> for api::Ts004Version {
|
||||||
|
fn from_proto(self) -> Option<fields::device_profile::Ts004Version> {
|
||||||
|
match self {
|
||||||
|
api::Ts004Version::Ts004NotImplemented => None,
|
||||||
|
api::Ts004Version::Ts004V100 => Some(fields::device_profile::Ts004Version::V100),
|
||||||
|
api::Ts004Version::Ts004V200 => Some(fields::device_profile::Ts004Version::V200),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl ToProto<api::Ts005Version> for Option<fields::device_profile::Ts005Version> {
|
||||||
|
fn to_proto(self) -> api::Ts005Version {
|
||||||
|
match self {
|
||||||
|
None => api::Ts005Version::Ts005NotImplemented,
|
||||||
|
Some(fields::device_profile::Ts005Version::V100) => api::Ts005Version::Ts005V100,
|
||||||
|
Some(fields::device_profile::Ts005Version::V200) => api::Ts005Version::Ts005V200,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl FromProto<Option<fields::device_profile::Ts005Version>> for api::Ts005Version {
|
||||||
|
fn from_proto(self) -> Option<fields::device_profile::Ts005Version> {
|
||||||
|
match self {
|
||||||
|
api::Ts005Version::Ts005NotImplemented => None,
|
||||||
|
api::Ts005Version::Ts005V100 => Some(fields::device_profile::Ts005Version::V100),
|
||||||
|
api::Ts005Version::Ts005V200 => Some(fields::device_profile::Ts005Version::V200),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl ToProto<api::RequestFragmentationSessionStatus> for RequestFragmentationSessionStatus {
|
||||||
|
fn to_proto(self) -> api::RequestFragmentationSessionStatus {
|
||||||
|
match self {
|
||||||
|
Self::NoRequest => api::RequestFragmentationSessionStatus::NoRequest,
|
||||||
|
Self::AfterFragEnqueue => api::RequestFragmentationSessionStatus::AfterFragmentEnqueue,
|
||||||
|
Self::AfterSessTimeout => api::RequestFragmentationSessionStatus::AfterSessionTimeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl FromProto<RequestFragmentationSessionStatus> for api::RequestFragmentationSessionStatus {
|
||||||
|
fn from_proto(self) -> RequestFragmentationSessionStatus {
|
||||||
|
match self {
|
||||||
|
Self::NoRequest => RequestFragmentationSessionStatus::NoRequest,
|
||||||
|
Self::AfterFragmentEnqueue => RequestFragmentationSessionStatus::AfterFragEnqueue,
|
||||||
|
Self::AfterSessionTimeout => RequestFragmentationSessionStatus::AfterSessTimeout,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub fn datetime_to_prost_timestamp(dt: &DateTime<Utc>) -> prost_types::Timestamp {
|
pub fn datetime_to_prost_timestamp(dt: &DateTime<Utc>) -> prost_types::Timestamp {
|
||||||
let ts = dt.timestamp_nanos_opt().unwrap_or_default();
|
let ts = dt.timestamp_nanos_opt().unwrap_or_default();
|
||||||
|
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
use std::sync::LazyLock;
|
||||||
use std::time::{Duration, Instant};
|
use std::time::{Duration, Instant};
|
||||||
use std::{
|
use std::{
|
||||||
future::Future,
|
future::Future,
|
||||||
@ -5,7 +6,7 @@ use std::{
|
|||||||
task::{Context, Poll},
|
task::{Context, Poll},
|
||||||
};
|
};
|
||||||
|
|
||||||
use anyhow::Result;
|
use anyhow::{Context as AnyhowContext, Result};
|
||||||
use axum::{response::IntoResponse, routing::get, Router};
|
use axum::{response::IntoResponse, routing::get, Router};
|
||||||
use http::{
|
use http::{
|
||||||
header::{self, HeaderMap, HeaderValue},
|
header::{self, HeaderMap, HeaderValue},
|
||||||
@ -32,6 +33,7 @@ use chirpstack_api::api::application_service_server::ApplicationServiceServer;
|
|||||||
use chirpstack_api::api::device_profile_service_server::DeviceProfileServiceServer;
|
use chirpstack_api::api::device_profile_service_server::DeviceProfileServiceServer;
|
||||||
use chirpstack_api::api::device_profile_template_service_server::DeviceProfileTemplateServiceServer;
|
use chirpstack_api::api::device_profile_template_service_server::DeviceProfileTemplateServiceServer;
|
||||||
use chirpstack_api::api::device_service_server::DeviceServiceServer;
|
use chirpstack_api::api::device_service_server::DeviceServiceServer;
|
||||||
|
use chirpstack_api::api::fuota_service_server::FuotaServiceServer;
|
||||||
use chirpstack_api::api::gateway_service_server::GatewayServiceServer;
|
use chirpstack_api::api::gateway_service_server::GatewayServiceServer;
|
||||||
use chirpstack_api::api::internal_service_server::InternalServiceServer;
|
use chirpstack_api::api::internal_service_server::InternalServiceServer;
|
||||||
use chirpstack_api::api::multicast_group_service_server::MulticastGroupServiceServer;
|
use chirpstack_api::api::multicast_group_service_server::MulticastGroupServiceServer;
|
||||||
@ -53,6 +55,7 @@ pub mod device;
|
|||||||
pub mod device_profile;
|
pub mod device_profile;
|
||||||
pub mod device_profile_template;
|
pub mod device_profile_template;
|
||||||
pub mod error;
|
pub mod error;
|
||||||
|
pub mod fuota;
|
||||||
pub mod gateway;
|
pub mod gateway;
|
||||||
mod grpc_multiplex;
|
mod grpc_multiplex;
|
||||||
pub mod helpers;
|
pub mod helpers;
|
||||||
@ -65,33 +68,31 @@ pub mod relay;
|
|||||||
pub mod tenant;
|
pub mod tenant;
|
||||||
pub mod user;
|
pub mod user;
|
||||||
|
|
||||||
lazy_static! {
|
static GRPC_COUNTER: LazyLock<Family<GrpcLabels, Counter>> = LazyLock::new(|| {
|
||||||
static ref GRPC_COUNTER: Family<GrpcLabels, Counter> = {
|
let counter = Family::<GrpcLabels, Counter>::default();
|
||||||
let counter = Family::<GrpcLabels, Counter>::default();
|
prometheus::register(
|
||||||
prometheus::register(
|
"api_requests_handled",
|
||||||
"api_requests_handled",
|
"Number of API requests handled by service, method and status code",
|
||||||
"Number of API requests handled by service, method and status code",
|
counter.clone(),
|
||||||
counter.clone(),
|
);
|
||||||
);
|
counter
|
||||||
counter
|
});
|
||||||
};
|
static GRPC_HISTOGRAM: LazyLock<Family<GrpcLabels, Histogram>> = LazyLock::new(|| {
|
||||||
static ref GRPC_HISTOGRAM: Family<GrpcLabels, Histogram> = {
|
let histogram = Family::<GrpcLabels, Histogram>::new_with_constructor(|| {
|
||||||
let histogram = Family::<GrpcLabels, Histogram>::new_with_constructor(|| {
|
Histogram::new(
|
||||||
Histogram::new(
|
[
|
||||||
[
|
0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0, 10.0,
|
||||||
0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0, 10.0,
|
]
|
||||||
]
|
.into_iter(),
|
||||||
.into_iter(),
|
)
|
||||||
)
|
});
|
||||||
});
|
prometheus::register(
|
||||||
prometheus::register(
|
"api_requests_handled_seconds",
|
||||||
"api_requests_handled_seconds",
|
"Duration of API requests handled by service, method and status code",
|
||||||
"Duration of API requests handled by service, method and status code",
|
histogram.clone(),
|
||||||
histogram.clone(),
|
);
|
||||||
);
|
histogram
|
||||||
histogram
|
});
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(RustEmbed)]
|
#[derive(RustEmbed)]
|
||||||
#[folder = "../ui/build"]
|
#[folder = "../ui/build"]
|
||||||
@ -101,7 +102,7 @@ type BoxError = Box<dyn std::error::Error + Send + Sync>;
|
|||||||
|
|
||||||
pub async fn setup() -> Result<()> {
|
pub async fn setup() -> Result<()> {
|
||||||
let conf = config::get();
|
let conf = config::get();
|
||||||
let bind = conf.api.bind.parse()?;
|
let bind = conf.api.bind.parse().context("Parse api.bind config")?;
|
||||||
|
|
||||||
info!(bind = %bind, "Setting up API interface");
|
info!(bind = %bind, "Setting up API interface");
|
||||||
|
|
||||||
@ -112,7 +113,7 @@ pub async fn setup() -> Result<()> {
|
|||||||
.route("/auth/oauth2/callback", get(oauth2::callback_handler))
|
.route("/auth/oauth2/callback", get(oauth2::callback_handler))
|
||||||
.fallback(service_static_handler)
|
.fallback(service_static_handler)
|
||||||
.into_service()
|
.into_service()
|
||||||
.map_response(|r| r.map(tonic::body::boxed));
|
.map_response(|r| r.map(tonic::body::Body::new));
|
||||||
|
|
||||||
let grpc = TonicServer::builder()
|
let grpc = TonicServer::builder()
|
||||||
.accept_http1(true)
|
.accept_http1(true)
|
||||||
@ -175,6 +176,10 @@ pub async fn setup() -> Result<()> {
|
|||||||
.add_service(RelayServiceServer::with_interceptor(
|
.add_service(RelayServiceServer::with_interceptor(
|
||||||
relay::Relay::new(validator::RequestValidator::new()),
|
relay::Relay::new(validator::RequestValidator::new()),
|
||||||
auth::auth_interceptor,
|
auth::auth_interceptor,
|
||||||
|
))
|
||||||
|
.add_service(FuotaServiceServer::with_interceptor(
|
||||||
|
fuota::Fuota::new(validator::RequestValidator::new()),
|
||||||
|
auth::auth_interceptor,
|
||||||
));
|
));
|
||||||
|
|
||||||
let backend_handle = tokio::spawn(backend::setup());
|
let backend_handle = tokio::spawn(backend::setup());
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user