mirror of
https://github.com/chirpstack/chirpstack.git
synced 2025-04-07 03:16:49 +00:00
parent
54b10cb693
commit
f970e94cca
255
api/csharp/Chirpstack/api/Internal.cs
vendored
255
api/csharp/Chirpstack/api/Internal.cs
vendored
@ -91,35 +91,37 @@ namespace Chirpstack.Api {
|
||||
"DRIcChRjbGFzc19iX3Bpbmdfc2xvdF9kchgJIAEoDRIjChtjbGFzc19iX3Bp",
|
||||
"bmdfc2xvdF9mcmVxdWVuY3kYCiABKA0SEwoLZGVzY3JpcHRpb24YCyABKAki",
|
||||
"QgoNUmVnaW9uQ2hhbm5lbBIRCglmcmVxdWVuY3kYASABKA0SDgoGZHJfbWlu",
|
||||
"GAIgASgNEg4KBmRyX21heBgDIAEoDTL4CAoPSW50ZXJuYWxTZXJ2aWNlEjAK",
|
||||
"BUxvZ2luEhEuYXBpLkxvZ2luUmVxdWVzdBoSLmFwaS5Mb2dpblJlc3BvbnNl",
|
||||
"IgASOQoHUHJvZmlsZRIWLmdvb2dsZS5wcm90b2J1Zi5FbXB0eRoULmFwaS5Q",
|
||||
"cm9maWxlUmVzcG9uc2UiABJFCgxHbG9iYWxTZWFyY2gSGC5hcGkuR2xvYmFs",
|
||||
"U2VhcmNoUmVxdWVzdBoZLmFwaS5HbG9iYWxTZWFyY2hSZXNwb25zZSIAEkUK",
|
||||
"DENyZWF0ZUFwaUtleRIYLmFwaS5DcmVhdGVBcGlLZXlSZXF1ZXN0GhkuYXBp",
|
||||
"LkNyZWF0ZUFwaUtleVJlc3BvbnNlIgASQgoMRGVsZXRlQXBpS2V5EhguYXBp",
|
||||
"LkRlbGV0ZUFwaUtleVJlcXVlc3QaFi5nb29nbGUucHJvdG9idWYuRW1wdHki",
|
||||
"ABJCCgtMaXN0QXBpS2V5cxIXLmFwaS5MaXN0QXBpS2V5c1JlcXVlc3QaGC5h",
|
||||
"cGkuTGlzdEFwaUtleXNSZXNwb25zZSIAEjsKCFNldHRpbmdzEhYuZ29vZ2xl",
|
||||
"LnByb3RvYnVmLkVtcHR5GhUuYXBpLlNldHRpbmdzUmVzcG9uc2UiABJXChJP",
|
||||
"cGVuSWRDb25uZWN0TG9naW4SHi5hcGkuT3BlbklkQ29ubmVjdExvZ2luUmVx",
|
||||
"dWVzdBofLmFwaS5PcGVuSWRDb25uZWN0TG9naW5SZXNwb25zZSIAEkIKC09B",
|
||||
"dXRoMkxvZ2luEhcuYXBpLk9BdXRoMkxvZ2luUmVxdWVzdBoYLmFwaS5PQXV0",
|
||||
"aDJMb2dpblJlc3BvbnNlIgASVAoRR2V0RGV2aWNlc1N1bW1hcnkSHS5hcGku",
|
||||
"R2V0RGV2aWNlc1N1bW1hcnlSZXF1ZXN0Gh4uYXBpLkdldERldmljZXNTdW1t",
|
||||
"YXJ5UmVzcG9uc2UiABJXChJHZXRHYXRld2F5c1N1bW1hcnkSHi5hcGkuR2V0",
|
||||
"R2F0ZXdheXNTdW1tYXJ5UmVxdWVzdBofLmFwaS5HZXRHYXRld2F5c1N1bW1h",
|
||||
"cnlSZXNwb25zZSIAEkgKE1N0cmVhbUdhdGV3YXlGcmFtZXMSHy5hcGkuU3Ry",
|
||||
"ZWFtR2F0ZXdheUZyYW1lc1JlcXVlc3QaDC5hcGkuTG9nSXRlbSIAMAESRgoS",
|
||||
"U3RyZWFtRGV2aWNlRnJhbWVzEh4uYXBpLlN0cmVhbURldmljZUZyYW1lc1Jl",
|
||||
"cXVlc3QaDC5hcGkuTG9nSXRlbSIAMAESRgoSU3RyZWFtRGV2aWNlRXZlbnRz",
|
||||
"Eh4uYXBpLlN0cmVhbURldmljZUV2ZW50c1JlcXVlc3QaDC5hcGkuTG9nSXRl",
|
||||
"bSIAMAESQQoLTGlzdFJlZ2lvbnMSFi5nb29nbGUucHJvdG9idWYuRW1wdHka",
|
||||
"GC5hcGkuTGlzdFJlZ2lvbnNSZXNwb25zZSIAEjwKCUdldFJlZ2lvbhIVLmFw",
|
||||
"aS5HZXRSZWdpb25SZXF1ZXN0GhYuYXBpLkdldFJlZ2lvblJlc3BvbnNlIgBC",
|
||||
"ZQoRaW8uY2hpcnBzdGFjay5hcGlCDUludGVybmFsUHJvdG9QAVouZ2l0aHVi",
|
||||
"LmNvbS9jaGlycHN0YWNrL2NoaXJwc3RhY2svYXBpL2dvL3Y0L2FwaaoCDkNo",
|
||||
"aXJwc3RhY2suQXBpYgZwcm90bzM="));
|
||||
"GAIgASgNEg4KBmRyX21heBgDIAEoDSIlChJHZXRWZXJzaW9uUmVzcG9uc2US",
|
||||
"DwoHdmVyc2lvbhgBIAEoCTK5CQoPSW50ZXJuYWxTZXJ2aWNlEjAKBUxvZ2lu",
|
||||
"EhEuYXBpLkxvZ2luUmVxdWVzdBoSLmFwaS5Mb2dpblJlc3BvbnNlIgASOQoH",
|
||||
"UHJvZmlsZRIWLmdvb2dsZS5wcm90b2J1Zi5FbXB0eRoULmFwaS5Qcm9maWxl",
|
||||
"UmVzcG9uc2UiABJFCgxHbG9iYWxTZWFyY2gSGC5hcGkuR2xvYmFsU2VhcmNo",
|
||||
"UmVxdWVzdBoZLmFwaS5HbG9iYWxTZWFyY2hSZXNwb25zZSIAEkUKDENyZWF0",
|
||||
"ZUFwaUtleRIYLmFwaS5DcmVhdGVBcGlLZXlSZXF1ZXN0GhkuYXBpLkNyZWF0",
|
||||
"ZUFwaUtleVJlc3BvbnNlIgASQgoMRGVsZXRlQXBpS2V5EhguYXBpLkRlbGV0",
|
||||
"ZUFwaUtleVJlcXVlc3QaFi5nb29nbGUucHJvdG9idWYuRW1wdHkiABJCCgtM",
|
||||
"aXN0QXBpS2V5cxIXLmFwaS5MaXN0QXBpS2V5c1JlcXVlc3QaGC5hcGkuTGlz",
|
||||
"dEFwaUtleXNSZXNwb25zZSIAEjsKCFNldHRpbmdzEhYuZ29vZ2xlLnByb3Rv",
|
||||
"YnVmLkVtcHR5GhUuYXBpLlNldHRpbmdzUmVzcG9uc2UiABJXChJPcGVuSWRD",
|
||||
"b25uZWN0TG9naW4SHi5hcGkuT3BlbklkQ29ubmVjdExvZ2luUmVxdWVzdBof",
|
||||
"LmFwaS5PcGVuSWRDb25uZWN0TG9naW5SZXNwb25zZSIAEkIKC09BdXRoMkxv",
|
||||
"Z2luEhcuYXBpLk9BdXRoMkxvZ2luUmVxdWVzdBoYLmFwaS5PQXV0aDJMb2dp",
|
||||
"blJlc3BvbnNlIgASVAoRR2V0RGV2aWNlc1N1bW1hcnkSHS5hcGkuR2V0RGV2",
|
||||
"aWNlc1N1bW1hcnlSZXF1ZXN0Gh4uYXBpLkdldERldmljZXNTdW1tYXJ5UmVz",
|
||||
"cG9uc2UiABJXChJHZXRHYXRld2F5c1N1bW1hcnkSHi5hcGkuR2V0R2F0ZXdh",
|
||||
"eXNTdW1tYXJ5UmVxdWVzdBofLmFwaS5HZXRHYXRld2F5c1N1bW1hcnlSZXNw",
|
||||
"b25zZSIAEkgKE1N0cmVhbUdhdGV3YXlGcmFtZXMSHy5hcGkuU3RyZWFtR2F0",
|
||||
"ZXdheUZyYW1lc1JlcXVlc3QaDC5hcGkuTG9nSXRlbSIAMAESRgoSU3RyZWFt",
|
||||
"RGV2aWNlRnJhbWVzEh4uYXBpLlN0cmVhbURldmljZUZyYW1lc1JlcXVlc3Qa",
|
||||
"DC5hcGkuTG9nSXRlbSIAMAESRgoSU3RyZWFtRGV2aWNlRXZlbnRzEh4uYXBp",
|
||||
"LlN0cmVhbURldmljZUV2ZW50c1JlcXVlc3QaDC5hcGkuTG9nSXRlbSIAMAES",
|
||||
"QQoLTGlzdFJlZ2lvbnMSFi5nb29nbGUucHJvdG9idWYuRW1wdHkaGC5hcGku",
|
||||
"TGlzdFJlZ2lvbnNSZXNwb25zZSIAEjwKCUdldFJlZ2lvbhIVLmFwaS5HZXRS",
|
||||
"ZWdpb25SZXF1ZXN0GhYuYXBpLkdldFJlZ2lvblJlc3BvbnNlIgASPwoKR2V0",
|
||||
"VmVyc2lvbhIWLmdvb2dsZS5wcm90b2J1Zi5FbXB0eRoXLmFwaS5HZXRWZXJz",
|
||||
"aW9uUmVzcG9uc2UiAEJlChFpby5jaGlycHN0YWNrLmFwaUINSW50ZXJuYWxQ",
|
||||
"cm90b1ABWi5naXRodWIuY29tL2NoaXJwc3RhY2svY2hpcnBzdGFjay9hcGkv",
|
||||
"Z28vdjQvYXBpqgIOQ2hpcnBzdGFjay5BcGliBnByb3RvMw=="));
|
||||
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
|
||||
new pbr::FileDescriptor[] { global::Google.Protobuf.WellKnownTypes.TimestampReflection.Descriptor, global::Google.Protobuf.WellKnownTypes.EmptyReflection.Descriptor, global::Chirpstack.Common.CommonReflection.Descriptor, global::Chirpstack.Api.UserReflection.Descriptor, },
|
||||
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
|
||||
@ -155,7 +157,8 @@ namespace Chirpstack.Api {
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Api.RegionListItem), global::Chirpstack.Api.RegionListItem.Parser, new[]{ "Id", "Region", "Description" }, null, null, null, null),
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Api.GetRegionRequest), global::Chirpstack.Api.GetRegionRequest.Parser, new[]{ "Id" }, null, null, null, null),
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Api.GetRegionResponse), global::Chirpstack.Api.GetRegionResponse.Parser, new[]{ "Id", "Region", "UserInfo", "UplinkChannels", "Rx1Delay", "Rx1DrOffset", "Rx2Dr", "Rx2Frequency", "ClassBPingSlotDr", "ClassBPingSlotFrequency", "Description" }, null, null, null, null),
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Api.RegionChannel), global::Chirpstack.Api.RegionChannel.Parser, new[]{ "Frequency", "DrMin", "DrMax" }, null, null, null, null)
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Api.RegionChannel), global::Chirpstack.Api.RegionChannel.Parser, new[]{ "Frequency", "DrMin", "DrMax" }, null, null, null, null),
|
||||
new pbr::GeneratedClrTypeInfo(typeof(global::Chirpstack.Api.GetVersionResponse), global::Chirpstack.Api.GetVersionResponse.Parser, new[]{ "Version" }, null, null, null, null)
|
||||
}));
|
||||
}
|
||||
#endregion
|
||||
@ -8886,6 +8889,198 @@ namespace Chirpstack.Api {
|
||||
|
||||
}
|
||||
|
||||
public sealed partial class GetVersionResponse : pb::IMessage<GetVersionResponse>
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
, pb::IBufferMessage
|
||||
#endif
|
||||
{
|
||||
private static readonly pb::MessageParser<GetVersionResponse> _parser = new pb::MessageParser<GetVersionResponse>(() => new GetVersionResponse());
|
||||
private pb::UnknownFieldSet _unknownFields;
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pb::MessageParser<GetVersionResponse> Parser { get { return _parser; } }
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public static pbr::MessageDescriptor Descriptor {
|
||||
get { return global::Chirpstack.Api.InternalReflection.Descriptor.MessageTypes[33]; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
pbr::MessageDescriptor pb::IMessage.Descriptor {
|
||||
get { return Descriptor; }
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public GetVersionResponse() {
|
||||
OnConstruction();
|
||||
}
|
||||
|
||||
partial void OnConstruction();
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public GetVersionResponse(GetVersionResponse other) : this() {
|
||||
version_ = other.version_;
|
||||
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public GetVersionResponse Clone() {
|
||||
return new GetVersionResponse(this);
|
||||
}
|
||||
|
||||
/// <summary>Field number for the "version" field.</summary>
|
||||
public const int VersionFieldNumber = 1;
|
||||
private string version_ = "";
|
||||
/// <summary>
|
||||
/// version
|
||||
/// </summary>
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public string Version {
|
||||
get { return version_; }
|
||||
set {
|
||||
version_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override bool Equals(object other) {
|
||||
return Equals(other as GetVersionResponse);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public bool Equals(GetVersionResponse other) {
|
||||
if (ReferenceEquals(other, null)) {
|
||||
return false;
|
||||
}
|
||||
if (ReferenceEquals(other, this)) {
|
||||
return true;
|
||||
}
|
||||
if (Version != other.Version) return false;
|
||||
return Equals(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override int GetHashCode() {
|
||||
int hash = 1;
|
||||
if (Version.Length != 0) hash ^= Version.GetHashCode();
|
||||
if (_unknownFields != null) {
|
||||
hash ^= _unknownFields.GetHashCode();
|
||||
}
|
||||
return hash;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public override string ToString() {
|
||||
return pb::JsonFormatter.ToDiagnosticString(this);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void WriteTo(pb::CodedOutputStream output) {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
output.WriteRawMessage(this);
|
||||
#else
|
||||
if (Version.Length != 0) {
|
||||
output.WriteRawTag(10);
|
||||
output.WriteString(Version);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(output);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
|
||||
if (Version.Length != 0) {
|
||||
output.WriteRawTag(10);
|
||||
output.WriteString(Version);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
_unknownFields.WriteTo(ref output);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public int CalculateSize() {
|
||||
int size = 0;
|
||||
if (Version.Length != 0) {
|
||||
size += 1 + pb::CodedOutputStream.ComputeStringSize(Version);
|
||||
}
|
||||
if (_unknownFields != null) {
|
||||
size += _unknownFields.CalculateSize();
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(GetVersionResponse other) {
|
||||
if (other == null) {
|
||||
return;
|
||||
}
|
||||
if (other.Version.Length != 0) {
|
||||
Version = other.Version;
|
||||
}
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
|
||||
}
|
||||
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
public void MergeFrom(pb::CodedInputStream input) {
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
input.ReadRawMessage(this);
|
||||
#else
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
|
||||
break;
|
||||
case 10: {
|
||||
Version = input.ReadString();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
|
||||
void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
|
||||
uint tag;
|
||||
while ((tag = input.ReadTag()) != 0) {
|
||||
switch(tag) {
|
||||
default:
|
||||
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
|
||||
break;
|
||||
case 10: {
|
||||
Version = input.ReadString();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
|
74
api/csharp/Chirpstack/api/InternalGrpc.cs
vendored
74
api/csharp/Chirpstack/api/InternalGrpc.cs
vendored
@ -102,6 +102,8 @@ namespace Chirpstack.Api {
|
||||
static readonly grpc::Marshaller<global::Chirpstack.Api.GetRegionRequest> __Marshaller_api_GetRegionRequest = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Chirpstack.Api.GetRegionRequest.Parser));
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
|
||||
static readonly grpc::Marshaller<global::Chirpstack.Api.GetRegionResponse> __Marshaller_api_GetRegionResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Chirpstack.Api.GetRegionResponse.Parser));
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
|
||||
static readonly grpc::Marshaller<global::Chirpstack.Api.GetVersionResponse> __Marshaller_api_GetVersionResponse = grpc::Marshallers.Create(__Helper_SerializeMessage, context => __Helper_DeserializeMessage(context, global::Chirpstack.Api.GetVersionResponse.Parser));
|
||||
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
|
||||
static readonly grpc::Method<global::Chirpstack.Api.LoginRequest, global::Chirpstack.Api.LoginResponse> __Method_Login = new grpc::Method<global::Chirpstack.Api.LoginRequest, global::Chirpstack.Api.LoginResponse>(
|
||||
@ -231,6 +233,14 @@ namespace Chirpstack.Api {
|
||||
__Marshaller_api_GetRegionRequest,
|
||||
__Marshaller_api_GetRegionResponse);
|
||||
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
|
||||
static readonly grpc::Method<global::Google.Protobuf.WellKnownTypes.Empty, global::Chirpstack.Api.GetVersionResponse> __Method_GetVersion = new grpc::Method<global::Google.Protobuf.WellKnownTypes.Empty, global::Chirpstack.Api.GetVersionResponse>(
|
||||
grpc::MethodType.Unary,
|
||||
__ServiceName,
|
||||
"GetVersion",
|
||||
__Marshaller_google_protobuf_Empty,
|
||||
__Marshaller_api_GetVersionResponse);
|
||||
|
||||
/// <summary>Service descriptor</summary>
|
||||
public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
|
||||
{
|
||||
@ -436,6 +446,18 @@ namespace Chirpstack.Api {
|
||||
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// GetVersion returns the ChirpStack version.
|
||||
/// </summary>
|
||||
/// <param name="request">The request received from the client.</param>
|
||||
/// <param name="context">The context of the server-side call handler being invoked.</param>
|
||||
/// <returns>The response to send back to the client (wrapped by a task).</returns>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
|
||||
public virtual global::System.Threading.Tasks.Task<global::Chirpstack.Api.GetVersionResponse> GetVersion(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::ServerCallContext context)
|
||||
{
|
||||
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>Client for InternalService</summary>
|
||||
@ -1161,6 +1183,54 @@ namespace Chirpstack.Api {
|
||||
{
|
||||
return CallInvoker.AsyncUnaryCall(__Method_GetRegion, null, options, request);
|
||||
}
|
||||
/// <summary>
|
||||
/// GetVersion returns the ChirpStack version.
|
||||
/// </summary>
|
||||
/// <param name="request">The request to send to the server.</param>
|
||||
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
|
||||
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
|
||||
/// <param name="cancellationToken">An optional token for canceling the call.</param>
|
||||
/// <returns>The response received from the server.</returns>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
|
||||
public virtual global::Chirpstack.Api.GetVersionResponse GetVersion(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
|
||||
{
|
||||
return GetVersion(request, new grpc::CallOptions(headers, deadline, cancellationToken));
|
||||
}
|
||||
/// <summary>
|
||||
/// GetVersion returns the ChirpStack version.
|
||||
/// </summary>
|
||||
/// <param name="request">The request to send to the server.</param>
|
||||
/// <param name="options">The options for the call.</param>
|
||||
/// <returns>The response received from the server.</returns>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
|
||||
public virtual global::Chirpstack.Api.GetVersionResponse GetVersion(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::CallOptions options)
|
||||
{
|
||||
return CallInvoker.BlockingUnaryCall(__Method_GetVersion, null, options, request);
|
||||
}
|
||||
/// <summary>
|
||||
/// GetVersion returns the ChirpStack version.
|
||||
/// </summary>
|
||||
/// <param name="request">The request to send to the server.</param>
|
||||
/// <param name="headers">The initial metadata to send with the call. This parameter is optional.</param>
|
||||
/// <param name="deadline">An optional deadline for the call. The call will be cancelled if deadline is hit.</param>
|
||||
/// <param name="cancellationToken">An optional token for canceling the call.</param>
|
||||
/// <returns>The call object.</returns>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
|
||||
public virtual grpc::AsyncUnaryCall<global::Chirpstack.Api.GetVersionResponse> GetVersionAsync(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
|
||||
{
|
||||
return GetVersionAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
|
||||
}
|
||||
/// <summary>
|
||||
/// GetVersion returns the ChirpStack version.
|
||||
/// </summary>
|
||||
/// <param name="request">The request to send to the server.</param>
|
||||
/// <param name="options">The options for the call.</param>
|
||||
/// <returns>The call object.</returns>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
|
||||
public virtual grpc::AsyncUnaryCall<global::Chirpstack.Api.GetVersionResponse> GetVersionAsync(global::Google.Protobuf.WellKnownTypes.Empty request, grpc::CallOptions options)
|
||||
{
|
||||
return CallInvoker.AsyncUnaryCall(__Method_GetVersion, null, options, request);
|
||||
}
|
||||
/// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
|
||||
[global::System.CodeDom.Compiler.GeneratedCode("grpc_csharp_plugin", null)]
|
||||
protected override InternalServiceClient NewInstance(ClientBaseConfiguration configuration)
|
||||
@ -1190,7 +1260,8 @@ namespace Chirpstack.Api {
|
||||
.AddMethod(__Method_StreamDeviceFrames, serviceImpl.StreamDeviceFrames)
|
||||
.AddMethod(__Method_StreamDeviceEvents, serviceImpl.StreamDeviceEvents)
|
||||
.AddMethod(__Method_ListRegions, serviceImpl.ListRegions)
|
||||
.AddMethod(__Method_GetRegion, serviceImpl.GetRegion).Build();
|
||||
.AddMethod(__Method_GetRegion, serviceImpl.GetRegion)
|
||||
.AddMethod(__Method_GetVersion, serviceImpl.GetVersion).Build();
|
||||
}
|
||||
|
||||
/// <summary>Register service method with a service binder with or without implementation. Useful when customizing the service binding logic.
|
||||
@ -1216,6 +1287,7 @@ namespace Chirpstack.Api {
|
||||
serviceBinder.AddMethod(__Method_StreamDeviceEvents, serviceImpl == null ? null : new grpc::ServerStreamingServerMethod<global::Chirpstack.Api.StreamDeviceEventsRequest, global::Chirpstack.Api.LogItem>(serviceImpl.StreamDeviceEvents));
|
||||
serviceBinder.AddMethod(__Method_ListRegions, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Google.Protobuf.WellKnownTypes.Empty, global::Chirpstack.Api.ListRegionsResponse>(serviceImpl.ListRegions));
|
||||
serviceBinder.AddMethod(__Method_GetRegion, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Chirpstack.Api.GetRegionRequest, global::Chirpstack.Api.GetRegionResponse>(serviceImpl.GetRegion));
|
||||
serviceBinder.AddMethod(__Method_GetVersion, serviceImpl == null ? null : new grpc::UnaryServerMethod<global::Google.Protobuf.WellKnownTypes.Empty, global::Chirpstack.Api.GetVersionResponse>(serviceImpl.GetVersion));
|
||||
}
|
||||
|
||||
}
|
||||
|
12
api/grpc-web/api/internal_grpc_web_pb.d.ts
vendored
12
api/grpc-web/api/internal_grpc_web_pb.d.ts
vendored
@ -115,6 +115,13 @@ export class InternalServiceClient {
|
||||
response: api_internal_pb.GetRegionResponse) => void
|
||||
): grpcWeb.ClientReadableStream<api_internal_pb.GetRegionResponse>;
|
||||
|
||||
getVersion(
|
||||
request: google_protobuf_empty_pb.Empty,
|
||||
metadata: grpcWeb.Metadata | undefined,
|
||||
callback: (err: grpcWeb.RpcError,
|
||||
response: api_internal_pb.GetVersionResponse) => void
|
||||
): grpcWeb.ClientReadableStream<api_internal_pb.GetVersionResponse>;
|
||||
|
||||
}
|
||||
|
||||
export class InternalServicePromiseClient {
|
||||
@ -202,5 +209,10 @@ export class InternalServicePromiseClient {
|
||||
metadata?: grpcWeb.Metadata
|
||||
): Promise<api_internal_pb.GetRegionResponse>;
|
||||
|
||||
getVersion(
|
||||
request: google_protobuf_empty_pb.Empty,
|
||||
metadata?: grpcWeb.Metadata
|
||||
): Promise<api_internal_pb.GetVersionResponse>;
|
||||
|
||||
}
|
||||
|
||||
|
61
api/grpc-web/api/internal_grpc_web_pb.js
vendored
61
api/grpc-web/api/internal_grpc_web_pb.js
vendored
@ -1043,5 +1043,66 @@ proto.api.InternalServicePromiseClient.prototype.getRegion =
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @const
|
||||
* @type {!grpc.web.MethodDescriptor<
|
||||
* !proto.google.protobuf.Empty,
|
||||
* !proto.api.GetVersionResponse>}
|
||||
*/
|
||||
const methodDescriptor_InternalService_GetVersion = new grpc.web.MethodDescriptor(
|
||||
'/api.InternalService/GetVersion',
|
||||
grpc.web.MethodType.UNARY,
|
||||
google_protobuf_empty_pb.Empty,
|
||||
proto.api.GetVersionResponse,
|
||||
/**
|
||||
* @param {!proto.google.protobuf.Empty} request
|
||||
* @return {!Uint8Array}
|
||||
*/
|
||||
function(request) {
|
||||
return request.serializeBinary();
|
||||
},
|
||||
proto.api.GetVersionResponse.deserializeBinary
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
* @param {!proto.google.protobuf.Empty} request The
|
||||
* request proto
|
||||
* @param {?Object<string, string>} metadata User defined
|
||||
* call metadata
|
||||
* @param {function(?grpc.web.RpcError, ?proto.api.GetVersionResponse)}
|
||||
* callback The callback function(error, response)
|
||||
* @return {!grpc.web.ClientReadableStream<!proto.api.GetVersionResponse>|undefined}
|
||||
* The XHR Node Readable Stream
|
||||
*/
|
||||
proto.api.InternalServiceClient.prototype.getVersion =
|
||||
function(request, metadata, callback) {
|
||||
return this.client_.rpcCall(this.hostname_ +
|
||||
'/api.InternalService/GetVersion',
|
||||
request,
|
||||
metadata || {},
|
||||
methodDescriptor_InternalService_GetVersion,
|
||||
callback);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {!proto.google.protobuf.Empty} request The
|
||||
* request proto
|
||||
* @param {?Object<string, string>=} metadata User defined
|
||||
* call metadata
|
||||
* @return {!Promise<!proto.api.GetVersionResponse>}
|
||||
* Promise that resolves to the response
|
||||
*/
|
||||
proto.api.InternalServicePromiseClient.prototype.getVersion =
|
||||
function(request, metadata) {
|
||||
return this.client_.unaryCall(this.hostname_ +
|
||||
'/api.InternalService/GetVersion',
|
||||
request,
|
||||
metadata || {},
|
||||
methodDescriptor_InternalService_GetVersion);
|
||||
};
|
||||
|
||||
|
||||
module.exports = proto.api;
|
||||
|
||||
|
18
api/grpc-web/api/internal_pb.d.ts
vendored
18
api/grpc-web/api/internal_pb.d.ts
vendored
@ -864,3 +864,21 @@ export namespace RegionChannel {
|
||||
}
|
||||
}
|
||||
|
||||
export class GetVersionResponse extends jspb.Message {
|
||||
getVersion(): string;
|
||||
setVersion(value: string): GetVersionResponse;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): GetVersionResponse.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: GetVersionResponse): GetVersionResponse.AsObject;
|
||||
static serializeBinaryToWriter(message: GetVersionResponse, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): GetVersionResponse;
|
||||
static deserializeBinaryFromReader(message: GetVersionResponse, reader: jspb.BinaryReader): GetVersionResponse;
|
||||
}
|
||||
|
||||
export namespace GetVersionResponse {
|
||||
export type AsObject = {
|
||||
version: string,
|
||||
}
|
||||
}
|
||||
|
||||
|
152
api/grpc-web/api/internal_pb.js
vendored
152
api/grpc-web/api/internal_pb.js
vendored
@ -30,6 +30,7 @@ goog.exportSymbol('proto.api.GetGatewaysSummaryRequest', null, global);
|
||||
goog.exportSymbol('proto.api.GetGatewaysSummaryResponse', null, global);
|
||||
goog.exportSymbol('proto.api.GetRegionRequest', null, global);
|
||||
goog.exportSymbol('proto.api.GetRegionResponse', null, global);
|
||||
goog.exportSymbol('proto.api.GetVersionResponse', null, global);
|
||||
goog.exportSymbol('proto.api.GlobalSearchRequest', null, global);
|
||||
goog.exportSymbol('proto.api.GlobalSearchResponse', null, global);
|
||||
goog.exportSymbol('proto.api.GlobalSearchResult', null, global);
|
||||
@ -746,6 +747,27 @@ if (goog.DEBUG && !COMPILED) {
|
||||
*/
|
||||
proto.api.RegionChannel.displayName = 'proto.api.RegionChannel';
|
||||
}
|
||||
/**
|
||||
* Generated by JsPbCodeGenerator.
|
||||
* @param {Array=} opt_data Optional initial data array, typically from a
|
||||
* server response, or constructed directly in Javascript. The array is used
|
||||
* in place and becomes part of the constructed object. It is not cloned.
|
||||
* If no data is provided, the constructed object will be empty, but still
|
||||
* valid.
|
||||
* @extends {jspb.Message}
|
||||
* @constructor
|
||||
*/
|
||||
proto.api.GetVersionResponse = function(opt_data) {
|
||||
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
||||
};
|
||||
goog.inherits(proto.api.GetVersionResponse, jspb.Message);
|
||||
if (goog.DEBUG && !COMPILED) {
|
||||
/**
|
||||
* @public
|
||||
* @override
|
||||
*/
|
||||
proto.api.GetVersionResponse.displayName = 'proto.api.GetVersionResponse';
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -7139,4 +7161,134 @@ proto.api.RegionChannel.prototype.setDrMax = function(value) {
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||||
/**
|
||||
* Creates an object representation of this proto.
|
||||
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
||||
* Optional fields that are not set will be set to undefined.
|
||||
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
||||
* For the list of reserved names please see:
|
||||
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
||||
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
||||
* JSPB instance for transitional soy proto support:
|
||||
* http://goto/soy-param-migration
|
||||
* @return {!Object}
|
||||
*/
|
||||
proto.api.GetVersionResponse.prototype.toObject = function(opt_includeInstance) {
|
||||
return proto.api.GetVersionResponse.toObject(opt_includeInstance, this);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Static version of the {@see toObject} method.
|
||||
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
||||
* the JSPB instance for transitional soy proto support:
|
||||
* http://goto/soy-param-migration
|
||||
* @param {!proto.api.GetVersionResponse} msg The msg instance to transform.
|
||||
* @return {!Object}
|
||||
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||
*/
|
||||
proto.api.GetVersionResponse.toObject = function(includeInstance, msg) {
|
||||
var f, obj = {
|
||||
version: jspb.Message.getFieldWithDefault(msg, 1, "")
|
||||
};
|
||||
|
||||
if (includeInstance) {
|
||||
obj.$jspbMessageInstance = msg;
|
||||
}
|
||||
return obj;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Deserializes binary data (in protobuf wire format).
|
||||
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
||||
* @return {!proto.api.GetVersionResponse}
|
||||
*/
|
||||
proto.api.GetVersionResponse.deserializeBinary = function(bytes) {
|
||||
var reader = new jspb.BinaryReader(bytes);
|
||||
var msg = new proto.api.GetVersionResponse;
|
||||
return proto.api.GetVersionResponse.deserializeBinaryFromReader(msg, reader);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Deserializes binary data (in protobuf wire format) from the
|
||||
* given reader into the given message object.
|
||||
* @param {!proto.api.GetVersionResponse} msg The message object to deserialize into.
|
||||
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
||||
* @return {!proto.api.GetVersionResponse}
|
||||
*/
|
||||
proto.api.GetVersionResponse.deserializeBinaryFromReader = function(msg, reader) {
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup()) {
|
||||
break;
|
||||
}
|
||||
var field = reader.getFieldNumber();
|
||||
switch (field) {
|
||||
case 1:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.setVersion(value);
|
||||
break;
|
||||
default:
|
||||
reader.skipField();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return msg;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Serializes the message to binary data (in protobuf wire format).
|
||||
* @return {!Uint8Array}
|
||||
*/
|
||||
proto.api.GetVersionResponse.prototype.serializeBinary = function() {
|
||||
var writer = new jspb.BinaryWriter();
|
||||
proto.api.GetVersionResponse.serializeBinaryToWriter(this, writer);
|
||||
return writer.getResultBuffer();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Serializes the given message to binary data (in protobuf wire
|
||||
* format), writing to the given BinaryWriter.
|
||||
* @param {!proto.api.GetVersionResponse} message
|
||||
* @param {!jspb.BinaryWriter} writer
|
||||
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||
*/
|
||||
proto.api.GetVersionResponse.serializeBinaryToWriter = function(message, writer) {
|
||||
var f = undefined;
|
||||
f = message.getVersion();
|
||||
if (f.length > 0) {
|
||||
writer.writeString(
|
||||
1,
|
||||
f
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional string version = 1;
|
||||
* @return {string}
|
||||
*/
|
||||
proto.api.GetVersionResponse.prototype.getVersion = function() {
|
||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @return {!proto.api.GetVersionResponse} returns this
|
||||
*/
|
||||
proto.api.GetVersionResponse.prototype.setVersion = function(value) {
|
||||
return jspb.Message.setProto3StringField(this, 1, value);
|
||||
};
|
||||
|
||||
|
||||
goog.object.extend(exports, proto.api);
|
||||
|
5
api/js/api/internal_grpc_pb.d.ts
vendored
5
api/js/api/internal_grpc_pb.d.ts
vendored
@ -24,6 +24,7 @@ interface IInternalServiceService extends grpc.ServiceDefinition<grpc.UntypedSer
|
||||
streamDeviceEvents: grpc.MethodDefinition<api_internal_pb.StreamDeviceEventsRequest, api_internal_pb.LogItem>;
|
||||
listRegions: grpc.MethodDefinition<google_protobuf_empty_pb.Empty, api_internal_pb.ListRegionsResponse>;
|
||||
getRegion: grpc.MethodDefinition<api_internal_pb.GetRegionRequest, api_internal_pb.GetRegionResponse>;
|
||||
getVersion: grpc.MethodDefinition<google_protobuf_empty_pb.Empty, api_internal_pb.GetVersionResponse>;
|
||||
}
|
||||
|
||||
export const InternalServiceService: IInternalServiceService;
|
||||
@ -45,6 +46,7 @@ export interface IInternalServiceServer extends grpc.UntypedServiceImplementatio
|
||||
streamDeviceEvents: grpc.handleServerStreamingCall<api_internal_pb.StreamDeviceEventsRequest, api_internal_pb.LogItem>;
|
||||
listRegions: grpc.handleUnaryCall<google_protobuf_empty_pb.Empty, api_internal_pb.ListRegionsResponse>;
|
||||
getRegion: grpc.handleUnaryCall<api_internal_pb.GetRegionRequest, api_internal_pb.GetRegionResponse>;
|
||||
getVersion: grpc.handleUnaryCall<google_protobuf_empty_pb.Empty, api_internal_pb.GetVersionResponse>;
|
||||
}
|
||||
|
||||
export class InternalServiceClient extends grpc.Client {
|
||||
@ -94,4 +96,7 @@ export class InternalServiceClient extends grpc.Client {
|
||||
getRegion(argument: api_internal_pb.GetRegionRequest, callback: grpc.requestCallback<api_internal_pb.GetRegionResponse>): grpc.ClientUnaryCall;
|
||||
getRegion(argument: api_internal_pb.GetRegionRequest, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback<api_internal_pb.GetRegionResponse>): grpc.ClientUnaryCall;
|
||||
getRegion(argument: api_internal_pb.GetRegionRequest, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback<api_internal_pb.GetRegionResponse>): grpc.ClientUnaryCall;
|
||||
getVersion(argument: google_protobuf_empty_pb.Empty, callback: grpc.requestCallback<api_internal_pb.GetVersionResponse>): grpc.ClientUnaryCall;
|
||||
getVersion(argument: google_protobuf_empty_pb.Empty, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback<api_internal_pb.GetVersionResponse>): grpc.ClientUnaryCall;
|
||||
getVersion(argument: google_protobuf_empty_pb.Empty, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback<api_internal_pb.GetVersionResponse>): grpc.ClientUnaryCall;
|
||||
}
|
||||
|
23
api/js/api/internal_grpc_pb.js
vendored
23
api/js/api/internal_grpc_pb.js
vendored
@ -107,6 +107,17 @@ function deserialize_api_GetRegionResponse(buffer_arg) {
|
||||
return api_internal_pb.GetRegionResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
||||
}
|
||||
|
||||
function serialize_api_GetVersionResponse(arg) {
|
||||
if (!(arg instanceof api_internal_pb.GetVersionResponse)) {
|
||||
throw new Error('Expected argument of type api.GetVersionResponse');
|
||||
}
|
||||
return Buffer.from(arg.serializeBinary());
|
||||
}
|
||||
|
||||
function deserialize_api_GetVersionResponse(buffer_arg) {
|
||||
return api_internal_pb.GetVersionResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
||||
}
|
||||
|
||||
function serialize_api_GlobalSearchRequest(arg) {
|
||||
if (!(arg instanceof api_internal_pb.GlobalSearchRequest)) {
|
||||
throw new Error('Expected argument of type api.GlobalSearchRequest');
|
||||
@ -500,6 +511,18 @@ getRegion: {
|
||||
responseSerialize: serialize_api_GetRegionResponse,
|
||||
responseDeserialize: deserialize_api_GetRegionResponse,
|
||||
},
|
||||
// GetVersion returns the ChirpStack version.
|
||||
getVersion: {
|
||||
path: '/api.InternalService/GetVersion',
|
||||
requestStream: false,
|
||||
responseStream: false,
|
||||
requestType: google_protobuf_empty_pb.Empty,
|
||||
responseType: api_internal_pb.GetVersionResponse,
|
||||
requestSerialize: serialize_google_protobuf_Empty,
|
||||
requestDeserialize: deserialize_google_protobuf_Empty,
|
||||
responseSerialize: serialize_api_GetVersionResponse,
|
||||
responseDeserialize: deserialize_api_GetVersionResponse,
|
||||
},
|
||||
};
|
||||
|
||||
exports.InternalServiceClient = grpc.makeGenericClientConstructor(InternalServiceService);
|
||||
|
20
api/js/api/internal_pb.d.ts
vendored
20
api/js/api/internal_pb.d.ts
vendored
@ -929,3 +929,23 @@ export namespace RegionChannel {
|
||||
}
|
||||
}
|
||||
|
||||
export class GetVersionResponse extends jspb.Message {
|
||||
getVersion(): string;
|
||||
setVersion(value: string): void;
|
||||
|
||||
serializeBinary(): Uint8Array;
|
||||
toObject(includeInstance?: boolean): GetVersionResponse.AsObject;
|
||||
static toObject(includeInstance: boolean, msg: GetVersionResponse): GetVersionResponse.AsObject;
|
||||
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
|
||||
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
|
||||
static serializeBinaryToWriter(message: GetVersionResponse, writer: jspb.BinaryWriter): void;
|
||||
static deserializeBinary(bytes: Uint8Array): GetVersionResponse;
|
||||
static deserializeBinaryFromReader(message: GetVersionResponse, reader: jspb.BinaryReader): GetVersionResponse;
|
||||
}
|
||||
|
||||
export namespace GetVersionResponse {
|
||||
export type AsObject = {
|
||||
version: string,
|
||||
}
|
||||
}
|
||||
|
||||
|
152
api/js/api/internal_pb.js
vendored
152
api/js/api/internal_pb.js
vendored
@ -30,6 +30,7 @@ goog.exportSymbol('proto.api.GetGatewaysSummaryRequest', null, global);
|
||||
goog.exportSymbol('proto.api.GetGatewaysSummaryResponse', null, global);
|
||||
goog.exportSymbol('proto.api.GetRegionRequest', null, global);
|
||||
goog.exportSymbol('proto.api.GetRegionResponse', null, global);
|
||||
goog.exportSymbol('proto.api.GetVersionResponse', null, global);
|
||||
goog.exportSymbol('proto.api.GlobalSearchRequest', null, global);
|
||||
goog.exportSymbol('proto.api.GlobalSearchResponse', null, global);
|
||||
goog.exportSymbol('proto.api.GlobalSearchResult', null, global);
|
||||
@ -746,6 +747,27 @@ if (goog.DEBUG && !COMPILED) {
|
||||
*/
|
||||
proto.api.RegionChannel.displayName = 'proto.api.RegionChannel';
|
||||
}
|
||||
/**
|
||||
* Generated by JsPbCodeGenerator.
|
||||
* @param {Array=} opt_data Optional initial data array, typically from a
|
||||
* server response, or constructed directly in Javascript. The array is used
|
||||
* in place and becomes part of the constructed object. It is not cloned.
|
||||
* If no data is provided, the constructed object will be empty, but still
|
||||
* valid.
|
||||
* @extends {jspb.Message}
|
||||
* @constructor
|
||||
*/
|
||||
proto.api.GetVersionResponse = function(opt_data) {
|
||||
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
||||
};
|
||||
goog.inherits(proto.api.GetVersionResponse, jspb.Message);
|
||||
if (goog.DEBUG && !COMPILED) {
|
||||
/**
|
||||
* @public
|
||||
* @override
|
||||
*/
|
||||
proto.api.GetVersionResponse.displayName = 'proto.api.GetVersionResponse';
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -7139,4 +7161,134 @@ proto.api.RegionChannel.prototype.setDrMax = function(value) {
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (jspb.Message.GENERATE_TO_OBJECT) {
|
||||
/**
|
||||
* Creates an object representation of this proto.
|
||||
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
||||
* Optional fields that are not set will be set to undefined.
|
||||
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
||||
* For the list of reserved names please see:
|
||||
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
||||
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
||||
* JSPB instance for transitional soy proto support:
|
||||
* http://goto/soy-param-migration
|
||||
* @return {!Object}
|
||||
*/
|
||||
proto.api.GetVersionResponse.prototype.toObject = function(opt_includeInstance) {
|
||||
return proto.api.GetVersionResponse.toObject(opt_includeInstance, this);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Static version of the {@see toObject} method.
|
||||
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
||||
* the JSPB instance for transitional soy proto support:
|
||||
* http://goto/soy-param-migration
|
||||
* @param {!proto.api.GetVersionResponse} msg The msg instance to transform.
|
||||
* @return {!Object}
|
||||
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||
*/
|
||||
proto.api.GetVersionResponse.toObject = function(includeInstance, msg) {
|
||||
var f, obj = {
|
||||
version: jspb.Message.getFieldWithDefault(msg, 1, "")
|
||||
};
|
||||
|
||||
if (includeInstance) {
|
||||
obj.$jspbMessageInstance = msg;
|
||||
}
|
||||
return obj;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Deserializes binary data (in protobuf wire format).
|
||||
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
||||
* @return {!proto.api.GetVersionResponse}
|
||||
*/
|
||||
proto.api.GetVersionResponse.deserializeBinary = function(bytes) {
|
||||
var reader = new jspb.BinaryReader(bytes);
|
||||
var msg = new proto.api.GetVersionResponse;
|
||||
return proto.api.GetVersionResponse.deserializeBinaryFromReader(msg, reader);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Deserializes binary data (in protobuf wire format) from the
|
||||
* given reader into the given message object.
|
||||
* @param {!proto.api.GetVersionResponse} msg The message object to deserialize into.
|
||||
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
||||
* @return {!proto.api.GetVersionResponse}
|
||||
*/
|
||||
proto.api.GetVersionResponse.deserializeBinaryFromReader = function(msg, reader) {
|
||||
while (reader.nextField()) {
|
||||
if (reader.isEndGroup()) {
|
||||
break;
|
||||
}
|
||||
var field = reader.getFieldNumber();
|
||||
switch (field) {
|
||||
case 1:
|
||||
var value = /** @type {string} */ (reader.readString());
|
||||
msg.setVersion(value);
|
||||
break;
|
||||
default:
|
||||
reader.skipField();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return msg;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Serializes the message to binary data (in protobuf wire format).
|
||||
* @return {!Uint8Array}
|
||||
*/
|
||||
proto.api.GetVersionResponse.prototype.serializeBinary = function() {
|
||||
var writer = new jspb.BinaryWriter();
|
||||
proto.api.GetVersionResponse.serializeBinaryToWriter(this, writer);
|
||||
return writer.getResultBuffer();
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Serializes the given message to binary data (in protobuf wire
|
||||
* format), writing to the given BinaryWriter.
|
||||
* @param {!proto.api.GetVersionResponse} message
|
||||
* @param {!jspb.BinaryWriter} writer
|
||||
* @suppress {unusedLocalVariables} f is only used for nested messages
|
||||
*/
|
||||
proto.api.GetVersionResponse.serializeBinaryToWriter = function(message, writer) {
|
||||
var f = undefined;
|
||||
f = message.getVersion();
|
||||
if (f.length > 0) {
|
||||
writer.writeString(
|
||||
1,
|
||||
f
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* optional string version = 1;
|
||||
* @return {string}
|
||||
*/
|
||||
proto.api.GetVersionResponse.prototype.getVersion = function() {
|
||||
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {string} value
|
||||
* @return {!proto.api.GetVersionResponse} returns this
|
||||
*/
|
||||
proto.api.GetVersionResponse.prototype.setVersion = function(value) {
|
||||
return jspb.Message.setProto3StringField(this, 1, value);
|
||||
};
|
||||
|
||||
|
||||
goog.object.extend(exports, proto.api);
|
||||
|
8
api/proto/api/internal.proto
vendored
8
api/proto/api/internal.proto
vendored
@ -66,6 +66,9 @@ service InternalService {
|
||||
|
||||
// GetRegion returns the region details for the given region.
|
||||
rpc GetRegion(GetRegionRequest) returns (GetRegionResponse) {}
|
||||
|
||||
// GetVersion returns the ChirpStack version.
|
||||
rpc GetVersion(google.protobuf.Empty) returns (GetVersionResponse) {}
|
||||
}
|
||||
|
||||
message ApiKey {
|
||||
@ -414,3 +417,8 @@ message RegionChannel {
|
||||
// Max DR.
|
||||
uint32 dr_max = 3;
|
||||
}
|
||||
|
||||
message GetVersionResponse {
|
||||
// version
|
||||
string version = 1;
|
||||
}
|
||||
|
@ -66,6 +66,9 @@ service InternalService {
|
||||
|
||||
// GetRegion returns the region details for the given region.
|
||||
rpc GetRegion(GetRegionRequest) returns (GetRegionResponse) {}
|
||||
|
||||
// GetVersion returns the ChirpStack version.
|
||||
rpc GetVersion(google.protobuf.Empty) returns (GetVersionResponse) {}
|
||||
}
|
||||
|
||||
message ApiKey {
|
||||
@ -414,3 +417,8 @@ message RegionChannel {
|
||||
// Max DR.
|
||||
uint32 dr_max = 3;
|
||||
}
|
||||
|
||||
message GetVersionResponse {
|
||||
// version
|
||||
string version = 1;
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: chirpstack-api/api/application.proto
|
||||
# Protobuf Python Version: 4.25.0
|
||||
# Protobuf Python Version: 4.25.1
|
||||
"""Generated protocol buffer code."""
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import descriptor_pool as _descriptor_pool
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: chirpstack-api/api/device.proto
|
||||
# Protobuf Python Version: 4.25.0
|
||||
# Protobuf Python Version: 4.25.1
|
||||
"""Generated protocol buffer code."""
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import descriptor_pool as _descriptor_pool
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: chirpstack-api/api/device_profile.proto
|
||||
# Protobuf Python Version: 4.25.0
|
||||
# Protobuf Python Version: 4.25.1
|
||||
"""Generated protocol buffer code."""
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import descriptor_pool as _descriptor_pool
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: chirpstack-api/api/device_profile_template.proto
|
||||
# Protobuf Python Version: 4.25.0
|
||||
# Protobuf Python Version: 4.25.1
|
||||
"""Generated protocol buffer code."""
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import descriptor_pool as _descriptor_pool
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: chirpstack-api/api/gateway.proto
|
||||
# Protobuf Python Version: 4.25.0
|
||||
# Protobuf Python Version: 4.25.1
|
||||
"""Generated protocol buffer code."""
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import descriptor_pool as _descriptor_pool
|
||||
|
File diff suppressed because one or more lines are too long
@ -340,3 +340,9 @@ class RegionChannel(_message.Message):
|
||||
dr_min: int
|
||||
dr_max: int
|
||||
def __init__(self, frequency: _Optional[int] = ..., dr_min: _Optional[int] = ..., dr_max: _Optional[int] = ...) -> None: ...
|
||||
|
||||
class GetVersionResponse(_message.Message):
|
||||
__slots__ = ("version",)
|
||||
VERSION_FIELD_NUMBER: _ClassVar[int]
|
||||
version: str
|
||||
def __init__(self, version: _Optional[str] = ...) -> None: ...
|
||||
|
@ -96,6 +96,11 @@ class InternalServiceStub(object):
|
||||
request_serializer=chirpstack__api_dot_api_dot_internal__pb2.GetRegionRequest.SerializeToString,
|
||||
response_deserializer=chirpstack__api_dot_api_dot_internal__pb2.GetRegionResponse.FromString,
|
||||
)
|
||||
self.GetVersion = channel.unary_unary(
|
||||
'/api.InternalService/GetVersion',
|
||||
request_serializer=google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
|
||||
response_deserializer=chirpstack__api_dot_api_dot_internal__pb2.GetVersionResponse.FromString,
|
||||
)
|
||||
|
||||
|
||||
class InternalServiceServicer(object):
|
||||
@ -214,6 +219,13 @@ class InternalServiceServicer(object):
|
||||
context.set_details('Method not implemented!')
|
||||
raise NotImplementedError('Method not implemented!')
|
||||
|
||||
def GetVersion(self, request, context):
|
||||
"""GetVersion returns the ChirpStack version.
|
||||
"""
|
||||
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
|
||||
context.set_details('Method not implemented!')
|
||||
raise NotImplementedError('Method not implemented!')
|
||||
|
||||
|
||||
def add_InternalServiceServicer_to_server(servicer, server):
|
||||
rpc_method_handlers = {
|
||||
@ -297,6 +309,11 @@ def add_InternalServiceServicer_to_server(servicer, server):
|
||||
request_deserializer=chirpstack__api_dot_api_dot_internal__pb2.GetRegionRequest.FromString,
|
||||
response_serializer=chirpstack__api_dot_api_dot_internal__pb2.GetRegionResponse.SerializeToString,
|
||||
),
|
||||
'GetVersion': grpc.unary_unary_rpc_method_handler(
|
||||
servicer.GetVersion,
|
||||
request_deserializer=google_dot_protobuf_dot_empty__pb2.Empty.FromString,
|
||||
response_serializer=chirpstack__api_dot_api_dot_internal__pb2.GetVersionResponse.SerializeToString,
|
||||
),
|
||||
}
|
||||
generic_handler = grpc.method_handlers_generic_handler(
|
||||
'api.InternalService', rpc_method_handlers)
|
||||
@ -579,3 +596,20 @@ class InternalService(object):
|
||||
chirpstack__api_dot_api_dot_internal__pb2.GetRegionResponse.FromString,
|
||||
options, channel_credentials,
|
||||
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
||||
|
||||
@staticmethod
|
||||
def GetVersion(request,
|
||||
target,
|
||||
options=(),
|
||||
channel_credentials=None,
|
||||
call_credentials=None,
|
||||
insecure=False,
|
||||
compression=None,
|
||||
wait_for_ready=None,
|
||||
timeout=None,
|
||||
metadata=None):
|
||||
return grpc.experimental.unary_unary(request, target, '/api.InternalService/GetVersion',
|
||||
google_dot_protobuf_dot_empty__pb2.Empty.SerializeToString,
|
||||
chirpstack__api_dot_api_dot_internal__pb2.GetVersionResponse.FromString,
|
||||
options, channel_credentials,
|
||||
insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: chirpstack-api/api/multicast_group.proto
|
||||
# Protobuf Python Version: 4.25.0
|
||||
# Protobuf Python Version: 4.25.1
|
||||
"""Generated protocol buffer code."""
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import descriptor_pool as _descriptor_pool
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: chirpstack-api/api/relay.proto
|
||||
# Protobuf Python Version: 4.25.0
|
||||
# Protobuf Python Version: 4.25.1
|
||||
"""Generated protocol buffer code."""
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import descriptor_pool as _descriptor_pool
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: chirpstack-api/api/tenant.proto
|
||||
# Protobuf Python Version: 4.25.0
|
||||
# Protobuf Python Version: 4.25.1
|
||||
"""Generated protocol buffer code."""
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import descriptor_pool as _descriptor_pool
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: chirpstack-api/api/user.proto
|
||||
# Protobuf Python Version: 4.25.0
|
||||
# Protobuf Python Version: 4.25.1
|
||||
"""Generated protocol buffer code."""
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import descriptor_pool as _descriptor_pool
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: chirpstack-api/common/common.proto
|
||||
# Protobuf Python Version: 4.25.0
|
||||
# Protobuf Python Version: 4.25.1
|
||||
"""Generated protocol buffer code."""
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import descriptor_pool as _descriptor_pool
|
||||
|
2
api/python/src/chirpstack_api/gw/gw_pb2.py
vendored
2
api/python/src/chirpstack_api/gw/gw_pb2.py
vendored
@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: chirpstack-api/gw/gw.proto
|
||||
# Protobuf Python Version: 4.25.0
|
||||
# Protobuf Python Version: 4.25.1
|
||||
"""Generated protocol buffer code."""
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import descriptor_pool as _descriptor_pool
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: chirpstack-api/integration/integration.proto
|
||||
# Protobuf Python Version: 4.25.0
|
||||
# Protobuf Python Version: 4.25.1
|
||||
"""Generated protocol buffer code."""
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import descriptor_pool as _descriptor_pool
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: chirpstack-api/stream/api_request.proto
|
||||
# Protobuf Python Version: 4.25.0
|
||||
# Protobuf Python Version: 4.25.1
|
||||
"""Generated protocol buffer code."""
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import descriptor_pool as _descriptor_pool
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: chirpstack-api/stream/backend_interfaces.proto
|
||||
# Protobuf Python Version: 4.25.0
|
||||
# Protobuf Python Version: 4.25.1
|
||||
"""Generated protocol buffer code."""
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import descriptor_pool as _descriptor_pool
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: chirpstack-api/stream/frame.proto
|
||||
# Protobuf Python Version: 4.25.0
|
||||
# Protobuf Python Version: 4.25.1
|
||||
"""Generated protocol buffer code."""
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import descriptor_pool as _descriptor_pool
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
# source: chirpstack-api/stream/meta.proto
|
||||
# Protobuf Python Version: 4.25.0
|
||||
# Protobuf Python Version: 4.25.1
|
||||
"""Generated protocol buffer code."""
|
||||
from google.protobuf import descriptor as _descriptor
|
||||
from google.protobuf import descriptor_pool as _descriptor_pool
|
||||
|
8
api/rust/proto/chirpstack/api/internal.proto
vendored
8
api/rust/proto/chirpstack/api/internal.proto
vendored
@ -66,6 +66,9 @@ service InternalService {
|
||||
|
||||
// GetRegion returns the region details for the given region.
|
||||
rpc GetRegion(GetRegionRequest) returns (GetRegionResponse) {}
|
||||
|
||||
// GetVersion returns the ChirpStack version.
|
||||
rpc GetVersion(google.protobuf.Empty) returns (GetVersionResponse) {}
|
||||
}
|
||||
|
||||
message ApiKey {
|
||||
@ -414,3 +417,8 @@ message RegionChannel {
|
||||
// Max DR.
|
||||
uint32 dr_max = 3;
|
||||
}
|
||||
|
||||
message GetVersionResponse {
|
||||
// version
|
||||
string version = 1;
|
||||
}
|
||||
|
@ -963,4 +963,17 @@ impl InternalService for Internal {
|
||||
|
||||
Ok(Response::new(out))
|
||||
}
|
||||
|
||||
async fn get_version(
|
||||
&self,
|
||||
request: Request<()>,
|
||||
) -> Result<Response<api::GetVersionResponse>, Status> {
|
||||
self.validator
|
||||
.validate(request.extensions(), validator::ValidateIsAdmin::new())
|
||||
.await?;
|
||||
|
||||
Ok(Response::new(api::GetVersionResponse {
|
||||
version: env!("CARGO_PKG_VERSION").to_string(),
|
||||
}))
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
import React, { useState, useEffect } from "react";
|
||||
import { Link, useLocation, useNavigate } from "react-router-dom";
|
||||
|
||||
import { Menu, MenuProps } from "antd";
|
||||
import { Menu, MenuProps, Typography } from "antd";
|
||||
import {
|
||||
CloudOutlined,
|
||||
HomeOutlined,
|
||||
@ -20,13 +20,18 @@ import {
|
||||
ListTenantsResponse,
|
||||
} from "@chirpstack/chirpstack-api-grpc-web/api/tenant_pb";
|
||||
|
||||
import { GetVersionResponse } from "@chirpstack/chirpstack-api-grpc-web/api/internal_pb";
|
||||
|
||||
import Autocomplete, { OptionCallbackFunc, OptionsCallbackFunc } from "../components/Autocomplete";
|
||||
import Admin from "../components/Admin";
|
||||
import TenantStore from "../stores/TenantStore";
|
||||
import SessionStore from "../stores/SessionStore";
|
||||
import InternalStore from "../stores/InternalStore";
|
||||
|
||||
function SideMenu() {
|
||||
const [tenantId, setTenantId] = useState<string>("");
|
||||
const [selectedKey, setSelectedKey] = useState<string>("");
|
||||
const [version, setVersion] = useState<string>("");
|
||||
|
||||
const location = useLocation();
|
||||
const navigate = useNavigate();
|
||||
@ -136,6 +141,12 @@ function SideMenu() {
|
||||
setTenant();
|
||||
parseLocation();
|
||||
|
||||
if (SessionStore.isAdmin()) {
|
||||
InternalStore.getVersion((resp: GetVersionResponse) => {
|
||||
setVersion(resp.getVersion());
|
||||
});
|
||||
}
|
||||
|
||||
return () => {
|
||||
SessionStore.removeListener("tenant.change", setTenant);
|
||||
};
|
||||
@ -244,7 +255,7 @@ function SideMenu() {
|
||||
<div>
|
||||
<Autocomplete
|
||||
placeholder="Select tenant"
|
||||
className="organiation-select"
|
||||
className="tenant-select"
|
||||
getOption={getTenantOption}
|
||||
getOptions={getTenantOptions}
|
||||
onSelect={onTenantSelect}
|
||||
@ -257,6 +268,11 @@ function SideMenu() {
|
||||
expandIcon={<div></div>}
|
||||
items={items}
|
||||
/>
|
||||
<Admin>
|
||||
<Typography.Text type="secondary" className="version">
|
||||
Version: v{version}
|
||||
</Typography.Text>
|
||||
</Admin>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
@ -36,12 +36,18 @@
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.layout-menu .organiation-select {
|
||||
.layout-menu .tenant-select {
|
||||
margin-left: 24px;
|
||||
margin-bottom: 12px;
|
||||
width: 252px;
|
||||
}
|
||||
|
||||
.layout-menu .version {
|
||||
display: block;
|
||||
margin-left: 24px;
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
.layout-content {
|
||||
margin-top: 65px;
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ import {
|
||||
ListRegionsResponse,
|
||||
GetRegionRequest,
|
||||
GetRegionResponse,
|
||||
GetVersionResponse,
|
||||
} from "@chirpstack/chirpstack-api-grpc-web/api/internal_pb";
|
||||
|
||||
import SessionStore from "./SessionStore";
|
||||
@ -224,6 +225,17 @@ class InternalStore extends EventEmitter {
|
||||
callbackFunc(resp);
|
||||
});
|
||||
};
|
||||
|
||||
getVersion = (callbackFunc: (resp: GetVersionResponse) => void) => {
|
||||
this.client.getVersion(new google_protobuf_empty_pb.Empty(), SessionStore.getMetadata(), (err, resp) => {
|
||||
if (err !== null) {
|
||||
HandleError(err);
|
||||
return;
|
||||
}
|
||||
|
||||
callbackFunc(resp);
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
const internalStore = new InternalStore();
|
||||
|
Loading…
x
Reference in New Issue
Block a user