Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extracted Protos out to common project #1367

Merged
merged 2 commits into from
Oct 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions all.sln
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dapr.E2E.Test.Actors.Genera
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cryptography", "examples\Client\Cryptography\Cryptography.csproj", "{C74FBA78-13E8-407F-A173-4555AEE41FF3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dapr.Protos", "src\Dapr.Protos\Dapr.Protos.csproj", "{DFBABB04-50E9-42F6-B470-310E1B545638}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dapr.Common", "src\Dapr.Common\Dapr.Common.csproj", "{B445B19C-A925-4873-8CB7-8317898B6970}"
EndProject
Global
Expand Down Expand Up @@ -292,6 +294,10 @@ Global
{C74FBA78-13E8-407F-A173-4555AEE41FF3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C74FBA78-13E8-407F-A173-4555AEE41FF3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C74FBA78-13E8-407F-A173-4555AEE41FF3}.Release|Any CPU.Build.0 = Release|Any CPU
{DFBABB04-50E9-42F6-B470-310E1B545638}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{DFBABB04-50E9-42F6-B470-310E1B545638}.Debug|Any CPU.Build.0 = Debug|Any CPU
{DFBABB04-50E9-42F6-B470-310E1B545638}.Release|Any CPU.ActiveCfg = Release|Any CPU
{DFBABB04-50E9-42F6-B470-310E1B545638}.Release|Any CPU.Build.0 = Release|Any CPU
{B445B19C-A925-4873-8CB7-8317898B6970}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B445B19C-A925-4873-8CB7-8317898B6970}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B445B19C-A925-4873-8CB7-8317898B6970}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -349,6 +355,7 @@ Global
{AF89083D-4715-42E6-93E9-38497D12A8A6} = {DD020B34-460F-455F-8D17-CF4A949F100B}
{B5CDB0DC-B26D-48F1-B934-FE5C1C991940} = {DD020B34-460F-455F-8D17-CF4A949F100B}
{C74FBA78-13E8-407F-A173-4555AEE41FF3} = {A7F41094-8648-446B-AECD-DCC2CC871F73}
{DFBABB04-50E9-42F6-B470-310E1B545638} = {27C5D71D-0721-4221-9286-B94AB07B58CF}
{B445B19C-A925-4873-8CB7-8317898B6970} = {27C5D71D-0721-4221-9286-B94AB07B58CF}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

<ItemGroup>
<ProjectReference Include="..\..\..\src\Dapr.AspNetCore\Dapr.AspNetCore.csproj" />
<ProjectReference Include="..\..\..\src\Dapr.Protos\Dapr.Protos.csproj" />
</ItemGroup>

</Project>
16 changes: 4 additions & 12 deletions src/Dapr.Client/Dapr.Client.csproj
Original file line number Diff line number Diff line change
@@ -1,28 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">

<ItemGroup>
<Protobuf Include="Protos\dapr\proto\common\v1\common.proto" ProtoRoot="Protos" GrpcServices="Client,Server" />
<Protobuf Include="Protos\dapr\proto\dapr\v1\dapr.proto" ProtoRoot="Protos" GrpcServices="Client" />
<Protobuf Include="Protos\dapr\proto\dapr\v1\appcallback.proto" ProtoRoot="Protos" GrpcServices="Server" />
</ItemGroup>

<!-- Additional Nuget package properties. -->
<PropertyGroup>
<Description>This package contains the reference assemblies for developing services using Dapr.</Description>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Google.Protobuf" />
<PackageReference Include="Grpc.Net.Client" />
<PackageReference Include="Grpc.Tools" PrivateAssets="All" />
<PackageReference Include="Google.Api.CommonProtos" />
</ItemGroup>

<ItemGroup>
<Folder Include="Protos\" />
</ItemGroup>


<ItemGroup>
<ProjectReference Include="..\Dapr.Protos\Dapr.Protos.csproj" />
<ProjectReference Include="..\Dapr.Common\Dapr.Common.csproj" />
</ItemGroup>

