.
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
using VizhTalk.BuildingBlocks.Domain.Contract;
|
||||
using VizhTalk.Grpc.Learning.Language;
|
||||
|
||||
namespace VizhTalk.Grpc.Learning.Language;
|
||||
|
||||
public sealed partial class CreateLanguageCommand : ICommand<LanguageDTO>;
|
||||
public sealed partial class UpdateLanguageCommand : ICommand<LanguageDTO>;
|
||||
@@ -1,35 +0,0 @@
|
||||
syntax="proto3";
|
||||
|
||||
option csharp_namespace="VizhTalk.Grpc.Learning.Language";
|
||||
|
||||
package greet;
|
||||
|
||||
message LanguageDTO {
|
||||
string Id = 1;
|
||||
string title = 2;
|
||||
}
|
||||
|
||||
message GetAllLanguageDTO{
|
||||
repeated LanguageDTO language =1;
|
||||
}
|
||||
message GetAllLanguageRequest{
|
||||
}
|
||||
message GetLanguageByTitleRequest{
|
||||
LanguageDTO Language = 1;
|
||||
}
|
||||
message CreateLanguageRequest{
|
||||
string title = 2;
|
||||
}
|
||||
message UpdateLanguageRequest{
|
||||
string Id = 1;
|
||||
string title = 2;
|
||||
}
|
||||
message Empty{
|
||||
|
||||
}
|
||||
service LanguageGrpc {
|
||||
rpc GetAll (GetAllLanguageRequest) returns (GetAllLanguageDTO);
|
||||
rpc GetByTitle (GetLanguageByTitleRequest) returns (LanguageDTO);
|
||||
rpc Create (CreateLanguageRequest) returns (LanguageDTO);
|
||||
rpc Update (UpdateLanguageRequest) returns (Empty);
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
syntax="proto3";
|
||||
|
||||
option csharp_namespace="VizhTalk.Grpc.Learning.Language";
|
||||
|
||||
package greet;
|
||||
|
||||
|
||||
message CreateLanguageCommand{
|
||||
string title = 2;
|
||||
}
|
||||
|
||||
message UpdateLanguageCommand{
|
||||
int32 Id = 1;
|
||||
string title = 2;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
syntax="proto3";
|
||||
|
||||
option csharp_namespace="VizhTalk.Grpc.Learning.Language";
|
||||
|
||||
package greet;
|
||||
|
||||
message LanguageDTO {
|
||||
string Id = 1;
|
||||
string title = 2;
|
||||
}
|
||||
|
||||
|
||||
message GetAllLanguageDTO{
|
||||
repeated LanguageDTO language =1;
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
syntax="proto3";
|
||||
|
||||
option csharp_namespace="VizhTalk.Grpc.Learning.Language";
|
||||
|
||||
package greet;
|
||||
|
||||
|
||||
message GetAllLanguageQuery{
|
||||
}
|
||||
message GetLanguageByTitleQuery{
|
||||
string title = 1;
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
syntax="proto3";
|
||||
|
||||
option csharp_namespace="VizhTalk.Grpc.Learning.Language";
|
||||
|
||||
package greet;
|
||||
|
||||
import "Proto/Languages/DTOs.proto";
|
||||
import "Proto/Languages/Queries.proto";
|
||||
import "Proto/Languages/Commands.proto";
|
||||
import "Proto/Shared.proto";
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
service LanguageGrpc {
|
||||
rpc Create (CreateLanguageCommand) returns (LanguageDTO);
|
||||
rpc Update (UpdateLanguageCommand) returns (LanguageDTO);
|
||||
rpc GetAll (GetAllLanguageQuery) returns (GetAllLanguageDTO);
|
||||
rpc GetByTitle (GetLanguageByTitleQuery) returns (LanguageDTO);
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
syntax="proto3";
|
||||
|
||||
option csharp_namespace="VizhTalk.Grpc.Learning";
|
||||
|
||||
package greet;
|
||||
|
||||
message Empty{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
using VizhTalk.BuildingBlocks.Domain.Contract;
|
||||
using VizhTalk.Grpc.Learning.Language;
|
||||
|
||||
namespace VizhTalk.Grpc.Learning.Language;
|
||||
|
||||
public sealed partial class GetAllLanguageQuery : IQuery<GetAllLanguageDTO>;
|
||||
public sealed partial class GetLanguageByTitleQuery : IQuery<LanguageDTO>;
|
||||
@@ -11,6 +11,13 @@
|
||||
<PackageReference Include="Grpc.Tools" Version="2.58.0" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Protobuf Include="Language.proto" GrpcServices="Both" />
|
||||
<ProjectReference Include="..\VizhTalk.BuildingBlocks.Domain\VizhTalk.BuildingBlocks.Domain.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Protobuf Include="Proto\Languages\Services.proto" GrpcServices="Both" />
|
||||
<Protobuf Include="Proto\Languages\DTOs.proto" GrpcServices="Both" />
|
||||
<Protobuf Include="Proto\Languages\Queries.proto" GrpcServices="Both" />
|
||||
<Protobuf Include="Proto\Languages\Commands.proto" GrpcServices="Both" />
|
||||
<Protobuf Include="Proto\Shared.proto" GrpcServices="Both" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
Reference in New Issue
Block a user