Move Protos to Shared library
This commit is contained in:
@@ -1,13 +1,9 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Protobuf Include="Protos\akari.proto" GrpcServices="Server" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CliFx" Version="2.0.4" />
|
||||
<PackageReference Include="Grpc.AspNetCore" Version="2.34.0" />
|
||||
@@ -15,4 +11,8 @@
|
||||
<PackageReference Include="Spectre.Console" Version="0.39.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Akari.Prototype.Shared\Akari.Prototype.Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
syntax = "proto3";
|
||||
|
||||
option csharp_namespace = "Akari.Prototype.Protos";
|
||||
|
||||
package akari;
|
||||
|
||||
service AkariApi {
|
||||
rpc Encrypt (EncryptRequest) returns (EncryptResponse);
|
||||
|
||||
rpc Decrypt (DecryptRequest) returns (DecryptResponse);
|
||||
}
|
||||
|
||||
message EncryptRequest {
|
||||
string application = 1;
|
||||
string token = 2;
|
||||
bytes plain = 3;
|
||||
}
|
||||
|
||||
message EncryptResponse {
|
||||
oneof response {
|
||||
string error_message = 1;
|
||||
bytes encrypted = 2;
|
||||
}
|
||||
}
|
||||
|
||||
message DecryptRequest {
|
||||
string application = 1;
|
||||
string token = 2;
|
||||
bytes encrypted = 3;
|
||||
}
|
||||
|
||||
message DecryptResponse {
|
||||
oneof response {
|
||||
string error_message = 1;
|
||||
bytes plain = 2;
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
syntax = "proto3";
|
||||
|
||||
option csharp_namespace = "Akari.Prototype.Server";
|
||||
|
||||
package greet;
|
||||
|
||||
// The greeting service definition.
|
||||
service Greeter {
|
||||
// Sends a greeting
|
||||
rpc SayHello (HelloRequest) returns (HelloReply);
|
||||
}
|
||||
|
||||
// The request message containing the user's name.
|
||||
message HelloRequest {
|
||||
string name = 1;
|
||||
}
|
||||
|
||||
// The response message containing the greetings.
|
||||
message HelloReply {
|
||||
string message = 1;
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
using Akari.Prototype.Protos;
|
||||
using Akari.Prototype.Server.Services;
|
||||
using Akari.Prototype.Server.Utils;
|
||||
using Akari.Prototype.Shared.Protos;
|
||||
using Google.Protobuf;
|
||||
using Grpc.Core;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
Reference in New Issue
Block a user