</Project>
22 changes: 22 additions & 0 deletions src/Dapr.Protos/Dapr.Protos.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Description>This package contains the reference protos used by develop services using Dapr.</Description>
</PropertyGroup>

<ItemGroup>
<Protobuf Include="Protos\dapr\proto\common\v1\common.proto" ProtoRoot="Protos" GrpcServices="Client,Server" />
<Protobuf Include="Protos\dapr\proto\runtime\v1\dapr.proto" ProtoRoot="Protos" GrpcServices="Client" />
<Protobuf Include="Protos\dapr\proto\runtime\v1\appcallback.proto" ProtoRoot="Protos" GrpcServices="Server" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Google.Protobuf" />
<PackageReference Include="Grpc.Net.Client" />
<PackageReference Include="Grpc.Tools" PrivateAssets="All" />
<PackageReference Include="Google.Api.CommonProtos" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
Copyright 2021 The Dapr Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -26,7 +26,7 @@ option go_package = "github.com/dapr/dapr/pkg/proto/common/v1;common";
// when Dapr runtime delivers HTTP content.
//
// For example, when callers calls http invoke api
// POST http://localhost:3500/v1.0/invoke/<app_id>/method/<method>?query1=value1&query2=value2
// `POST http://localhost:3500/v1.0/invoke/<app_id>/method/<method>?query1=value1&query2=value2`
//
// Dapr runtime will parse POST as a verb and extract querystring to quersytring map.
message HTTPExtension {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
Copyright 2021 The Dapr Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -58,7 +58,7 @@ service AppCallbackHealthCheck {
// AppCallbackAlpha V1 is an optional extension to AppCallback V1 to opt
// for Alpha RPCs.
service AppCallbackAlpha {
// Subscribes bulk events from Pubsub
// Subscribes bulk events from Pubsub
rpc OnBulkTopicEventAlpha1(TopicEventBulkRequest) returns (TopicEventBulkResponse) {}

// Sends job back to the app's endpoint at trigger time.
Expand Down Expand Up @@ -185,14 +185,14 @@ message TopicEventBulkRequestEntry {

// content type of the event contained.
string content_type = 4;

// The metadata associated with the event.
map<string,string> metadata = 5;
}

// TopicEventBulkRequest represents request for bulk message
message TopicEventBulkRequest {
// Unique identifier for the bulk request.
// Unique identifier for the bulk request.
string id = 1;

// The list of items inside this bulk request.
Expand All @@ -203,10 +203,10 @@ message TopicEventBulkRequest {

// The pubsub topic which publisher sent to.
string topic = 4;

// The name of the pubsub the publisher sent to.
string pubsub_name = 5;

// The type of event related to the originating occurrence.
string type = 6;

Expand Down Expand Up @@ -310,8 +310,8 @@ message TopicRoutes {

message TopicRule {
// The optional CEL expression used to match the event.
// If the match is not specified, then the route is considered
// the default.
// If the match is not specified, then the route is considered
// the default.
string match = 1;

// The path used to identify matches for this subscription.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*
/*
Copyright 2021 The Dapr Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -19,7 +19,7 @@ import "google/protobuf/any.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/timestamp.proto";
import "dapr/proto/common/v1/common.proto";
import "dapr/proto/dapr/v1/appcallback.proto";
import "dapr/proto/runtime/v1/appcallback.proto";

option csharp_namespace = "Dapr.Client.Autogen.Grpc.v1";
option java_outer_classname = "DaprProtos";
Expand Down Expand Up @@ -61,7 +61,7 @@ service Dapr {

// SubscribeTopicEventsAlpha1 subscribes to a PubSub topic and receives topic
// events from it.
rpc SubscribeTopicEventsAlpha1(stream SubscribeTopicEventsRequestAlpha1) returns (stream TopicEventRequest) {}
rpc SubscribeTopicEventsAlpha1(stream SubscribeTopicEventsRequestAlpha1) returns (stream SubscribeTopicEventsResponseAlpha1) {}

// Invokes binding data to specific output bindings
rpc InvokeBinding(InvokeBindingRequest) returns (InvokeBindingResponse) {}
Expand Down Expand Up @@ -428,17 +428,17 @@ message BulkPublishResponseFailedEntry {
// SubscribeTopicEventsRequestAlpha1 is a message containing the details for
// subscribing to a topic via streaming.
// The first message must always be the initial request. All subsequent
// messages must be event responses.
// messages must be event processed responses.
message SubscribeTopicEventsRequestAlpha1 {
oneof subscribe_topic_events_request_type {
SubscribeTopicEventsInitialRequestAlpha1 initial_request = 1;
SubscribeTopicEventsResponseAlpha1 event_response = 2;
SubscribeTopicEventsRequestInitialAlpha1 initial_request = 1;
SubscribeTopicEventsRequestProcessedAlpha1 event_processed = 2;
}
}

// SubscribeTopicEventsInitialRequestAlpha1 is the initial message containing the
// details for subscribing to a topic via streaming.
message SubscribeTopicEventsInitialRequestAlpha1 {
// SubscribeTopicEventsRequestInitialAlpha1 is the initial message containing
// the details for subscribing to a topic via streaming.
message SubscribeTopicEventsRequestInitialAlpha1 {
// The name of the pubsub component
string pubsub_name = 1;

Expand All @@ -456,16 +456,31 @@ message SubscribeTopicEventsInitialRequestAlpha1 {
optional string dead_letter_topic = 4;
}

// SubscribeTopicEventsResponseAlpha1 is a message containing the result of a
// SubscribeTopicEventsRequestProcessedAlpha1 is the message containing the
// subscription to a topic.
message SubscribeTopicEventsResponseAlpha1 {
message SubscribeTopicEventsRequestProcessedAlpha1 {
// id is the unique identifier for the subscription request.
string id = 1;

// status is the result of the subscription request.
TopicEventResponse status = 2;
}


// SubscribeTopicEventsResponseAlpha1 is a message returned from daprd
// when subscribing to a topic via streaming.
message SubscribeTopicEventsResponseAlpha1 {
oneof subscribe_topic_events_response_type {
SubscribeTopicEventsResponseInitialAlpha1 initial_response = 1;
TopicEventRequest event_message = 2;
}
}

// SubscribeTopicEventsResponseInitialAlpha1 is the initial response from daprd
// when subscribing to a topic.
message SubscribeTopicEventsResponseInitialAlpha1 {}


// InvokeBindingRequest is the message to send data to output bindings
message InvokeBindingRequest {
// The name of the output binding to invoke.
Expand All @@ -478,6 +493,7 @@ message InvokeBindingRequest {
//
// Common metadata property:
// - ttlInSeconds : the time to live in seconds for the message.
//
// If set in the binding definition will cause all messages to
// have a default time to live. The message ttl overrides any value
// in the binding definition.
Expand Down Expand Up @@ -824,11 +840,11 @@ message TryLockRequest {
//
// The reason why we don't make it automatically generated is:
// 1. If it is automatically generated,there must be a 'my_lock_owner_id' field in the response.
// This name is so weird that we think it is inappropriate to put it into the api spec
// This name is so weird that we think it is inappropriate to put it into the api spec
// 2. If we change the field 'my_lock_owner_id' in the response to 'lock_owner',which means the current lock owner of this lock,
// we find that in some lock services users can't get the current lock owner.Actually users don't need it at all.
// we find that in some lock services users can't get the current lock owner.Actually users don't need it at all.
// 3. When reentrant lock is needed,the existing lock_owner is required to identify client and check "whether this client can reenter this lock".
// So this field in the request shouldn't be removed.
// So this field in the request shouldn't be removed.
string lock_owner = 3 [json_name = "lockOwner"];

// Required. The time before expiry.The time unit is second.
Expand Down Expand Up @@ -865,7 +881,7 @@ message SubtleGetKeyRequest {
// JSON (JSON Web Key) as string
JSON = 1;
}

// Name of the component
string component_name = 1 [json_name="componentName"];
// Name (or name/version) of the key to use in the key vault
Expand Down Expand Up @@ -1047,7 +1063,7 @@ message EncryptRequestOptions {
// If true, the encrypted document does not contain a key reference.
// In that case, calls to the Decrypt method must provide a key reference (name or name/version).
// Defaults to false.
bool omit_decryption_key_name = 11 [json_name="omitDecryptionKeyName"];
bool omit_decryption_key_name = 11 [json_name="omitDecryptionKeyName"];
// Key reference to embed in the encrypted document (name or name/version).
// This is helpful if the reference of the key used to decrypt the document is different from the one used to encrypt it.
// If unset, uses the reference of the key used to encrypt the document (this is the default behavior).
Expand Down Expand Up @@ -1196,14 +1212,14 @@ message Job {
// "0 15 3 * * *" - every day at 03:15
//
// Period string expressions:
// Entry | Description | Equivalent To
// ----- | ----------- | -------------
// @every <duration> | Run every <duration> (e.g. '@every 1h30m') | N/A
// @yearly (or @annually) | Run once a year, midnight, Jan. 1st | 0 0 0 1 1 *
// @monthly | Run once a month, midnight, first of month | 0 0 0 1 * *
// @weekly | Run once a week, midnight on Sunday | 0 0 0 * * 0
// @daily (or @midnight) | Run once a day, midnight | 0 0 0 * * *
// @hourly | Run once an hour, beginning of hour | 0 0 * * * *
// Entry | Description | Equivalent To
// ----- | ----------- | -------------
// @every `<duration>` | Run every `<duration>` (e.g. '@every 1h30m') | N/A
// @yearly (or @annually) | Run once a year, midnight, Jan. 1st | 0 0 0 1 1 *
// @monthly | Run once a month, midnight, first of month | 0 0 0 1 * *
// @weekly | Run once a week, midnight on Sunday | 0 0 0 * * 0
// @daily (or @midnight) | Run once a day, midnight | 0 0 0 * * *
// @hourly | Run once an hour, beginning of hour | 0 0 * * * *
optional string schedule = 2 [json_name = "schedule"];

// repeats is the optional number of times in which the job should be
Expand Down Expand Up @@ -1258,4 +1274,4 @@ message DeleteJobRequest {
// DeleteJobResponse is the message response to delete the job by name.
message DeleteJobResponse {
// Empty
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

<ItemGroup>
<ProjectReference Include="..\..\src\Dapr.AspNetCore\Dapr.AspNetCore.csproj" />
<ProjectReference Include="..\..\src\Dapr.Protos\Dapr.Protos.csproj" />
<ProjectReference Include="..\..\src\Dapr.Common\Dapr.Common.csproj" />
<ProjectReference Include="..\Dapr.AspNetCore.IntegrationTest.App\Dapr.AspNetCore.IntegrationTest.App.csproj" />
</ItemGroup>
Expand Down
1 change: 1 addition & 0 deletions test/Dapr.AspNetCore.Test/Dapr.AspNetCore.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

<ItemGroup>
<ProjectReference Include="..\..\src\Dapr.AspNetCore\Dapr.AspNetCore.csproj" />
<ProjectReference Include="..\..\src\Dapr.Protos\Dapr.Protos.csproj" />
</ItemGroup>

</Project>
1 change: 1 addition & 0 deletions test/Dapr.Client.Test/Dapr.Client.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

<ItemGroup>
<ProjectReference Include="..\..\src\Dapr.Client\Dapr.Client.csproj" />
<ProjectReference Include="..\..\src\Dapr.Protos\Dapr.Protos.csproj" />
<ProjectReference Include="..\..\src\Dapr.Common\Dapr.Common.csproj" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<ItemGroup>
<ProjectReference Include="..\..\src\Dapr.Common\Dapr.Common.csproj" />
<ProjectReference Include="..\..\src\Dapr.Extensions.Configuration\Dapr.Extensions.Configuration.csproj" />
<ProjectReference Include="..\..\src\Dapr.Protos\Dapr.Protos.csproj" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading