Browse Source

1.增加grpc-web

2.迁移grpc协议目录
tags/v1.0.2
SmallChi 6 years ago
parent
commit
5765ef8c50
26 changed files with 3329 additions and 7 deletions
  1. +1
    -0
      .gitignore
  2. +8
    -0
      src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/EmptyRequest.proto
  3. +14
    -0
      src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/JT808.DotNetty.Dashbord.GrpcProtocol.csproj
  4. +3
    -2
      src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/JT808AtomicCounterService.proto
  5. +32
    -0
      src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/JT808SessionService.proto
  6. +0
    -0
      src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/JT808UnificationSendService.proto
  7. +0
    -0
      src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/PageReply.proto
  8. +0
    -0
      src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/PageRequest.proto
  9. +5
    -5
      src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/ResultReply.proto
  10. +147
    -0
      src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/csharp/EmptyRequest.cs
  11. +384
    -0
      src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/csharp/JT808AtomicCounterService.cs
  12. +136
    -0
      src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/csharp/JT808AtomicCounterServiceGrpc.cs
  13. +597
    -0
      src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/csharp/JT808SessionService.cs
  14. +137
    -0
      src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/csharp/JT808SessionServiceGrpc.cs
  15. +215
    -0
      src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/csharp/JT808UnificationSendService.cs
  16. +140
    -0
      src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/csharp/JT808UnificationSendServiceGrpc.cs
  17. +204
    -0
      src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/csharp/PageReply.cs
  18. +283
    -0
      src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/csharp/PageRequest.cs
  19. +225
    -0
      src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/csharp/ResultReply.cs
  20. +16
    -0
      src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/generate.txt
  21. +131
    -0
      src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/js/EmptyRequest_pb.js
  22. +194
    -0
      src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/js/JT808AtomicCounterService_grpc_web_pb.js
  23. +390
    -0
      src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/js/JT808AtomicCounterService_pb.js
  24. +19
    -0
      src/JT808.DotNetty.Admin/envoy/Dockerfile
  25. +45
    -0
      src/JT808.DotNetty.Admin/envoy/envoy.yaml
  26. +3
    -0
      src/JT808.DotNetty.Admin/tools/README.md

+ 1
- 0
.gitignore View File

@@ -330,3 +330,4 @@ ASALocalRun/
.mfractor/
*.json
/nupkgs
/src/JT808.DotNetty.Admin/tools/protoc-gen-grpc-web-1.0.3-windows-x86_64.exe

+ 8
- 0
src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/EmptyRequest.proto View File

@@ -0,0 +1,8 @@
syntax = "proto3";

package JT808.GrpcDashbord.ServiceGrpcBase;

// 空请求
message EmptyRequest{
}

+ 14
- 0
src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/JT808.DotNetty.Dashbord.GrpcProtocol.csproj View File

@@ -4,4 +4,18 @@
<TargetFramework>netstandard2.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Google.Protobuf" Version="3.6.1" />
<PackageReference Include="Grpc" Version="1.17.1" />
<PackageReference Include="Grpc.Tools" Version="1.17.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
<Folder Include="csharp\" />
<Folder Include="js\" />
</ItemGroup>

</Project>

src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/protos/JT808AtomicCounterService.proto → src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/JT808AtomicCounterService.proto View File

@@ -3,10 +3,11 @@
package JT808.GrpcDashbord.AtomicCounterGrpcService;

import "ResultReply.proto";
import "EmptyRequest.proto";

service AtomicCounterService{
rpc GetTcpAtomicCounter() returns (AtomicCounterReply){}
rpc GetUdpAtomicCounter() returns (AtomicCounterReply){}
rpc GetTcpAtomicCounter(JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest) returns (AtomicCounterReply){}
rpc GetUdpAtomicCounter(JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest) returns (AtomicCounterReply){}
}

message AtomicCounterReply{

+ 32
- 0
src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/JT808SessionService.proto View File

@@ -0,0 +1,32 @@
syntax = "proto3";

package JT808.GrpcDashbord.SessionGrpcService;

import "ResultReply.proto";
import "EmptyRequest.proto";

service SessionService{
rpc GetTcpSessionAll(JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest) returns (TcpSessionReply){}
rpc GetUdpSessionAll(JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest) returns (UdpSessionReply){}
}

message TcpSessionReply{
repeated SessionInfo SessionInfos=1;
JT808.GrpcDashbord.ServiceGrpcBase.ResultReply ResultReply=2;
}

message UdpSessionReply{
repeated SessionInfo SessionInfos = 1;
JT808.GrpcDashbord.ServiceGrpcBase.ResultReply ResultReply=2;
}

message SessionInfo{
// 最后上线时间
int64 LastActiveTime=1;
// 上线时间
int64 StartTime=2;
// 终端手机号
string TerminalPhoneNo=3;
// 远程ip地址
string RemoteAddressIP=4;
}

src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/protos/JT808UnificationSendService.proto → src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/JT808UnificationSendService.proto View File


src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/protos/PageReply.proto → src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/PageReply.proto View File


src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/protos/PageRequest.proto → src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/PageRequest.proto View File


src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/protos/ResultReply.proto → src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/ResultReply.proto View File

@@ -6,11 +6,11 @@ package JT808.GrpcDashbord.ServiceGrpcBase;
message ResultReply{
// 状态码
enum StatusCode{
Success = 200;
NoContent = 201;
Failure = 202;
Unauthorized=403;
InnerError = 500;
Success = 0;
NoContent = 1;
Failure = 2;
Unauthorized=3;
InnerError = 4;
}
StatusCode Code=1;
string Msg=2;

+ 147
- 0
src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/csharp/EmptyRequest.cs View File

@@ -0,0 +1,147 @@
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: EmptyRequest.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code

using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace JT808.GrpcDashbord.ServiceGrpcBase {

/// <summary>Holder for reflection information generated from EmptyRequest.proto</summary>
public static partial class EmptyRequestReflection {

#region Descriptor
/// <summary>File descriptor for EmptyRequest.proto</summary>
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;

static EmptyRequestReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"ChJFbXB0eVJlcXVlc3QucHJvdG8SIkpUODA4LkdycGNEYXNoYm9yZC5TZXJ2",
"aWNlR3JwY0Jhc2UiDgoMRW1wdHlSZXF1ZXN0YgZwcm90bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest), global::JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest.Parser, null, null, null, null)
}));
}
#endregion

}
#region Messages
/// <summary>
/// 空请求
/// </summary>
public sealed partial class EmptyRequest : pb::IMessage<EmptyRequest> {
private static readonly pb::MessageParser<EmptyRequest> _parser = new pb::MessageParser<EmptyRequest>(() => new EmptyRequest());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<EmptyRequest> Parser { get { return _parser; } }

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequestReflection.Descriptor.MessageTypes[0]; }
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public EmptyRequest() {
OnConstruction();
}

partial void OnConstruction();

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public EmptyRequest(EmptyRequest other) : this() {
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public EmptyRequest Clone() {
return new EmptyRequest(this);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as EmptyRequest);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(EmptyRequest other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
return Equals(_unknownFields, other._unknownFields);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(EmptyRequest other) {
if (other == null) {
return;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
}
}
}

}

#endregion

}

#endregion Designer generated code

+ 384
- 0
src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/csharp/JT808AtomicCounterService.cs View File

@@ -0,0 +1,384 @@
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: JT808AtomicCounterService.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code

using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace JT808.GrpcDashbord.AtomicCounterGrpcService {

/// <summary>Holder for reflection information generated from JT808AtomicCounterService.proto</summary>
public static partial class JT808AtomicCounterServiceReflection {

#region Descriptor
/// <summary>File descriptor for JT808AtomicCounterService.proto</summary>
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;

static JT808AtomicCounterServiceReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"Ch9KVDgwOEF0b21pY0NvdW50ZXJTZXJ2aWNlLnByb3RvEitKVDgwOC5HcnBj",
"RGFzaGJvcmQuQXRvbWljQ291bnRlckdycGNTZXJ2aWNlGhFSZXN1bHRSZXBs",
"eS5wcm90bxoSRW1wdHlSZXF1ZXN0LnByb3RvIrUBChJBdG9taWNDb3VudGVy",
"UmVwbHkSWQoRQXRvbWljQ291bnRlckluZm8YASABKAsyPi5KVDgwOC5HcnBj",
"RGFzaGJvcmQuQXRvbWljQ291bnRlckdycGNTZXJ2aWNlLkF0b21pY0NvdW50",
"ZXJJbmZvEkQKC1Jlc3VsdFJlcGx5GAIgASgLMi8uSlQ4MDguR3JwY0Rhc2hi",
"b3JkLlNlcnZpY2VHcnBjQmFzZS5SZXN1bHRSZXBseSJCChFBdG9taWNDb3Vu",
"dGVySW5mbxIXCg9Nc2dTdWNjZXNzQ291bnQYASABKAUSFAoMTXNnRmFpbENv",
"dW50GAIgASgFMrACChRBdG9taWNDb3VudGVyU2VydmljZRKKAQoTR2V0VGNw",
"QXRvbWljQ291bnRlchIwLkpUODA4LkdycGNEYXNoYm9yZC5TZXJ2aWNlR3Jw",
"Y0Jhc2UuRW1wdHlSZXF1ZXN0Gj8uSlQ4MDguR3JwY0Rhc2hib3JkLkF0b21p",
"Y0NvdW50ZXJHcnBjU2VydmljZS5BdG9taWNDb3VudGVyUmVwbHkiABKKAQoT",
"R2V0VWRwQXRvbWljQ291bnRlchIwLkpUODA4LkdycGNEYXNoYm9yZC5TZXJ2",
"aWNlR3JwY0Jhc2UuRW1wdHlSZXF1ZXN0Gj8uSlQ4MDguR3JwY0Rhc2hib3Jk",
"LkF0b21pY0NvdW50ZXJHcnBjU2VydmljZS5BdG9taWNDb3VudGVyUmVwbHki",
"AGIGcHJvdG8z"));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::JT808.GrpcDashbord.ServiceGrpcBase.ResultReplyReflection.Descriptor, global::JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequestReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply), global::JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply.Parser, new[]{ "AtomicCounterInfo", "ResultReply" }, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterInfo), global::JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterInfo.Parser, new[]{ "MsgSuccessCount", "MsgFailCount" }, null, null, null)
}));
}
#endregion

}
#region Messages
public sealed partial class AtomicCounterReply : pb::IMessage<AtomicCounterReply> {
private static readonly pb::MessageParser<AtomicCounterReply> _parser = new pb::MessageParser<AtomicCounterReply>(() => new AtomicCounterReply());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<AtomicCounterReply> Parser { get { return _parser; } }

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::JT808.GrpcDashbord.AtomicCounterGrpcService.JT808AtomicCounterServiceReflection.Descriptor.MessageTypes[0]; }
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public AtomicCounterReply() {
OnConstruction();
}

partial void OnConstruction();

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public AtomicCounterReply(AtomicCounterReply other) : this() {
atomicCounterInfo_ = other.atomicCounterInfo_ != null ? other.atomicCounterInfo_.Clone() : null;
resultReply_ = other.resultReply_ != null ? other.resultReply_.Clone() : null;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public AtomicCounterReply Clone() {
return new AtomicCounterReply(this);
}

/// <summary>Field number for the "AtomicCounterInfo" field.</summary>
public const int AtomicCounterInfoFieldNumber = 1;
private global::JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterInfo atomicCounterInfo_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterInfo AtomicCounterInfo {
get { return atomicCounterInfo_; }
set {
atomicCounterInfo_ = value;
}
}

/// <summary>Field number for the "ResultReply" field.</summary>
public const int ResultReplyFieldNumber = 2;
private global::JT808.GrpcDashbord.ServiceGrpcBase.ResultReply resultReply_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::JT808.GrpcDashbord.ServiceGrpcBase.ResultReply ResultReply {
get { return resultReply_; }
set {
resultReply_ = value;
}
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as AtomicCounterReply);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(AtomicCounterReply other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (!object.Equals(AtomicCounterInfo, other.AtomicCounterInfo)) return false;
if (!object.Equals(ResultReply, other.ResultReply)) return false;
return Equals(_unknownFields, other._unknownFields);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
if (atomicCounterInfo_ != null) hash ^= AtomicCounterInfo.GetHashCode();
if (resultReply_ != null) hash ^= ResultReply.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
if (atomicCounterInfo_ != null) {
output.WriteRawTag(10);
output.WriteMessage(AtomicCounterInfo);
}
if (resultReply_ != null) {
output.WriteRawTag(18);
output.WriteMessage(ResultReply);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
if (atomicCounterInfo_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(AtomicCounterInfo);
}
if (resultReply_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(ResultReply);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(AtomicCounterReply other) {
if (other == null) {
return;
}
if (other.atomicCounterInfo_ != null) {
if (atomicCounterInfo_ == null) {
atomicCounterInfo_ = new global::JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterInfo();
}
AtomicCounterInfo.MergeFrom(other.AtomicCounterInfo);
}
if (other.resultReply_ != null) {
if (resultReply_ == null) {
resultReply_ = new global::JT808.GrpcDashbord.ServiceGrpcBase.ResultReply();
}
ResultReply.MergeFrom(other.ResultReply);
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 10: {
if (atomicCounterInfo_ == null) {
atomicCounterInfo_ = new global::JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterInfo();
}
input.ReadMessage(atomicCounterInfo_);
break;
}
case 18: {
if (resultReply_ == null) {
resultReply_ = new global::JT808.GrpcDashbord.ServiceGrpcBase.ResultReply();
}
input.ReadMessage(resultReply_);
break;
}
}
}
}

}

public sealed partial class AtomicCounterInfo : pb::IMessage<AtomicCounterInfo> {
private static readonly pb::MessageParser<AtomicCounterInfo> _parser = new pb::MessageParser<AtomicCounterInfo>(() => new AtomicCounterInfo());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<AtomicCounterInfo> Parser { get { return _parser; } }

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::JT808.GrpcDashbord.AtomicCounterGrpcService.JT808AtomicCounterServiceReflection.Descriptor.MessageTypes[1]; }
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public AtomicCounterInfo() {
OnConstruction();
}

partial void OnConstruction();

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public AtomicCounterInfo(AtomicCounterInfo other) : this() {
msgSuccessCount_ = other.msgSuccessCount_;
msgFailCount_ = other.msgFailCount_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public AtomicCounterInfo Clone() {
return new AtomicCounterInfo(this);
}

/// <summary>Field number for the "MsgSuccessCount" field.</summary>
public const int MsgSuccessCountFieldNumber = 1;
private int msgSuccessCount_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int MsgSuccessCount {
get { return msgSuccessCount_; }
set {
msgSuccessCount_ = value;
}
}

/// <summary>Field number for the "MsgFailCount" field.</summary>
public const int MsgFailCountFieldNumber = 2;
private int msgFailCount_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int MsgFailCount {
get { return msgFailCount_; }
set {
msgFailCount_ = value;
}
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as AtomicCounterInfo);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(AtomicCounterInfo other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (MsgSuccessCount != other.MsgSuccessCount) return false;
if (MsgFailCount != other.MsgFailCount) return false;
return Equals(_unknownFields, other._unknownFields);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
if (MsgSuccessCount != 0) hash ^= MsgSuccessCount.GetHashCode();
if (MsgFailCount != 0) hash ^= MsgFailCount.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
if (MsgSuccessCount != 0) {
output.WriteRawTag(8);
output.WriteInt32(MsgSuccessCount);
}
if (MsgFailCount != 0) {
output.WriteRawTag(16);
output.WriteInt32(MsgFailCount);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
if (MsgSuccessCount != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(MsgSuccessCount);
}
if (MsgFailCount != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(MsgFailCount);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(AtomicCounterInfo other) {
if (other == null) {
return;
}
if (other.MsgSuccessCount != 0) {
MsgSuccessCount = other.MsgSuccessCount;
}
if (other.MsgFailCount != 0) {
MsgFailCount = other.MsgFailCount;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 8: {
MsgSuccessCount = input.ReadInt32();
break;
}
case 16: {
MsgFailCount = input.ReadInt32();
break;
}
}
}
}

}

#endregion

}

#endregion Designer generated code

+ 136
- 0
src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/csharp/JT808AtomicCounterServiceGrpc.cs View File

@@ -0,0 +1,136 @@
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: JT808AtomicCounterService.proto
// </auto-generated>
#pragma warning disable 0414, 1591
#region Designer generated code

using grpc = global::Grpc.Core;

namespace JT808.GrpcDashbord.AtomicCounterGrpcService {
public static partial class AtomicCounterService
{
static readonly string __ServiceName = "JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterService";

static readonly grpc::Marshaller<global::JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest> __Marshaller_JT808_GrpcDashbord_ServiceGrpcBase_EmptyRequest = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest.Parser.ParseFrom);
static readonly grpc::Marshaller<global::JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply> __Marshaller_JT808_GrpcDashbord_AtomicCounterGrpcService_AtomicCounterReply = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply.Parser.ParseFrom);

static readonly grpc::Method<global::JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest, global::JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply> __Method_GetTcpAtomicCounter = new grpc::Method<global::JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest, global::JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply>(
grpc::MethodType.Unary,
__ServiceName,
"GetTcpAtomicCounter",
__Marshaller_JT808_GrpcDashbord_ServiceGrpcBase_EmptyRequest,
__Marshaller_JT808_GrpcDashbord_AtomicCounterGrpcService_AtomicCounterReply);

static readonly grpc::Method<global::JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest, global::JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply> __Method_GetUdpAtomicCounter = new grpc::Method<global::JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest, global::JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply>(
grpc::MethodType.Unary,
__ServiceName,
"GetUdpAtomicCounter",
__Marshaller_JT808_GrpcDashbord_ServiceGrpcBase_EmptyRequest,
__Marshaller_JT808_GrpcDashbord_AtomicCounterGrpcService_AtomicCounterReply);

/// <summary>Service descriptor</summary>
public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
{
get { return global::JT808.GrpcDashbord.AtomicCounterGrpcService.JT808AtomicCounterServiceReflection.Descriptor.Services[0]; }
}

/// <summary>Base class for server-side implementations of AtomicCounterService</summary>
public abstract partial class AtomicCounterServiceBase
{
public virtual global::System.Threading.Tasks.Task<global::JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply> GetTcpAtomicCounter(global::JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest request, grpc::ServerCallContext context)
{
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
}

public virtual global::System.Threading.Tasks.Task<global::JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply> GetUdpAtomicCounter(global::JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest request, grpc::ServerCallContext context)
{
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
}

}

/// <summary>Client for AtomicCounterService</summary>
public partial class AtomicCounterServiceClient : grpc::ClientBase<AtomicCounterServiceClient>
{
/// <summary>Creates a new client for AtomicCounterService</summary>
/// <param name="channel">The channel to use to make remote calls.</param>
public AtomicCounterServiceClient(grpc::Channel channel) : base(channel)
{
}
/// <summary>Creates a new client for AtomicCounterService that uses a custom <c>CallInvoker</c>.</summary>
/// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
public AtomicCounterServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker)
{
}
/// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
protected AtomicCounterServiceClient() : base()
{
}
/// <summary>Protected constructor to allow creation of configured clients.</summary>
/// <param name="configuration">The client configuration.</param>
protected AtomicCounterServiceClient(ClientBaseConfiguration configuration) : base(configuration)
{
}

public virtual global::JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply GetTcpAtomicCounter(global::JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return GetTcpAtomicCounter(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual global::JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply GetTcpAtomicCounter(global::JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest request, grpc::CallOptions options)
{
return CallInvoker.BlockingUnaryCall(__Method_GetTcpAtomicCounter, null, options, request);
}
public virtual grpc::AsyncUnaryCall<global::JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply> GetTcpAtomicCounterAsync(global::JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return GetTcpAtomicCounterAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual grpc::AsyncUnaryCall<global::JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply> GetTcpAtomicCounterAsync(global::JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest request, grpc::CallOptions options)
{
return CallInvoker.AsyncUnaryCall(__Method_GetTcpAtomicCounter, null, options, request);
}
public virtual global::JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply GetUdpAtomicCounter(global::JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return GetUdpAtomicCounter(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual global::JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply GetUdpAtomicCounter(global::JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest request, grpc::CallOptions options)
{
return CallInvoker.BlockingUnaryCall(__Method_GetUdpAtomicCounter, null, options, request);
}
public virtual grpc::AsyncUnaryCall<global::JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply> GetUdpAtomicCounterAsync(global::JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return GetUdpAtomicCounterAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual grpc::AsyncUnaryCall<global::JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply> GetUdpAtomicCounterAsync(global::JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest request, grpc::CallOptions options)
{
return CallInvoker.AsyncUnaryCall(__Method_GetUdpAtomicCounter, null, options, request);
}
/// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
protected override AtomicCounterServiceClient NewInstance(ClientBaseConfiguration configuration)
{
return new AtomicCounterServiceClient(configuration);
}
}

/// <summary>Creates service definition that can be registered with a server</summary>
/// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
public static grpc::ServerServiceDefinition BindService(AtomicCounterServiceBase serviceImpl)
{
return grpc::ServerServiceDefinition.CreateBuilder()
.AddMethod(__Method_GetTcpAtomicCounter, serviceImpl.GetTcpAtomicCounter)
.AddMethod(__Method_GetUdpAtomicCounter, serviceImpl.GetUdpAtomicCounter).Build();
}

/// <summary>Register service method implementations with a service binder. Useful when customizing the service binding logic.
/// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary>
/// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param>
/// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
public static void BindService(grpc::ServiceBinderBase serviceBinder, AtomicCounterServiceBase serviceImpl)
{
serviceBinder.AddMethod(__Method_GetTcpAtomicCounter, serviceImpl.GetTcpAtomicCounter);
serviceBinder.AddMethod(__Method_GetUdpAtomicCounter, serviceImpl.GetUdpAtomicCounter);
}

}
}
#endregion

+ 597
- 0
src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/csharp/JT808SessionService.cs View File

@@ -0,0 +1,597 @@
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: JT808SessionService.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code

using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace JT808.GrpcDashbord.SessionGrpcService {

/// <summary>Holder for reflection information generated from JT808SessionService.proto</summary>
public static partial class JT808SessionServiceReflection {

#region Descriptor
/// <summary>File descriptor for JT808SessionService.proto</summary>
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;

static JT808SessionServiceReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"ChlKVDgwOFNlc3Npb25TZXJ2aWNlLnByb3RvEiVKVDgwOC5HcnBjRGFzaGJv",
"cmQuU2Vzc2lvbkdycGNTZXJ2aWNlGhFSZXN1bHRSZXBseS5wcm90bxoSRW1w",
"dHlSZXF1ZXN0LnByb3RvIqEBCg9UY3BTZXNzaW9uUmVwbHkSSAoMU2Vzc2lv",
"bkluZm9zGAEgAygLMjIuSlQ4MDguR3JwY0Rhc2hib3JkLlNlc3Npb25HcnBj",
"U2VydmljZS5TZXNzaW9uSW5mbxJECgtSZXN1bHRSZXBseRgCIAEoCzIvLkpU",
"ODA4LkdycGNEYXNoYm9yZC5TZXJ2aWNlR3JwY0Jhc2UuUmVzdWx0UmVwbHki",
"oQEKD1VkcFNlc3Npb25SZXBseRJICgxTZXNzaW9uSW5mb3MYASADKAsyMi5K",
"VDgwOC5HcnBjRGFzaGJvcmQuU2Vzc2lvbkdycGNTZXJ2aWNlLlNlc3Npb25J",
"bmZvEkQKC1Jlc3VsdFJlcGx5GAIgASgLMi8uSlQ4MDguR3JwY0Rhc2hib3Jk",
"LlNlcnZpY2VHcnBjQmFzZS5SZXN1bHRSZXBseSJqCgtTZXNzaW9uSW5mbxIW",
"Cg5MYXN0QWN0aXZlVGltZRgBIAEoAxIRCglTdGFydFRpbWUYAiABKAMSFwoP",
"VGVybWluYWxQaG9uZU5vGAMgASgJEhcKD1JlbW90ZUFkZHJlc3NJUBgEIAEo",
"CTKQAgoOU2Vzc2lvblNlcnZpY2USfgoQR2V0VGNwU2Vzc2lvbkFsbBIwLkpU",
"ODA4LkdycGNEYXNoYm9yZC5TZXJ2aWNlR3JwY0Jhc2UuRW1wdHlSZXF1ZXN0",
"GjYuSlQ4MDguR3JwY0Rhc2hib3JkLlNlc3Npb25HcnBjU2VydmljZS5UY3BT",
"ZXNzaW9uUmVwbHkiABJ+ChBHZXRVZHBTZXNzaW9uQWxsEjAuSlQ4MDguR3Jw",
"Y0Rhc2hib3JkLlNlcnZpY2VHcnBjQmFzZS5FbXB0eVJlcXVlc3QaNi5KVDgw",
"OC5HcnBjRGFzaGJvcmQuU2Vzc2lvbkdycGNTZXJ2aWNlLlVkcFNlc3Npb25S",
"ZXBseSIAYgZwcm90bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::JT808.GrpcDashbord.ServiceGrpcBase.ResultReplyReflection.Descriptor, global::JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequestReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::JT808.GrpcDashbord.SessionGrpcService.TcpSessionReply), global::JT808.GrpcDashbord.SessionGrpcService.TcpSessionReply.Parser, new[]{ "SessionInfos", "ResultReply" }, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::JT808.GrpcDashbord.SessionGrpcService.UdpSessionReply), global::JT808.GrpcDashbord.SessionGrpcService.UdpSessionReply.Parser, new[]{ "SessionInfos", "ResultReply" }, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::JT808.GrpcDashbord.SessionGrpcService.SessionInfo), global::JT808.GrpcDashbord.SessionGrpcService.SessionInfo.Parser, new[]{ "LastActiveTime", "StartTime", "TerminalPhoneNo", "RemoteAddressIP" }, null, null, null)
}));
}
#endregion

}
#region Messages
public sealed partial class TcpSessionReply : pb::IMessage<TcpSessionReply> {
private static readonly pb::MessageParser<TcpSessionReply> _parser = new pb::MessageParser<TcpSessionReply>(() => new TcpSessionReply());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<TcpSessionReply> Parser { get { return _parser; } }

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::JT808.GrpcDashbord.SessionGrpcService.JT808SessionServiceReflection.Descriptor.MessageTypes[0]; }
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public TcpSessionReply() {
OnConstruction();
}

partial void OnConstruction();

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public TcpSessionReply(TcpSessionReply other) : this() {
sessionInfos_ = other.sessionInfos_.Clone();
resultReply_ = other.resultReply_ != null ? other.resultReply_.Clone() : null;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public TcpSessionReply Clone() {
return new TcpSessionReply(this);
}

/// <summary>Field number for the "SessionInfos" field.</summary>
public const int SessionInfosFieldNumber = 1;
private static readonly pb::FieldCodec<global::JT808.GrpcDashbord.SessionGrpcService.SessionInfo> _repeated_sessionInfos_codec
= pb::FieldCodec.ForMessage(10, global::JT808.GrpcDashbord.SessionGrpcService.SessionInfo.Parser);
private readonly pbc::RepeatedField<global::JT808.GrpcDashbord.SessionGrpcService.SessionInfo> sessionInfos_ = new pbc::RepeatedField<global::JT808.GrpcDashbord.SessionGrpcService.SessionInfo>();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::JT808.GrpcDashbord.SessionGrpcService.SessionInfo> SessionInfos {
get { return sessionInfos_; }
}

/// <summary>Field number for the "ResultReply" field.</summary>
public const int ResultReplyFieldNumber = 2;
private global::JT808.GrpcDashbord.ServiceGrpcBase.ResultReply resultReply_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::JT808.GrpcDashbord.ServiceGrpcBase.ResultReply ResultReply {
get { return resultReply_; }
set {
resultReply_ = value;
}
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as TcpSessionReply);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(TcpSessionReply other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if(!sessionInfos_.Equals(other.sessionInfos_)) return false;
if (!object.Equals(ResultReply, other.ResultReply)) return false;
return Equals(_unknownFields, other._unknownFields);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
hash ^= sessionInfos_.GetHashCode();
if (resultReply_ != null) hash ^= ResultReply.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
sessionInfos_.WriteTo(output, _repeated_sessionInfos_codec);
if (resultReply_ != null) {
output.WriteRawTag(18);
output.WriteMessage(ResultReply);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
size += sessionInfos_.CalculateSize(_repeated_sessionInfos_codec);
if (resultReply_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(ResultReply);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(TcpSessionReply other) {
if (other == null) {
return;
}
sessionInfos_.Add(other.sessionInfos_);
if (other.resultReply_ != null) {
if (resultReply_ == null) {
resultReply_ = new global::JT808.GrpcDashbord.ServiceGrpcBase.ResultReply();
}
ResultReply.MergeFrom(other.ResultReply);
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 10: {
sessionInfos_.AddEntriesFrom(input, _repeated_sessionInfos_codec);
break;
}
case 18: {
if (resultReply_ == null) {
resultReply_ = new global::JT808.GrpcDashbord.ServiceGrpcBase.ResultReply();
}
input.ReadMessage(resultReply_);
break;
}
}
}
}

}

public sealed partial class UdpSessionReply : pb::IMessage<UdpSessionReply> {
private static readonly pb::MessageParser<UdpSessionReply> _parser = new pb::MessageParser<UdpSessionReply>(() => new UdpSessionReply());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<UdpSessionReply> Parser { get { return _parser; } }

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::JT808.GrpcDashbord.SessionGrpcService.JT808SessionServiceReflection.Descriptor.MessageTypes[1]; }
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public UdpSessionReply() {
OnConstruction();
}

partial void OnConstruction();

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public UdpSessionReply(UdpSessionReply other) : this() {
sessionInfos_ = other.sessionInfos_.Clone();
resultReply_ = other.resultReply_ != null ? other.resultReply_.Clone() : null;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public UdpSessionReply Clone() {
return new UdpSessionReply(this);
}

/// <summary>Field number for the "SessionInfos" field.</summary>
public const int SessionInfosFieldNumber = 1;
private static readonly pb::FieldCodec<global::JT808.GrpcDashbord.SessionGrpcService.SessionInfo> _repeated_sessionInfos_codec
= pb::FieldCodec.ForMessage(10, global::JT808.GrpcDashbord.SessionGrpcService.SessionInfo.Parser);
private readonly pbc::RepeatedField<global::JT808.GrpcDashbord.SessionGrpcService.SessionInfo> sessionInfos_ = new pbc::RepeatedField<global::JT808.GrpcDashbord.SessionGrpcService.SessionInfo>();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField<global::JT808.GrpcDashbord.SessionGrpcService.SessionInfo> SessionInfos {
get { return sessionInfos_; }
}

/// <summary>Field number for the "ResultReply" field.</summary>
public const int ResultReplyFieldNumber = 2;
private global::JT808.GrpcDashbord.ServiceGrpcBase.ResultReply resultReply_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::JT808.GrpcDashbord.ServiceGrpcBase.ResultReply ResultReply {
get { return resultReply_; }
set {
resultReply_ = value;
}
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as UdpSessionReply);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(UdpSessionReply other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if(!sessionInfos_.Equals(other.sessionInfos_)) return false;
if (!object.Equals(ResultReply, other.ResultReply)) return false;
return Equals(_unknownFields, other._unknownFields);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
hash ^= sessionInfos_.GetHashCode();
if (resultReply_ != null) hash ^= ResultReply.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
sessionInfos_.WriteTo(output, _repeated_sessionInfos_codec);
if (resultReply_ != null) {
output.WriteRawTag(18);
output.WriteMessage(ResultReply);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
size += sessionInfos_.CalculateSize(_repeated_sessionInfos_codec);
if (resultReply_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(ResultReply);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(UdpSessionReply other) {
if (other == null) {
return;
}
sessionInfos_.Add(other.sessionInfos_);
if (other.resultReply_ != null) {
if (resultReply_ == null) {
resultReply_ = new global::JT808.GrpcDashbord.ServiceGrpcBase.ResultReply();
}
ResultReply.MergeFrom(other.ResultReply);
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 10: {
sessionInfos_.AddEntriesFrom(input, _repeated_sessionInfos_codec);
break;
}
case 18: {
if (resultReply_ == null) {
resultReply_ = new global::JT808.GrpcDashbord.ServiceGrpcBase.ResultReply();
}
input.ReadMessage(resultReply_);
break;
}
}
}
}

}

public sealed partial class SessionInfo : pb::IMessage<SessionInfo> {
private static readonly pb::MessageParser<SessionInfo> _parser = new pb::MessageParser<SessionInfo>(() => new SessionInfo());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<SessionInfo> Parser { get { return _parser; } }

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::JT808.GrpcDashbord.SessionGrpcService.JT808SessionServiceReflection.Descriptor.MessageTypes[2]; }
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public SessionInfo() {
OnConstruction();
}

partial void OnConstruction();

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public SessionInfo(SessionInfo other) : this() {
lastActiveTime_ = other.lastActiveTime_;
startTime_ = other.startTime_;
terminalPhoneNo_ = other.terminalPhoneNo_;
remoteAddressIP_ = other.remoteAddressIP_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public SessionInfo Clone() {
return new SessionInfo(this);
}

/// <summary>Field number for the "LastActiveTime" field.</summary>
public const int LastActiveTimeFieldNumber = 1;
private long lastActiveTime_;
/// <summary>
/// 最后上线时间
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public long LastActiveTime {
get { return lastActiveTime_; }
set {
lastActiveTime_ = value;
}
}

/// <summary>Field number for the "StartTime" field.</summary>
public const int StartTimeFieldNumber = 2;
private long startTime_;
/// <summary>
/// 上线时间
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public long StartTime {
get { return startTime_; }
set {
startTime_ = value;
}
}

/// <summary>Field number for the "TerminalPhoneNo" field.</summary>
public const int TerminalPhoneNoFieldNumber = 3;
private string terminalPhoneNo_ = "";
/// <summary>
/// 终端手机号
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string TerminalPhoneNo {
get { return terminalPhoneNo_; }
set {
terminalPhoneNo_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}

/// <summary>Field number for the "RemoteAddressIP" field.</summary>
public const int RemoteAddressIPFieldNumber = 4;
private string remoteAddressIP_ = "";
/// <summary>
/// 远程ip地址
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string RemoteAddressIP {
get { return remoteAddressIP_; }
set {
remoteAddressIP_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as SessionInfo);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(SessionInfo other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (LastActiveTime != other.LastActiveTime) return false;
if (StartTime != other.StartTime) return false;
if (TerminalPhoneNo != other.TerminalPhoneNo) return false;
if (RemoteAddressIP != other.RemoteAddressIP) return false;
return Equals(_unknownFields, other._unknownFields);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
if (LastActiveTime != 0L) hash ^= LastActiveTime.GetHashCode();
if (StartTime != 0L) hash ^= StartTime.GetHashCode();
if (TerminalPhoneNo.Length != 0) hash ^= TerminalPhoneNo.GetHashCode();
if (RemoteAddressIP.Length != 0) hash ^= RemoteAddressIP.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
if (LastActiveTime != 0L) {
output.WriteRawTag(8);
output.WriteInt64(LastActiveTime);
}
if (StartTime != 0L) {
output.WriteRawTag(16);
output.WriteInt64(StartTime);
}
if (TerminalPhoneNo.Length != 0) {
output.WriteRawTag(26);
output.WriteString(TerminalPhoneNo);
}
if (RemoteAddressIP.Length != 0) {
output.WriteRawTag(34);
output.WriteString(RemoteAddressIP);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
if (LastActiveTime != 0L) {
size += 1 + pb::CodedOutputStream.ComputeInt64Size(LastActiveTime);
}
if (StartTime != 0L) {
size += 1 + pb::CodedOutputStream.ComputeInt64Size(StartTime);
}
if (TerminalPhoneNo.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(TerminalPhoneNo);
}
if (RemoteAddressIP.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(RemoteAddressIP);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(SessionInfo other) {
if (other == null) {
return;
}
if (other.LastActiveTime != 0L) {
LastActiveTime = other.LastActiveTime;
}
if (other.StartTime != 0L) {
StartTime = other.StartTime;
}
if (other.TerminalPhoneNo.Length != 0) {
TerminalPhoneNo = other.TerminalPhoneNo;
}
if (other.RemoteAddressIP.Length != 0) {
RemoteAddressIP = other.RemoteAddressIP;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 8: {
LastActiveTime = input.ReadInt64();
break;
}
case 16: {
StartTime = input.ReadInt64();
break;
}
case 26: {
TerminalPhoneNo = input.ReadString();
break;
}
case 34: {
RemoteAddressIP = input.ReadString();
break;
}
}
}
}

}

#endregion

}

#endregion Designer generated code

+ 137
- 0
src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/csharp/JT808SessionServiceGrpc.cs View File

@@ -0,0 +1,137 @@
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: JT808SessionService.proto
// </auto-generated>
#pragma warning disable 0414, 1591
#region Designer generated code

using grpc = global::Grpc.Core;

namespace JT808.GrpcDashbord.SessionGrpcService {
public static partial class SessionService
{
static readonly string __ServiceName = "JT808.GrpcDashbord.SessionGrpcService.SessionService";

static readonly grpc::Marshaller<global::JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest> __Marshaller_JT808_GrpcDashbord_ServiceGrpcBase_EmptyRequest = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest.Parser.ParseFrom);
static readonly grpc::Marshaller<global::JT808.GrpcDashbord.SessionGrpcService.TcpSessionReply> __Marshaller_JT808_GrpcDashbord_SessionGrpcService_TcpSessionReply = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::JT808.GrpcDashbord.SessionGrpcService.TcpSessionReply.Parser.ParseFrom);
static readonly grpc::Marshaller<global::JT808.GrpcDashbord.SessionGrpcService.UdpSessionReply> __Marshaller_JT808_GrpcDashbord_SessionGrpcService_UdpSessionReply = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::JT808.GrpcDashbord.SessionGrpcService.UdpSessionReply.Parser.ParseFrom);

static readonly grpc::Method<global::JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest, global::JT808.GrpcDashbord.SessionGrpcService.TcpSessionReply> __Method_GetTcpSessionAll = new grpc::Method<global::JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest, global::JT808.GrpcDashbord.SessionGrpcService.TcpSessionReply>(
grpc::MethodType.Unary,
__ServiceName,
"GetTcpSessionAll",
__Marshaller_JT808_GrpcDashbord_ServiceGrpcBase_EmptyRequest,
__Marshaller_JT808_GrpcDashbord_SessionGrpcService_TcpSessionReply);

static readonly grpc::Method<global::JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest, global::JT808.GrpcDashbord.SessionGrpcService.UdpSessionReply> __Method_GetUdpSessionAll = new grpc::Method<global::JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest, global::JT808.GrpcDashbord.SessionGrpcService.UdpSessionReply>(
grpc::MethodType.Unary,
__ServiceName,
"GetUdpSessionAll",
__Marshaller_JT808_GrpcDashbord_ServiceGrpcBase_EmptyRequest,
__Marshaller_JT808_GrpcDashbord_SessionGrpcService_UdpSessionReply);

/// <summary>Service descriptor</summary>
public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
{
get { return global::JT808.GrpcDashbord.SessionGrpcService.JT808SessionServiceReflection.Descriptor.Services[0]; }
}

/// <summary>Base class for server-side implementations of SessionService</summary>
public abstract partial class SessionServiceBase
{
public virtual global::System.Threading.Tasks.Task<global::JT808.GrpcDashbord.SessionGrpcService.TcpSessionReply> GetTcpSessionAll(global::JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest request, grpc::ServerCallContext context)
{
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
}

public virtual global::System.Threading.Tasks.Task<global::JT808.GrpcDashbord.SessionGrpcService.UdpSessionReply> GetUdpSessionAll(global::JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest request, grpc::ServerCallContext context)
{
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
}

}

/// <summary>Client for SessionService</summary>
public partial class SessionServiceClient : grpc::ClientBase<SessionServiceClient>
{
/// <summary>Creates a new client for SessionService</summary>
/// <param name="channel">The channel to use to make remote calls.</param>
public SessionServiceClient(grpc::Channel channel) : base(channel)
{
}
/// <summary>Creates a new client for SessionService that uses a custom <c>CallInvoker</c>.</summary>
/// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
public SessionServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker)
{
}
/// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
protected SessionServiceClient() : base()
{
}
/// <summary>Protected constructor to allow creation of configured clients.</summary>
/// <param name="configuration">The client configuration.</param>
protected SessionServiceClient(ClientBaseConfiguration configuration) : base(configuration)
{
}

public virtual global::JT808.GrpcDashbord.SessionGrpcService.TcpSessionReply GetTcpSessionAll(global::JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return GetTcpSessionAll(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual global::JT808.GrpcDashbord.SessionGrpcService.TcpSessionReply GetTcpSessionAll(global::JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest request, grpc::CallOptions options)
{
return CallInvoker.BlockingUnaryCall(__Method_GetTcpSessionAll, null, options, request);
}
public virtual grpc::AsyncUnaryCall<global::JT808.GrpcDashbord.SessionGrpcService.TcpSessionReply> GetTcpSessionAllAsync(global::JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return GetTcpSessionAllAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual grpc::AsyncUnaryCall<global::JT808.GrpcDashbord.SessionGrpcService.TcpSessionReply> GetTcpSessionAllAsync(global::JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest request, grpc::CallOptions options)
{
return CallInvoker.AsyncUnaryCall(__Method_GetTcpSessionAll, null, options, request);
}
public virtual global::JT808.GrpcDashbord.SessionGrpcService.UdpSessionReply GetUdpSessionAll(global::JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return GetUdpSessionAll(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual global::JT808.GrpcDashbord.SessionGrpcService.UdpSessionReply GetUdpSessionAll(global::JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest request, grpc::CallOptions options)
{
return CallInvoker.BlockingUnaryCall(__Method_GetUdpSessionAll, null, options, request);
}
public virtual grpc::AsyncUnaryCall<global::JT808.GrpcDashbord.SessionGrpcService.UdpSessionReply> GetUdpSessionAllAsync(global::JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return GetUdpSessionAllAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
public virtual grpc::AsyncUnaryCall<global::JT808.GrpcDashbord.SessionGrpcService.UdpSessionReply> GetUdpSessionAllAsync(global::JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest request, grpc::CallOptions options)
{
return CallInvoker.AsyncUnaryCall(__Method_GetUdpSessionAll, null, options, request);
}
/// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
protected override SessionServiceClient NewInstance(ClientBaseConfiguration configuration)
{
return new SessionServiceClient(configuration);
}
}

/// <summary>Creates service definition that can be registered with a server</summary>
/// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
public static grpc::ServerServiceDefinition BindService(SessionServiceBase serviceImpl)
{
return grpc::ServerServiceDefinition.CreateBuilder()
.AddMethod(__Method_GetTcpSessionAll, serviceImpl.GetTcpSessionAll)
.AddMethod(__Method_GetUdpSessionAll, serviceImpl.GetUdpSessionAll).Build();
}

/// <summary>Register service method implementations with a service binder. Useful when customizing the service binding logic.
/// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary>
/// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param>
/// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
public static void BindService(grpc::ServiceBinderBase serviceBinder, SessionServiceBase serviceImpl)
{
serviceBinder.AddMethod(__Method_GetTcpSessionAll, serviceImpl.GetTcpSessionAll);
serviceBinder.AddMethod(__Method_GetUdpSessionAll, serviceImpl.GetUdpSessionAll);
}

}
}
#endregion

+ 215
- 0
src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/csharp/JT808UnificationSendService.cs View File

@@ -0,0 +1,215 @@
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: JT808UnificationSendService.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code

using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace JT808.GrpcDashbord.AtomicCounterGrpcService {

/// <summary>Holder for reflection information generated from JT808UnificationSendService.proto</summary>
public static partial class JT808UnificationSendServiceReflection {

#region Descriptor
/// <summary>File descriptor for JT808UnificationSendService.proto</summary>
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;

static JT808UnificationSendServiceReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"CiFKVDgwOFVuaWZpY2F0aW9uU2VuZFNlcnZpY2UucHJvdG8SK0pUODA4Lkdy",
"cGNEYXNoYm9yZC5BdG9taWNDb3VudGVyR3JwY1NlcnZpY2UaEVJlc3VsdFJl",
"cGx5LnByb3RvIjsKD1NlbmRUZXh0UmVxdWVzdBIXCg9UZXJtaW5hbFBob25l",
"Tm8YASABKAkSDwoHQ29udGVudBgCIAEoCTKVAQoWVW5pZmljYXRpb25TZW5k",
"U2VydmljZRJ7CghTZW5kVGV4dBI8LkpUODA4LkdycGNEYXNoYm9yZC5BdG9t",
"aWNDb3VudGVyR3JwY1NlcnZpY2UuU2VuZFRleHRSZXF1ZXN0Gi8uSlQ4MDgu",
"R3JwY0Rhc2hib3JkLlNlcnZpY2VHcnBjQmFzZS5SZXN1bHRSZXBseSIAYgZw",
"cm90bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { global::JT808.GrpcDashbord.ServiceGrpcBase.ResultReplyReflection.Descriptor, },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::JT808.GrpcDashbord.AtomicCounterGrpcService.SendTextRequest), global::JT808.GrpcDashbord.AtomicCounterGrpcService.SendTextRequest.Parser, new[]{ "TerminalPhoneNo", "Content" }, null, null, null)
}));
}
#endregion

}
#region Messages
/// <summary>
///下发文本信息参数
/// </summary>
public sealed partial class SendTextRequest : pb::IMessage<SendTextRequest> {
private static readonly pb::MessageParser<SendTextRequest> _parser = new pb::MessageParser<SendTextRequest>(() => new SendTextRequest());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<SendTextRequest> Parser { get { return _parser; } }

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::JT808.GrpcDashbord.AtomicCounterGrpcService.JT808UnificationSendServiceReflection.Descriptor.MessageTypes[0]; }
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public SendTextRequest() {
OnConstruction();
}

partial void OnConstruction();

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public SendTextRequest(SendTextRequest other) : this() {
terminalPhoneNo_ = other.terminalPhoneNo_;
content_ = other.content_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public SendTextRequest Clone() {
return new SendTextRequest(this);
}

/// <summary>Field number for the "TerminalPhoneNo" field.</summary>
public const int TerminalPhoneNoFieldNumber = 1;
private string terminalPhoneNo_ = "";
/// <summary>
///终端手机号
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string TerminalPhoneNo {
get { return terminalPhoneNo_; }
set {
terminalPhoneNo_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}

/// <summary>Field number for the "Content" field.</summary>
public const int ContentFieldNumber = 2;
private string content_ = "";
/// <summary>
///内容
/// </summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Content {
get { return content_; }
set {
content_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as SendTextRequest);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(SendTextRequest other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (TerminalPhoneNo != other.TerminalPhoneNo) return false;
if (Content != other.Content) return false;
return Equals(_unknownFields, other._unknownFields);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
if (TerminalPhoneNo.Length != 0) hash ^= TerminalPhoneNo.GetHashCode();
if (Content.Length != 0) hash ^= Content.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
if (TerminalPhoneNo.Length != 0) {
output.WriteRawTag(10);
output.WriteString(TerminalPhoneNo);
}
if (Content.Length != 0) {
output.WriteRawTag(18);
output.WriteString(Content);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
if (TerminalPhoneNo.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(TerminalPhoneNo);
}
if (Content.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Content);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(SendTextRequest other) {
if (other == null) {
return;
}
if (other.TerminalPhoneNo.Length != 0) {
TerminalPhoneNo = other.TerminalPhoneNo;
}
if (other.Content.Length != 0) {
Content = other.Content;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 10: {
TerminalPhoneNo = input.ReadString();
break;
}
case 18: {
Content = input.ReadString();
break;
}
}
}
}

}

#endregion

}

#endregion Designer generated code

+ 140
- 0
src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/csharp/JT808UnificationSendServiceGrpc.cs View File

@@ -0,0 +1,140 @@
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: JT808UnificationSendService.proto
// </auto-generated>
#pragma warning disable 0414, 1591
#region Designer generated code

using grpc = global::Grpc.Core;

namespace JT808.GrpcDashbord.AtomicCounterGrpcService {
public static partial class UnificationSendService
{
static readonly string __ServiceName = "JT808.GrpcDashbord.AtomicCounterGrpcService.UnificationSendService";

static readonly grpc::Marshaller<global::JT808.GrpcDashbord.AtomicCounterGrpcService.SendTextRequest> __Marshaller_JT808_GrpcDashbord_AtomicCounterGrpcService_SendTextRequest = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::JT808.GrpcDashbord.AtomicCounterGrpcService.SendTextRequest.Parser.ParseFrom);
static readonly grpc::Marshaller<global::JT808.GrpcDashbord.ServiceGrpcBase.ResultReply> __Marshaller_JT808_GrpcDashbord_ServiceGrpcBase_ResultReply = grpc::Marshallers.Create((arg) => global::Google.Protobuf.MessageExtensions.ToByteArray(arg), global::JT808.GrpcDashbord.ServiceGrpcBase.ResultReply.Parser.ParseFrom);

static readonly grpc::Method<global::JT808.GrpcDashbord.AtomicCounterGrpcService.SendTextRequest, global::JT808.GrpcDashbord.ServiceGrpcBase.ResultReply> __Method_SendText = new grpc::Method<global::JT808.GrpcDashbord.AtomicCounterGrpcService.SendTextRequest, global::JT808.GrpcDashbord.ServiceGrpcBase.ResultReply>(
grpc::MethodType.Unary,
__ServiceName,
"SendText",
__Marshaller_JT808_GrpcDashbord_AtomicCounterGrpcService_SendTextRequest,
__Marshaller_JT808_GrpcDashbord_ServiceGrpcBase_ResultReply);

/// <summary>Service descriptor</summary>
public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor
{
get { return global::JT808.GrpcDashbord.AtomicCounterGrpcService.JT808UnificationSendServiceReflection.Descriptor.Services[0]; }
}

/// <summary>Base class for server-side implementations of UnificationSendService</summary>
public abstract partial class UnificationSendServiceBase
{
/// <summary>
/// 文本信息下发
/// </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>
public virtual global::System.Threading.Tasks.Task<global::JT808.GrpcDashbord.ServiceGrpcBase.ResultReply> SendText(global::JT808.GrpcDashbord.AtomicCounterGrpcService.SendTextRequest request, grpc::ServerCallContext context)
{
throw new grpc::RpcException(new grpc::Status(grpc::StatusCode.Unimplemented, ""));
}

}

/// <summary>Client for UnificationSendService</summary>
public partial class UnificationSendServiceClient : grpc::ClientBase<UnificationSendServiceClient>
{
/// <summary>Creates a new client for UnificationSendService</summary>
/// <param name="channel">The channel to use to make remote calls.</param>
public UnificationSendServiceClient(grpc::Channel channel) : base(channel)
{
}
/// <summary>Creates a new client for UnificationSendService that uses a custom <c>CallInvoker</c>.</summary>
/// <param name="callInvoker">The callInvoker to use to make remote calls.</param>
public UnificationSendServiceClient(grpc::CallInvoker callInvoker) : base(callInvoker)
{
}
/// <summary>Protected parameterless constructor to allow creation of test doubles.</summary>
protected UnificationSendServiceClient() : base()
{
}
/// <summary>Protected constructor to allow creation of configured clients.</summary>
/// <param name="configuration">The client configuration.</param>
protected UnificationSendServiceClient(ClientBaseConfiguration configuration) : base(configuration)
{
}

/// <summary>
/// 文本信息下发
/// </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>
public virtual global::JT808.GrpcDashbord.ServiceGrpcBase.ResultReply SendText(global::JT808.GrpcDashbord.AtomicCounterGrpcService.SendTextRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return SendText(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
/// <summary>
/// 文本信息下发
/// </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>
public virtual global::JT808.GrpcDashbord.ServiceGrpcBase.ResultReply SendText(global::JT808.GrpcDashbord.AtomicCounterGrpcService.SendTextRequest request, grpc::CallOptions options)
{
return CallInvoker.BlockingUnaryCall(__Method_SendText, null, options, request);
}
/// <summary>
/// 文本信息下发
/// </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>
public virtual grpc::AsyncUnaryCall<global::JT808.GrpcDashbord.ServiceGrpcBase.ResultReply> SendTextAsync(global::JT808.GrpcDashbord.AtomicCounterGrpcService.SendTextRequest request, grpc::Metadata headers = null, global::System.DateTime? deadline = null, global::System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken))
{
return SendTextAsync(request, new grpc::CallOptions(headers, deadline, cancellationToken));
}
/// <summary>
/// 文本信息下发
/// </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>
public virtual grpc::AsyncUnaryCall<global::JT808.GrpcDashbord.ServiceGrpcBase.ResultReply> SendTextAsync(global::JT808.GrpcDashbord.AtomicCounterGrpcService.SendTextRequest request, grpc::CallOptions options)
{
return CallInvoker.AsyncUnaryCall(__Method_SendText, null, options, request);
}
/// <summary>Creates a new instance of client from given <c>ClientBaseConfiguration</c>.</summary>
protected override UnificationSendServiceClient NewInstance(ClientBaseConfiguration configuration)
{
return new UnificationSendServiceClient(configuration);
}
}

/// <summary>Creates service definition that can be registered with a server</summary>
/// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
public static grpc::ServerServiceDefinition BindService(UnificationSendServiceBase serviceImpl)
{
return grpc::ServerServiceDefinition.CreateBuilder()
.AddMethod(__Method_SendText, serviceImpl.SendText).Build();
}

/// <summary>Register service method implementations with a service binder. Useful when customizing the service binding logic.
/// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary>
/// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param>
/// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
public static void BindService(grpc::ServiceBinderBase serviceBinder, UnificationSendServiceBase serviceImpl)
{
serviceBinder.AddMethod(__Method_SendText, serviceImpl.SendText);
}

}
}
#endregion

+ 204
- 0
src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/csharp/PageReply.cs View File

@@ -0,0 +1,204 @@
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: PageReply.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code

using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace JT808.GrpcDashbord.ServiceGrpcBase {

/// <summary>Holder for reflection information generated from PageReply.proto</summary>
public static partial class PageReplyReflection {

#region Descriptor
/// <summary>File descriptor for PageReply.proto</summary>
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;

static PageReplyReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"Cg9QYWdlUmVwbHkucHJvdG8SIkpUODA4LkdycGNEYXNoYm9yZC5TZXJ2aWNl",
"R3JwY0Jhc2UiNgoSUGFnZU9wdGlvbnNSZXF1ZXN0EhEKCVBhZ2VJbmRleBgB",
"IAEoBRINCgVUb3RhbBgCIAEoBWIGcHJvdG8z"));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::JT808.GrpcDashbord.ServiceGrpcBase.PageOptionsRequest), global::JT808.GrpcDashbord.ServiceGrpcBase.PageOptionsRequest.Parser, new[]{ "PageIndex", "Total" }, null, null, null)
}));
}
#endregion

}
#region Messages
/// <summary>
/// 统一分页返回参数
/// </summary>
public sealed partial class PageOptionsRequest : pb::IMessage<PageOptionsRequest> {
private static readonly pb::MessageParser<PageOptionsRequest> _parser = new pb::MessageParser<PageOptionsRequest>(() => new PageOptionsRequest());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<PageOptionsRequest> Parser { get { return _parser; } }

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::JT808.GrpcDashbord.ServiceGrpcBase.PageReplyReflection.Descriptor.MessageTypes[0]; }
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public PageOptionsRequest() {
OnConstruction();
}

partial void OnConstruction();

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public PageOptionsRequest(PageOptionsRequest other) : this() {
pageIndex_ = other.pageIndex_;
total_ = other.total_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public PageOptionsRequest Clone() {
return new PageOptionsRequest(this);
}

/// <summary>Field number for the "PageIndex" field.</summary>
public const int PageIndexFieldNumber = 1;
private int pageIndex_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int PageIndex {
get { return pageIndex_; }
set {
pageIndex_ = value;
}
}

/// <summary>Field number for the "Total" field.</summary>
public const int TotalFieldNumber = 2;
private int total_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int Total {
get { return total_; }
set {
total_ = value;
}
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as PageOptionsRequest);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(PageOptionsRequest other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (PageIndex != other.PageIndex) return false;
if (Total != other.Total) return false;
return Equals(_unknownFields, other._unknownFields);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
if (PageIndex != 0) hash ^= PageIndex.GetHashCode();
if (Total != 0) hash ^= Total.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
if (PageIndex != 0) {
output.WriteRawTag(8);
output.WriteInt32(PageIndex);
}
if (Total != 0) {
output.WriteRawTag(16);
output.WriteInt32(Total);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
if (PageIndex != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(PageIndex);
}
if (Total != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(Total);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(PageOptionsRequest other) {
if (other == null) {
return;
}
if (other.PageIndex != 0) {
PageIndex = other.PageIndex;
}
if (other.Total != 0) {
Total = other.Total;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 8: {
PageIndex = input.ReadInt32();
break;
}
case 16: {
Total = input.ReadInt32();
break;
}
}
}
}

}

#endregion

}

#endregion Designer generated code

+ 283
- 0
src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/csharp/PageRequest.cs View File

@@ -0,0 +1,283 @@
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: PageRequest.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code

using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace JT808.GrpcDashbord.ServiceGrpcBase {

/// <summary>Holder for reflection information generated from PageRequest.proto</summary>
public static partial class PageRequestReflection {

#region Descriptor
/// <summary>File descriptor for PageRequest.proto</summary>
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;

static PageRequestReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"ChFQYWdlUmVxdWVzdC5wcm90bxIiSlQ4MDguR3JwY0Rhc2hib3JkLlNlcnZp",
"Y2VHcnBjQmFzZSLFAQoLUGFnZVJlcXVlc3QSEQoJUGFnZUluZGV4GAEgASgF",
"EhAKCFBhZ2VTaXplGAIgASgFEg0KBVRvdGFsGAMgASgFEgwKBFNraXAYBCAB",
"KAUSRwoEU29ydBgFIAMoCzI5LkpUODA4LkdycGNEYXNoYm9yZC5TZXJ2aWNl",
"R3JwY0Jhc2UuUGFnZVJlcXVlc3QuU29ydEVudHJ5GisKCVNvcnRFbnRyeRIL",
"CgNrZXkYASABKAkSDQoFdmFsdWUYAiABKAk6AjgBYgZwcm90bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::JT808.GrpcDashbord.ServiceGrpcBase.PageRequest), global::JT808.GrpcDashbord.ServiceGrpcBase.PageRequest.Parser, new[]{ "PageIndex", "PageSize", "Total", "Skip", "Sort" }, null, null, new pbr::GeneratedClrTypeInfo[] { null, })
}));
}
#endregion

}
#region Messages
/// <summary>
/// 统一分页参数
/// </summary>
public sealed partial class PageRequest : pb::IMessage<PageRequest> {
private static readonly pb::MessageParser<PageRequest> _parser = new pb::MessageParser<PageRequest>(() => new PageRequest());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<PageRequest> Parser { get { return _parser; } }

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::JT808.GrpcDashbord.ServiceGrpcBase.PageRequestReflection.Descriptor.MessageTypes[0]; }
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public PageRequest() {
OnConstruction();
}

partial void OnConstruction();

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public PageRequest(PageRequest other) : this() {
pageIndex_ = other.pageIndex_;
pageSize_ = other.pageSize_;
total_ = other.total_;
skip_ = other.skip_;
sort_ = other.sort_.Clone();
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public PageRequest Clone() {
return new PageRequest(this);
}

/// <summary>Field number for the "PageIndex" field.</summary>
public const int PageIndexFieldNumber = 1;
private int pageIndex_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int PageIndex {
get { return pageIndex_; }
set {
pageIndex_ = value;
}
}

/// <summary>Field number for the "PageSize" field.</summary>
public const int PageSizeFieldNumber = 2;
private int pageSize_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int PageSize {
get { return pageSize_; }
set {
pageSize_ = value;
}
}

/// <summary>Field number for the "Total" field.</summary>
public const int TotalFieldNumber = 3;
private int total_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int Total {
get { return total_; }
set {
total_ = value;
}
}

/// <summary>Field number for the "Skip" field.</summary>
public const int SkipFieldNumber = 4;
private int skip_;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int Skip {
get { return skip_; }
set {
skip_ = value;
}
}

/// <summary>Field number for the "Sort" field.</summary>
public const int SortFieldNumber = 5;
private static readonly pbc::MapField<string, string>.Codec _map_sort_codec
= new pbc::MapField<string, string>.Codec(pb::FieldCodec.ForString(10), pb::FieldCodec.ForString(18), 42);
private readonly pbc::MapField<string, string> sort_ = new pbc::MapField<string, string>();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::MapField<string, string> Sort {
get { return sort_; }
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as PageRequest);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(PageRequest other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (PageIndex != other.PageIndex) return false;
if (PageSize != other.PageSize) return false;
if (Total != other.Total) return false;
if (Skip != other.Skip) return false;
if (!Sort.Equals(other.Sort)) return false;
return Equals(_unknownFields, other._unknownFields);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
if (PageIndex != 0) hash ^= PageIndex.GetHashCode();
if (PageSize != 0) hash ^= PageSize.GetHashCode();
if (Total != 0) hash ^= Total.GetHashCode();
if (Skip != 0) hash ^= Skip.GetHashCode();
hash ^= Sort.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
if (PageIndex != 0) {
output.WriteRawTag(8);
output.WriteInt32(PageIndex);
}
if (PageSize != 0) {
output.WriteRawTag(16);
output.WriteInt32(PageSize);
}
if (Total != 0) {
output.WriteRawTag(24);
output.WriteInt32(Total);
}
if (Skip != 0) {
output.WriteRawTag(32);
output.WriteInt32(Skip);
}
sort_.WriteTo(output, _map_sort_codec);
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
if (PageIndex != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(PageIndex);
}
if (PageSize != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(PageSize);
}
if (Total != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(Total);
}
if (Skip != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(Skip);
}
size += sort_.CalculateSize(_map_sort_codec);
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(PageRequest other) {
if (other == null) {
return;
}
if (other.PageIndex != 0) {
PageIndex = other.PageIndex;
}
if (other.PageSize != 0) {
PageSize = other.PageSize;
}
if (other.Total != 0) {
Total = other.Total;
}
if (other.Skip != 0) {
Skip = other.Skip;
}
sort_.Add(other.sort_);
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 8: {
PageIndex = input.ReadInt32();
break;
}
case 16: {
PageSize = input.ReadInt32();
break;
}
case 24: {
Total = input.ReadInt32();
break;
}
case 32: {
Skip = input.ReadInt32();
break;
}
case 42: {
sort_.AddEntriesFrom(input, _map_sort_codec);
break;
}
}
}
}

}

