From 12119049d470c6212175de34bdd398e6395e71a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakob=20H=C3=B8genes?= <1014990+jakhog@users.noreply.github.com> Date: Thu, 28 Oct 2021 16:11:17 +0200 Subject: [PATCH 1/2] Change AggregateRoot registration so we can do cool things in the future --- Source/Runtime/Aggregates/AggregateRoots.proto | 12 +++++++----- Source/Runtime/Embeddings/Store.proto | 6 +++--- Source/Runtime/Events/EventTypes.proto | 6 ++++-- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/Source/Runtime/Aggregates/AggregateRoots.proto b/Source/Runtime/Aggregates/AggregateRoots.proto index d8cd959..76b42a5 100644 --- a/Source/Runtime/Aggregates/AggregateRoots.proto +++ b/Source/Runtime/Aggregates/AggregateRoots.proto @@ -5,21 +5,23 @@ syntax = "proto3"; import "Fundamentals/Artifacts/Artifact.proto"; import "Fundamentals/Protobuf/Failure.proto"; +import "Fundamentals/Services/CallContext.proto"; package dolittle.runtime.aggregates; option csharp_namespace = "Dolittle.Runtime.Aggregates.Contracts"; option go_package = "go.dolittle.io/contracts/runtime/aggregates"; -message AggregateRootRegistrationRequest { - artifacts.Artifact aggregateRoot = 1; - optional string alias = 2; +message AggregateRootAliasRegistrationRequest { + services.CallRequestContext callContext = 1; + artifacts.Artifact aggregateRoot = 2; + optional string alias = 3; } -message AggregateRootRegistrationResponse { +message AggregateRootAliasRegistrationResponse { protobuf.Failure failure = 1; } service AggregateRoots { - rpc Register(AggregateRootRegistrationRequest) returns(AggregateRootRegistrationResponse); + rpc RegisterAlias(AggregateRootRegistrationRequest) returns(AggregateRootRegistrationResponse); } diff --git a/Source/Runtime/Embeddings/Store.proto b/Source/Runtime/Embeddings/Store.proto index 8b204a6..fa4801a 100644 --- a/Source/Runtime/Embeddings/Store.proto +++ b/Source/Runtime/Embeddings/Store.proto @@ -14,18 +14,18 @@ option csharp_namespace = "Dolittle.Runtime.Embeddings.Contracts"; option go_package = "go.dolittle.io/contracts/runtime/embeddings"; message GetOneRequest { - services.CallRequestContext callContext = 1; + services.CallRequestContext callContext = 1; protobuf.Uuid embeddingId = 2; string key = 3; } message GetKeysRequest { - services.CallRequestContext callContext = 1; + services.CallRequestContext callContext = 1; protobuf.Uuid embeddingId = 2; } message GetAllRequest { - services.CallRequestContext callContext = 1; + services.CallRequestContext callContext = 1; protobuf.Uuid embeddingId = 2; } diff --git a/Source/Runtime/Events/EventTypes.proto b/Source/Runtime/Events/EventTypes.proto index 16f4f9c..b8f1e08 100644 --- a/Source/Runtime/Events/EventTypes.proto +++ b/Source/Runtime/Events/EventTypes.proto @@ -5,6 +5,7 @@ syntax = "proto3"; import "Fundamentals/Artifacts/Artifact.proto"; import "Fundamentals/Protobuf/Failure.proto"; +import "Fundamentals/Services/CallContext.proto"; package dolittle.runtime.events; @@ -12,8 +13,9 @@ option csharp_namespace = "Dolittle.Runtime.Events.Contracts"; option go_package = "go.dolittle.io/contracts/runtime/events"; message EventTypeRegistrationRequest { - artifacts.Artifact eventType = 1; - optional string alias = 2; + services.CallRequestContext callContext = 1; + artifacts.Artifact eventType = 2; + optional string alias = 3; } message EventTypeRegistrationResponse { From fff088ae1066f8a665147bf7df8b760686b382de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakob=20H=C3=B8genes?= <1014990+jakhog@users.noreply.github.com> Date: Thu, 28 Oct 2021 16:13:05 +0200 Subject: [PATCH 2/2] Fix error --- Source/Runtime/Aggregates/AggregateRoots.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Runtime/Aggregates/AggregateRoots.proto b/Source/Runtime/Aggregates/AggregateRoots.proto index 76b42a5..737e0c5 100644 --- a/Source/Runtime/Aggregates/AggregateRoots.proto +++ b/Source/Runtime/Aggregates/AggregateRoots.proto @@ -23,5 +23,5 @@ message AggregateRootAliasRegistrationResponse { } service AggregateRoots { - rpc RegisterAlias(AggregateRootRegistrationRequest) returns(AggregateRootRegistrationResponse); + rpc RegisterAlias(AggregateRootAliasRegistrationRequest) returns(AggregateRootAliasRegistrationResponse); }