#endregion

}

#endregion Designer generated code

+ 225
- 0
src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/csharp/ResultReply.cs View File

@@ -0,0 +1,225 @@
// <auto-generated>
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: ResultReply.proto
// </auto-generated>
#pragma warning disable 1591, 0612, 3021
#region Designer generated code

using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace JT808.GrpcDashbord.ServiceGrpcBase {

/// <summary>Holder for reflection information generated from ResultReply.proto</summary>
public static partial class ResultReplyReflection {

#region Descriptor
/// <summary>File descriptor for ResultReply.proto</summary>
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;

static ResultReplyReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"ChFSZXN1bHRSZXBseS5wcm90bxIiSlQ4MDguR3JwY0Rhc2hib3JkLlNlcnZp",
"Y2VHcnBjQmFzZSK9AQoLUmVzdWx0UmVwbHkSSAoEQ29kZRgBIAEoDjI6LkpU",
"ODA4LkdycGNEYXNoYm9yZC5TZXJ2aWNlR3JwY0Jhc2UuUmVzdWx0UmVwbHku",
"U3RhdHVzQ29kZRILCgNNc2cYAiABKAkiVwoKU3RhdHVzQ29kZRILCgdTdWNj",
"ZXNzEAASDQoJTm9Db250ZW50EAESCwoHRmFpbHVyZRACEhAKDFVuYXV0aG9y",
"aXplZBADEg4KCklubmVyRXJyb3IQBGIGcHJvdG8z"));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::JT808.GrpcDashbord.ServiceGrpcBase.ResultReply), global::JT808.GrpcDashbord.ServiceGrpcBase.ResultReply.Parser, new[]{ "Code", "Msg" }, null, new[]{ typeof(global::JT808.GrpcDashbord.ServiceGrpcBase.ResultReply.Types.StatusCode) }, null)
}));
}
#endregion

}
#region Messages
/// <summary>
/// 统一回复
/// </summary>
public sealed partial class ResultReply : pb::IMessage<ResultReply> {
private static readonly pb::MessageParser<ResultReply> _parser = new pb::MessageParser<ResultReply>(() => new ResultReply());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser<ResultReply> Parser { get { return _parser; } }

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::JT808.GrpcDashbord.ServiceGrpcBase.ResultReplyReflection.Descriptor.MessageTypes[0]; }
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public ResultReply() {
OnConstruction();
}

partial void OnConstruction();

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public ResultReply(ResultReply other) : this() {
code_ = other.code_;
msg_ = other.msg_;
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public ResultReply Clone() {
return new ResultReply(this);
}

/// <summary>Field number for the "Code" field.</summary>
public const int CodeFieldNumber = 1;
private global::JT808.GrpcDashbord.ServiceGrpcBase.ResultReply.Types.StatusCode code_ = 0;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::JT808.GrpcDashbord.ServiceGrpcBase.ResultReply.Types.StatusCode Code {
get { return code_; }
set {
code_ = value;
}
}

/// <summary>Field number for the "Msg" field.</summary>
public const int MsgFieldNumber = 2;
private string msg_ = "";
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string Msg {
get { return msg_; }
set {
msg_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as ResultReply);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(ResultReply other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (Code != other.Code) return false;
if (Msg != other.Msg) return false;
return Equals(_unknownFields, other._unknownFields);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
if (Code != 0) hash ^= Code.GetHashCode();
if (Msg.Length != 0) hash ^= Msg.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
if (Code != 0) {
output.WriteRawTag(8);
output.WriteEnum((int) Code);
}
if (Msg.Length != 0) {
output.WriteRawTag(18);
output.WriteString(Msg);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
if (Code != 0) {
size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Code);
}
if (Msg.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(Msg);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(ResultReply other) {
if (other == null) {
return;
}
if (other.Code != 0) {
Code = other.Code;
}
if (other.Msg.Length != 0) {
Msg = other.Msg;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}

[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 8: {
code_ = (global::JT808.GrpcDashbord.ServiceGrpcBase.ResultReply.Types.StatusCode) input.ReadEnum();
break;
}
case 18: {
Msg = input.ReadString();
break;
}
}
}
}

#region Nested types
/// <summary>Container for nested types declared in the ResultReply message type.</summary>
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static partial class Types {
/// <summary>
/// 状态码
/// </summary>
public enum StatusCode {
[pbr::OriginalName("Success")] Success = 0,
[pbr::OriginalName("NoContent")] NoContent = 1,
[pbr::OriginalName("Failure")] Failure = 2,
[pbr::OriginalName("Unauthorized")] Unauthorized = 3,
[pbr::OriginalName("InnerError")] InnerError = 4,
}

}
#endregion

}

#endregion

}

#endregion Designer generated code

+ 16
- 0
src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/generate.txt View File

@@ -0,0 +1,16 @@
csharp

C:\Users\Administrator\.nuget\packages\grpc.tools\1.17.1\tools\windows_x64\protoc.exe -I "D:\My Project\JT808DotNetty\src\JT808.DotNetty.Admin\JT808.DotNetty.Dashbord.GrpcProtocol" --csharp_out "D:\My Project\JT808DotNetty\src\JT808.DotNetty.Admin\JT808.DotNetty.Dashbord.GrpcProtocol\csharp" "D:\My Project\JT808DotNetty\src\JT808.DotNetty.Admin\JT808.DotNetty.Dashbord.GrpcProtocol\ResultReply.proto" --grpc_out "D:\My Project\JT808DotNetty\src\JT808.DotNetty.Admin\JT808.DotNetty.Dashbord.GrpcProtocol\csharp" --plugin=protoc-gen-grpc=C:\Users\Administrator\.nuget\packages\grpc.tools\1.17.1\tools\windows_x64\grpc_csharp_plugin.exe;
C:\Users\Administrator\.nuget\packages\grpc.tools\1.17.1\tools\windows_x64\protoc.exe -I "D:\My Project\JT808DotNetty\src\JT808.DotNetty.Admin\JT808.DotNetty.Dashbord.GrpcProtocol" --csharp_out "D:\My Project\JT808DotNetty\src\JT808.DotNetty.Admin\JT808.DotNetty.Dashbord.GrpcProtocol\csharp" "D:\My Project\JT808DotNetty\src\JT808.DotNetty.Admin\JT808.DotNetty.Dashbord.GrpcProtocol\PageReply.proto" --grpc_out "D:\My Project\JT808DotNetty\src\JT808.DotNetty.Admin\JT808.DotNetty.Dashbord.GrpcProtocol\csharp" --plugin=protoc-gen-grpc=C:\Users\Administrator\.nuget\packages\grpc.tools\1.17.1\tools\windows_x64\grpc_csharp_plugin.exe;
C:\Users\Administrator\.nuget\packages\grpc.tools\1.17.1\tools\windows_x64\protoc.exe -I "D:\My Project\JT808DotNetty\src\JT808.DotNetty.Admin\JT808.DotNetty.Dashbord.GrpcProtocol" --csharp_out "D:\My Project\JT808DotNetty\src\JT808.DotNetty.Admin\JT808.DotNetty.Dashbord.GrpcProtocol\csharp" "D:\My Project\JT808DotNetty\src\JT808.DotNetty.Admin\JT808.DotNetty.Dashbord.GrpcProtocol\PageRequest.proto" --grpc_out "D:\My Project\JT808DotNetty\src\JT808.DotNetty.Admin\JT808.DotNetty.Dashbord.GrpcProtocol\csharp" --plugin=protoc-gen-grpc=C:\Users\Administrator\.nuget\packages\grpc.tools\1.17.1\tools\windows_x64\grpc_csharp_plugin.exe;
C:\Users\Administrator\.nuget\packages\grpc.tools\1.17.1\tools\windows_x64\protoc.exe -I "D:\My Project\JT808DotNetty\src\JT808.DotNetty.Admin\JT808.DotNetty.Dashbord.GrpcProtocol" --csharp_out "D:\My Project\JT808DotNetty\src\JT808.DotNetty.Admin\JT808.DotNetty.Dashbord.GrpcProtocol\csharp" "D:\My Project\JT808DotNetty\src\JT808.DotNetty.Admin\JT808.DotNetty.Dashbord.GrpcProtocol\JT808UnificationSendService.proto" --grpc_out "D:\My Project\JT808DotNetty\src\JT808.DotNetty.Admin\JT808.DotNetty.Dashbord.GrpcProtocol\csharp" --plugin=protoc-gen-grpc=C:\Users\Administrator\.nuget\packages\grpc.tools\1.17.1\tools\windows_x64\grpc_csharp_plugin.exe;
C:\Users\Administrator\.nuget\packages\grpc.tools\1.17.1\tools\windows_x64\protoc.exe -I "D:\My Project\JT808DotNetty\src\JT808.DotNetty.Admin\JT808.DotNetty.Dashbord.GrpcProtocol" --csharp_out "D:\My Project\JT808DotNetty\src\JT808.DotNetty.Admin\JT808.DotNetty.Dashbord.GrpcProtocol\csharp" "D:\My Project\JT808DotNetty\src\JT808.DotNetty.Admin\JT808.DotNetty.Dashbord.GrpcProtocol\JT808SessionService.proto" --grpc_out "D:\My Project\JT808DotNetty\src\JT808.DotNetty.Admin\JT808.DotNetty.Dashbord.GrpcProtocol\csharp" --plugin=protoc-gen-grpc=C:\Users\Administrator\.nuget\packages\grpc.tools\1.17.1\tools\windows_x64\grpc_csharp_plugin.exe;
C:\Users\Administrator\.nuget\packages\grpc.tools\1.17.1\tools\windows_x64\protoc.exe -I "D:\My Project\JT808DotNetty\src\JT808.DotNetty.Admin\JT808.DotNetty.Dashbord.GrpcProtocol" --csharp_out "D:\My Project\JT808DotNetty\src\JT808.DotNetty.Admin\JT808.DotNetty.Dashbord.GrpcProtocol\csharp" "D:\My Project\JT808DotNetty\src\JT808.DotNetty.Admin\JT808.DotNetty.Dashbord.GrpcProtocol\JT808AtomicCounterService.proto" --grpc_out "D:\My Project\JT808DotNetty\src\JT808.DotNetty.Admin\JT808.DotNetty.Dashbord.GrpcProtocol\csharp" --plugin=protoc-gen-grpc=C:\Users\Administrator\.nuget\packages\grpc.tools\1.17.1\tools\windows_x64\grpc_csharp_plugin.exe;
C:\Users\Administrator\.nuget\packages\grpc.tools\1.17.1\tools\windows_x64\protoc.exe -I "D:\My Project\JT808DotNetty\src\JT808.DotNetty.Admin\JT808.DotNetty.Dashbord.GrpcProtocol" --csharp_out "D:\My Project\JT808DotNetty\src\JT808.DotNetty.Admin\JT808.DotNetty.Dashbord.GrpcProtocol\csharp" "D:\My Project\JT808DotNetty\src\JT808.DotNetty.Admin\JT808.DotNetty.Dashbord.GrpcProtocol\EmptyRequest.proto" --grpc_out "D:\My Project\JT808DotNetty\src\JT808.DotNetty.Admin\JT808.DotNetty.Dashbord.GrpcProtocol\csharp" --plugin=protoc-gen-grpc=C:\Users\Administrator\.nuget\packages\grpc.tools\1.17.1\tools\windows_x64\grpc_csharp_plugin.exe;

js

C:\Users\Administrator\.nuget\packages\grpc.tools\1.17.1\tools\windows_x64\protoc.exe -I "D:\My Project\JT808DotNetty\src\JT808.DotNetty.Admin\JT808.DotNetty.Dashbord.GrpcProtocol" --js_out=import_style=commonjs:"D:\My Project\JT808DotNetty\src\JT808.DotNetty.Admin\JT808.DotNetty.Dashbord.GrpcProtocol\js" "D:\My Project\JT808DotNetty\src\JT808.DotNetty.Admin\JT808.DotNetty.Dashbord.GrpcProtocol\EmptyRequest.proto" --grpc_out=import_style=commonjs,mode=grpcwebtext:"D:\My Project\JT808DotNetty\src\JT808.DotNetty.Admin\JT808.DotNetty.Dashbord.GrpcProtocol\js" --plugin=protoc-gen-grpc="D:\My Project\JT808DotNetty\src\JT808.DotNetty.Admin\tools\protoc-gen-grpc-web-1.0.3-windows-x86_64.exe";
C:\Users\Administrator\.nuget\packages\grpc.tools\1.17.1\tools\windows_x64\protoc.exe -I "D:\My Project\JT808DotNetty\src\JT808.DotNetty.Admin\JT808.DotNetty.Dashbord.GrpcProtocol" --js_out=import_style=commonjs:"D:\My Project\JT808DotNetty\src\JT808.DotNetty.Admin\JT808.DotNetty.Dashbord.GrpcProtocol\js" "D:\My Project\JT808DotNetty\src\JT808.DotNetty.Admin\JT808.DotNetty.Dashbord.GrpcProtocol\JT808AtomicCounterService.proto" --grpc_out=import_style=commonjs,mode=grpcwebtext:"D:\My Project\JT808DotNetty\src\JT808.DotNetty.Admin\JT808.DotNetty.Dashbord.GrpcProtocol\js" --plugin=protoc-gen-grpc="D:\My Project\JT808DotNetty\src\JT808.DotNetty.Admin\tools\protoc-gen-grpc-web-1.0.3-windows-x86_64.exe";



+ 131
- 0
src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/js/EmptyRequest_pb.js View File

@@ -0,0 +1,131 @@
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!

var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();

goog.exportSymbol('proto.JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest', null, global);

/**
* 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.JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest.displayName = 'proto.JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest';
}


if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest.prototype.toObject = function(opt_includeInstance) {
return proto.JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest.toObject(opt_includeInstance, this);
};


/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest.toObject = function(includeInstance, msg) {
var f, obj = {

};

if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}


/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest}
*/
proto.JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest;
return proto.JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest.deserializeBinaryFromReader(msg, reader);
};


/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest}
*/
proto.JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
default:
reader.skipField();
break;
}
}
return msg;
};


/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};


/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
};


goog.object.extend(exports, proto.JT808.GrpcDashbord.ServiceGrpcBase);

+ 194
- 0
src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/js/JT808AtomicCounterService_grpc_web_pb.js View File

@@ -0,0 +1,194 @@
/**
* @fileoverview gRPC-Web generated client stub for JT808.GrpcDashbord.AtomicCounterGrpcService
* @enhanceable
* @public
*/

// GENERATED CODE -- DO NOT EDIT!



const grpc = {};
grpc.web = require('grpc-web');


var ResultReply_pb = require('./ResultReply_pb.js')

var EmptyRequest_pb = require('./EmptyRequest_pb.js')
const proto = {};
proto.JT808 = {};
proto.JT808.GrpcDashbord = {};
proto.JT808.GrpcDashbord.AtomicCounterGrpcService = require('./JT808AtomicCounterService_pb.js');

/**
* @param {string} hostname
* @param {?Object} credentials
* @param {?Object} options
* @constructor
* @struct
* @final
*/
proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterServiceClient =
function(hostname, credentials, options) {
if (!options) options = {};
options['format'] = 'text';

/**
* @private @const {!grpc.web.GrpcWebClientBase} The client
*/
this.client_ = new grpc.web.GrpcWebClientBase(options);

/**
* @private @const {string} The hostname
*/
this.hostname_ = hostname;

/**
* @private @const {?Object} The credentials to be used to connect
* to the server
*/
this.credentials_ = credentials;

/**
* @private @const {?Object} Options for the client
*/
this.options_ = options;
};


/**
* @param {string} hostname
* @param {?Object} credentials
* @param {?Object} options
* @constructor
* @struct
* @final
*/
proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterServicePromiseClient =
function(hostname, credentials, options) {
if (!options) options = {};
options['format'] = 'text';

/**
* @private @const {!proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterServiceClient} The delegate callback based client
*/
this.delegateClient_ = new proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterServiceClient(
hostname, credentials, options);

};


/**
* @const
* @type {!grpc.web.AbstractClientBase.MethodInfo<
* !proto.JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest,
* !proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply>}
*/
const methodInfo_AtomicCounterService_GetTcpAtomicCounter = new grpc.web.AbstractClientBase.MethodInfo(
proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply,
/** @param {!proto.JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest} request */
function(request) {
return request.serializeBinary();
},
proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply.deserializeBinary
);


/**
* @param {!proto.JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest} request The
* request proto
* @param {!Object<string, string>} metadata User defined
* call metadata
* @param {function(?grpc.web.Error, ?proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply)}
* callback The callback function(error, response)
* @return {!grpc.web.ClientReadableStream<!proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply>|undefined}
* The XHR Node Readable Stream
*/
proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterServiceClient.prototype.getTcpAtomicCounter =
function(request, metadata, callback) {
return this.client_.rpcCall(this.hostname_ +
'/JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterService/GetTcpAtomicCounter',
request,
metadata,
methodInfo_AtomicCounterService_GetTcpAtomicCounter,
callback);
};


/**
* @param {!proto.JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest} request The
* request proto
* @param {!Object<string, string>} metadata User defined
* call metadata
* @return {!Promise<!proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply>}
* The XHR Node Readable Stream
*/
proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterServicePromiseClient.prototype.getTcpAtomicCounter =
function(request, metadata) {
return new Promise((resolve, reject) => {
this.delegateClient_.getTcpAtomicCounter(
request, metadata, (error, response) => {
error ? reject(error) : resolve(response);
});
});
};


/**
* @const
* @type {!grpc.web.AbstractClientBase.MethodInfo<
* !proto.JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest,
* !proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply>}
*/
const methodInfo_AtomicCounterService_GetUdpAtomicCounter = new grpc.web.AbstractClientBase.MethodInfo(
proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply,
/** @param {!proto.JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest} request */
function(request) {
return request.serializeBinary();
},
proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply.deserializeBinary
);


/**
* @param {!proto.JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest} request The
* request proto
* @param {!Object<string, string>} metadata User defined
* call metadata
* @param {function(?grpc.web.Error, ?proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply)}
* callback The callback function(error, response)
* @return {!grpc.web.ClientReadableStream<!proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply>|undefined}
* The XHR Node Readable Stream
*/
proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterServiceClient.prototype.getUdpAtomicCounter =
function(request, metadata, callback) {
return this.client_.rpcCall(this.hostname_ +
'/JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterService/GetUdpAtomicCounter',
request,
metadata,
methodInfo_AtomicCounterService_GetUdpAtomicCounter,
callback);
};


/**
* @param {!proto.JT808.GrpcDashbord.ServiceGrpcBase.EmptyRequest} request The
* request proto
* @param {!Object<string, string>} metadata User defined
* call metadata
* @return {!Promise<!proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply>}
* The XHR Node Readable Stream
*/
proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterServicePromiseClient.prototype.getUdpAtomicCounter =
function(request, metadata) {
return new Promise((resolve, reject) => {
this.delegateClient_.getUdpAtomicCounter(
request, metadata, (error, response) => {
error ? reject(error) : resolve(response);
});
});
};


module.exports = proto.JT808.GrpcDashbord.AtomicCounterGrpcService;


+ 390
- 0
src/JT808.DotNetty.Admin/JT808.DotNetty.Dashbord.GrpcProtocol/js/JT808AtomicCounterService_pb.js View File

@@ -0,0 +1,390 @@
/**
* @fileoverview
* @enhanceable
* @suppress {messageConventions} JS Compiler reports an error if a variable or
* field starts with 'MSG_' and isn't a translatable message.
* @public
*/
// GENERATED CODE -- DO NOT EDIT!

var jspb = require('google-protobuf');
var goog = jspb;
var global = Function('return this')();

var ResultReply_pb = require('./ResultReply_pb.js');
var EmptyRequest_pb = require('./EmptyRequest_pb.js');
goog.exportSymbol('proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterInfo', null, global);
goog.exportSymbol('proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply', null, global);

/**
* 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.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply.displayName = 'proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply';
}


if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply.prototype.toObject = function(opt_includeInstance) {
return proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply.toObject(opt_includeInstance, this);
};


/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply.toObject = function(includeInstance, msg) {
var f, obj = {
atomiccounterinfo: (f = msg.getAtomiccounterinfo()) && proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterInfo.toObject(includeInstance, f),
resultreply: (f = msg.getResultreply()) && ResultReply_pb.ResultReply.toObject(includeInstance, f)
};

if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}


/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply}
*/
proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply;
return proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply.deserializeBinaryFromReader(msg, reader);
};


/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply}
*/
proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = new proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterInfo;
reader.readMessage(value,proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterInfo.deserializeBinaryFromReader);
msg.setAtomiccounterinfo(value);
break;
case 2:
var value = new ResultReply_pb.ResultReply;
reader.readMessage(value,ResultReply_pb.ResultReply.deserializeBinaryFromReader);
msg.setResultreply(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};


/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};


/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getAtomiccounterinfo();
if (f != null) {
writer.writeMessage(
1,
f,
proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterInfo.serializeBinaryToWriter
);
}
f = message.getResultreply();
if (f != null) {
writer.writeMessage(
2,
f,
ResultReply_pb.ResultReply.serializeBinaryToWriter
);
}
};


/**
* optional AtomicCounterInfo AtomicCounterInfo = 1;
* @return {?proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterInfo}
*/
proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply.prototype.getAtomiccounterinfo = function() {
return /** @type{?proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterInfo} */ (
jspb.Message.getWrapperField(this, proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterInfo, 1));
};


/** @param {?proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterInfo|undefined} value */
proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply.prototype.setAtomiccounterinfo = function(value) {
jspb.Message.setWrapperField(this, 1, value);
};


proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply.prototype.clearAtomiccounterinfo = function() {
this.setAtomiccounterinfo(undefined);
};


/**
* Returns whether this field is set.
* @return {!boolean}
*/
proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply.prototype.hasAtomiccounterinfo = function() {
return jspb.Message.getField(this, 1) != null;
};


/**
* optional JT808.GrpcDashbord.ServiceGrpcBase.ResultReply ResultReply = 2;
* @return {?proto.JT808.GrpcDashbord.ServiceGrpcBase.ResultReply}
*/
proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply.prototype.getResultreply = function() {
return /** @type{?proto.JT808.GrpcDashbord.ServiceGrpcBase.ResultReply} */ (
jspb.Message.getWrapperField(this, ResultReply_pb.ResultReply, 2));
};


/** @param {?proto.JT808.GrpcDashbord.ServiceGrpcBase.ResultReply|undefined} value */
proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply.prototype.setResultreply = function(value) {
jspb.Message.setWrapperField(this, 2, value);
};


proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply.prototype.clearResultreply = function() {
this.setResultreply(undefined);
};


/**
* Returns whether this field is set.
* @return {!boolean}
*/
proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterReply.prototype.hasResultreply = function() {
return jspb.Message.getField(this, 2) != null;
};



/**
* 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.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterInfo = function(opt_data) {
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
};
goog.inherits(proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterInfo, jspb.Message);
if (goog.DEBUG && !COMPILED) {
proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterInfo.displayName = 'proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterInfo';
}


if (jspb.Message.GENERATE_TO_OBJECT) {
/**
* Creates an object representation of this proto suitable for use in Soy templates.
* Field names that are reserved in JavaScript and will be renamed to pb_name.
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
* For the list of reserved names please see:
* com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS.
* @param {boolean=} opt_includeInstance Whether to include the JSPB instance
* for transitional soy proto support: http://goto/soy-param-migration
* @return {!Object}
*/
proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterInfo.prototype.toObject = function(opt_includeInstance) {
return proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterInfo.toObject(opt_includeInstance, this);
};


/**
* Static version of the {@see toObject} method.
* @param {boolean|undefined} includeInstance Whether to include the JSPB
* instance for transitional soy proto support:
* http://goto/soy-param-migration
* @param {!proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterInfo} msg The msg instance to transform.
* @return {!Object}
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterInfo.toObject = function(includeInstance, msg) {
var f, obj = {
msgsuccesscount: jspb.Message.getFieldWithDefault(msg, 1, 0),
msgfailcount: jspb.Message.getFieldWithDefault(msg, 2, 0)
};

if (includeInstance) {
obj.$jspbMessageInstance = msg;
}
return obj;
};
}


/**
* Deserializes binary data (in protobuf wire format).
* @param {jspb.ByteSource} bytes The bytes to deserialize.
* @return {!proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterInfo}
*/
proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterInfo.deserializeBinary = function(bytes) {
var reader = new jspb.BinaryReader(bytes);
var msg = new proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterInfo;
return proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterInfo.deserializeBinaryFromReader(msg, reader);
};


/**
* Deserializes binary data (in protobuf wire format) from the
* given reader into the given message object.
* @param {!proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterInfo} msg The message object to deserialize into.
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
* @return {!proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterInfo}
*/
proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterInfo.deserializeBinaryFromReader = function(msg, reader) {
while (reader.nextField()) {
if (reader.isEndGroup()) {
break;
}
var field = reader.getFieldNumber();
switch (field) {
case 1:
var value = /** @type {number} */ (reader.readInt32());
msg.setMsgsuccesscount(value);
break;
case 2:
var value = /** @type {number} */ (reader.readInt32());
msg.setMsgfailcount(value);
break;
default:
reader.skipField();
break;
}
}
return msg;
};


/**
* Serializes the message to binary data (in protobuf wire format).
* @return {!Uint8Array}
*/
proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterInfo.prototype.serializeBinary = function() {
var writer = new jspb.BinaryWriter();
proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterInfo.serializeBinaryToWriter(this, writer);
return writer.getResultBuffer();
};


/**
* Serializes the given message to binary data (in protobuf wire
* format), writing to the given BinaryWriter.
* @param {!proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterInfo} message
* @param {!jspb.BinaryWriter} writer
* @suppress {unusedLocalVariables} f is only used for nested messages
*/
proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterInfo.serializeBinaryToWriter = function(message, writer) {
var f = undefined;
f = message.getMsgsuccesscount();
if (f !== 0) {
writer.writeInt32(
1,
f
);
}
f = message.getMsgfailcount();
if (f !== 0) {
writer.writeInt32(
2,
f
);
}
};


/**
* optional int32 MsgSuccessCount = 1;
* @return {number}
*/
proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterInfo.prototype.getMsgsuccesscount = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
};


/** @param {number} value */
proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterInfo.prototype.setMsgsuccesscount = function(value) {
jspb.Message.setProto3IntField(this, 1, value);
};


/**
* optional int32 MsgFailCount = 2;
* @return {number}
*/
proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterInfo.prototype.getMsgfailcount = function() {
return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
};


/** @param {number} value */
proto.JT808.GrpcDashbord.AtomicCounterGrpcService.AtomicCounterInfo.prototype.setMsgfailcount = function(value) {
jspb.Message.setProto3IntField(this, 2, value);
};


goog.object.extend(exports, proto.JT808.GrpcDashbord.AtomicCounterGrpcService);

+ 19
- 0
src/JT808.DotNetty.Admin/envoy/Dockerfile View File

@@ -0,0 +1,19 @@
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

FROM envoyproxy/envoy:latest

COPY net/grpc/gateway/examples/echo/envoy.yaml /etc/envoy/envoy.yaml

CMD /usr/local/bin/envoy -c /etc/envoy/envoy.yaml -l trace --log-path /tmp/envoy_info.log

+ 45
- 0
src/JT808.DotNetty.Admin/envoy/envoy.yaml View File

@@ -0,0 +1,45 @@
admin:
access_log_path: /tmp/admin_access.log
address:
socket_address: { address: 0.0.0.0, port_value: 9901 }

static_resources:
listeners:
- name: listener_0
address:
socket_address: { address: 0.0.0.0, port_value: 8080 }
filter_chains:
- filters:
- name: envoy.http_connection_manager
config:
codec_type: auto
stat_prefix: ingress_http
route_config:
name: local_route
virtual_hosts:
- name: local_service
domains: ["*"]
routes:
- match: { prefix: "/" }
route:
cluster: echo_service
max_grpc_timeout: 0s
cors:
allow_origin:
- "*"
allow_methods: GET, PUT, DELETE, POST, OPTIONS
allow_headers: keep-alive,user-agent,cache-control,content-type,content-transfer-encoding,custom-header-1,x-accept-content-transfer-encoding,x-accept-response-streaming,x-user-agent,x-grpc-web,grpc-timeout
max_age: "1728000"
expose_headers: custom-header-1,grpc-status,grpc-message
enabled: true
http_filters:
- name: envoy.grpc_web
- name: envoy.cors
- name: envoy.router
clusters:
- name: echo_service
connect_timeout: 0.25s
type: logical_dns
http2_protocol_options: {}
lb_policy: round_robin
hosts: [{ socket_address: { address: node-server, port_value: 9090 }}]

+ 3
- 0
src/JT808.DotNetty.Admin/tools/README.md View File

@@ -0,0 +1,3 @@
# 下载地址

[https://github.com/grpc/grpc-web/releases](https://github.com/grpc/grpc-web/releases)

Loading…
Cancel
Save