diff --git a/.github/workflows/itests.yml b/.github/workflows/itests.yml index b241562bf..bd10c3e87 100644 --- a/.github/workflows/itests.yml +++ b/.github/workflows/itests.yml @@ -41,7 +41,7 @@ jobs: install-version: '7.0.x' env: NUPKG_OUTDIR: bin/Release/nugets - GOVER: 1.19 + GOVER: 1.20.3 GOOS: linux GOARCH: amd64 GOPROXY: https://proxy.golang.org @@ -49,15 +49,10 @@ jobs: DAPR_RUNTIME_VER: 1.9.5 DAPR_INSTALL_URL: https://raw.githubusercontent.com/dapr/cli/3dacfb672d55f1436c249057aaebbe597e1066f3/install/install.sh DAPR_CLI_REF: '' - DAPR_REF: '82e097134cdc7494c5c3be71bf80f7904d6db9ea' + DAPR_REF: 'dbeea96710d38d08dcc5aaf6807914a7d697bed4' steps: - name: Set up Dapr CLI run: wget -q ${{ env.DAPR_INSTALL_URL }} -O - | /bin/bash -s ${{ env.DAPR_CLI_VER }} - - name: Set up Go ${{ env.GOVER }} - if: env.DAPR_REF != '' || env.DAPR_CLI_REF != '' - uses: actions/setup-go@v2 - with: - go-version: ${{ env.GOVER }} - name: Checkout Dapr CLI repo to override dapr command. uses: actions/checkout@v2 if: env.DAPR_CLI_REF != '' @@ -72,6 +67,16 @@ jobs: repository: dapr/dapr ref: ${{ env.DAPR_REF }} path: dapr + - name: Set up Go from dapr/go.mod + if: env.DAPR_REF != '' + uses: actions/setup-go@v3 + with: + go-version-file: "dapr/go.mod" + - name: Set up Go from cli/go.mod + if: env.DAPR_REF == '' && env.DAPR_CLI_REF != '' + uses: actions/setup-go@v3 + with: + go-version-file: "cli/go.mod" - name: Build and override dapr cli with referenced commit. if: env.DAPR_CLI_REF != '' run: | diff --git a/src/Dapr.Client/DaprClientGrpc.cs b/src/Dapr.Client/DaprClientGrpc.cs index b5b0774a8..8c1afec94 100644 --- a/src/Dapr.Client/DaprClientGrpc.cs +++ b/src/Dapr.Client/DaprClientGrpc.cs @@ -1317,7 +1317,7 @@ public async override Task GetConfiguration( Autogenerated.GetConfigurationResponse response = new Autogenerated.GetConfigurationResponse(); try { - response = await client.GetConfigurationAlpha1Async(request, options); + response = await client.GetConfigurationAsync(request, options); } catch (RpcException ex) { @@ -1358,7 +1358,7 @@ public override Task SubscribeConfiguration( } var options = CreateCallOptions(headers: null, cancellationToken: cancellationToken); - return Task.FromResult(new SubscribeConfigurationResponse(new DaprSubscribeConfigurationSource(client.SubscribeConfigurationAlpha1(request, options)))); + return Task.FromResult(new SubscribeConfigurationResponse(new DaprSubscribeConfigurationSource(client.SubscribeConfiguration(request, options)))); } [Obsolete] @@ -1377,7 +1377,7 @@ public override async Task UnsubscribeConfigur }; var options = CreateCallOptions(headers: null, cancellationToken); - var resp = await client.UnsubscribeConfigurationAlpha1Async(request, options); + var resp = await client.UnsubscribeConfigurationAsync(request, options); return new UnsubscribeConfigurationResponse(resp.Ok, resp.Message); } #endregion @@ -1526,7 +1526,7 @@ public async override Task GetWorkflowAsync( { InstanceId = instanceId, WorkflowComponent = workflowComponent, - WorkflowType = workflowName //TODO: Change 'WorkflowType' to 'WorkflowName' once changes go through dapr/dapr + WorkflowName = workflowName }; try @@ -1554,7 +1554,7 @@ public async override Task TerminateWorkflowAsync( ArgumentVerifier.ThrowIfNullOrEmpty(instanceId, nameof(instanceId)); ArgumentVerifier.ThrowIfNullOrEmpty(workflowComponent, nameof(workflowComponent)); - var request = new Autogenerated.TerminateWorkflowRequest() + var request = new Autogenerated.WorkflowActivityRequest() { InstanceId = instanceId, WorkflowComponent = workflowComponent diff --git a/src/Dapr.Client/Protos/dapr/proto/common/v1/common.proto b/src/Dapr.Client/Protos/dapr/proto/common/v1/common.proto index 3f50d88bd..3faea3016 100644 --- a/src/Dapr.Client/Protos/dapr/proto/common/v1/common.proto +++ b/src/Dapr.Client/Protos/dapr/proto/common/v1/common.proto @@ -60,7 +60,7 @@ message InvokeRequest { // Required. method is a method name which will be invoked by caller. string method = 1; - // Required. Bytes value or Protobuf message which caller sent. + // Required in unary RPCs. Bytes value or Protobuf message which caller sent. // Dapr treats Any.value as bytes type if Any.type_url is unset. google.protobuf.Any data = 2; @@ -82,13 +82,26 @@ message InvokeRequest { // This message is used in InvokeService of Dapr gRPC Service and OnInvoke // of AppCallback gRPC service. message InvokeResponse { - // Required. The content body of InvokeService response. + // Required in unary RPCs. The content body of InvokeService response. google.protobuf.Any data = 1; // Required. The type of data content. string content_type = 2; } +// Chunk of data sent in a streaming request or response. +// This is used in requests including InternalInvokeRequestStream. +message StreamPayload { + // Data sent in the chunk. + // The amount of data included in each chunk is up to the discretion of the sender, and can be empty. + // Additionally, the amount of data doesn't need to be fixed and subsequent messages can send more, or less, data. + // Receivers must not make assumptions about the number of bytes they'll receive in each chunk. + bytes data = 1; + + // Sequence number. This is a counter that starts from 0 and increments by 1 on each chunk sent. + uint64 seq = 2; +} + // StateItem represents state key, value, and additional options to save state. message StateItem { // Required. The state key @@ -134,60 +147,6 @@ message StateOptions { StateConsistency consistency = 2; } -// TopicSubscription represents topic and metadata. -message TopicSubscription { - // Required. The name of the pubsub containing the topic below to subscribe to. - string pubsub_name = 1; - - // Required. The name of topic which will be subscribed - string topic = 2; - - // The optional properties used for this topic's subscription e.g. session id - map metadata = 3; - - // The optional routing rules to match against. In the gRPC interface, OnTopicEvent - // is still invoked but the matching path is sent in the TopicEventRequest. - TopicRoutes routes = 5; - - // The optional dead letter queue for this topic to send events to. - string dead_letter_topic = 6; - - // The optional bulk subscribe settings for this topic. - BulkSubscribeConfig bulk_subscribe = 7; -} - -message TopicRoutes { - // The list of rules for this topic. - repeated TopicRule rules = 1; - - // The default path for this topic. - string default = 2; -} - -// BulkSubscribeConfig is the message to pass settings for bulk subscribe -message BulkSubscribeConfig { - // Required. Flag to enable/disable bulk subscribe - bool enabled = 1; - - // Optional. Max number of messages to be sent in a single bulk request - int32 max_messages_count = 2; - - // Optional. Max duration to wait for messages to be sent in a single bulk request - int32 max_await_duration_ms = 3; -} - -message TopicRule { - // The optional CEL expression used to match the event. - // 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. - // This value is passed in TopicEventRequest and used by OnTopicEvent to "switch" - // inside the handler. - string path = 2; -} - // ConfigurationItem represents all the configuration with its name(key). message ConfigurationItem { // Required. The value of configuration item. diff --git a/src/Dapr.Client/Protos/dapr/proto/dapr/v1/appcallback.proto b/src/Dapr.Client/Protos/dapr/proto/dapr/v1/appcallback.proto index 6c26ad2bf..823c0aae4 100644 --- a/src/Dapr.Client/Protos/dapr/proto/dapr/v1/appcallback.proto +++ b/src/Dapr.Client/Protos/dapr/proto/dapr/v1/appcallback.proto @@ -17,6 +17,7 @@ package dapr.proto.runtime.v1; import "google/protobuf/empty.proto"; import "dapr/proto/common/v1/common.proto"; +import "google/protobuf/struct.proto"; option csharp_namespace = "Dapr.AppCallback.Autogen.Grpc.v1"; option java_outer_classname = "DaprAppCallbackProtos"; @@ -53,6 +54,13 @@ service AppCallbackHealthCheck { rpc HealthCheck(google.protobuf.Empty) returns (HealthCheckResponse) {} } +// AppCallbackAlpha V1 is an optional extension to AppCallback V1 to opt +// for Alpha RPCs. +service AppCallbackAlpha { + // Subscribes bulk events from Pubsub + rpc OnBulkTopicEventAlpha1(TopicEventBulkRequest) returns (TopicEventBulkResponse) {} +} + // TopicEventRequest message is compatible with CloudEvent spec v1.0 // https://github.com/cloudevents/spec/blob/v1.0/spec.md message TopicEventRequest { @@ -89,6 +97,9 @@ message TopicEventRequest { // The matching path from TopicSubscription/routes (if specified) for this event. // This value is used by OnTopicEvent to "switch" inside the handler. string path = 9; + + // The map of additional custom properties to be sent to the app. These are considered to be cloud event extensions. + google.protobuf.Struct extensions = 10; } // TopicEventResponse is response from app on published message @@ -107,6 +118,90 @@ message TopicEventResponse { TopicEventResponseStatus status = 1; } +// TopicEventCERequest message is compatible with CloudEvent spec v1.0 +message TopicEventCERequest { + // The unique identifier of this cloud event. + string id = 1; + + // source identifies the context in which an event happened. + string source = 2; + + // The type of event related to the originating occurrence. + string type = 3; + + // The version of the CloudEvents specification. + string spec_version = 4; + + // The content type of data value. + string data_content_type = 5; + + // The content of the event. + bytes data = 6; + + // Custom attributes which includes cloud event extensions. + google.protobuf.Struct extensions = 7; +} + +// TopicEventBulkRequestEntry represents a single message inside a bulk request +message TopicEventBulkRequestEntry { + // Unique identifier for the message. + string entry_id = 1; + + // The content of the event. + oneof event { + bytes bytes = 2; + TopicEventCERequest cloud_event = 3; + } + + // content type of the event contained. + string content_type = 4; + + // The metadata associated with the event. + map metadata = 5; +} + +// TopicEventBulkRequest represents request for bulk message +message TopicEventBulkRequest { + // Unique identifier for the bulk request. + string id = 1; + + // The list of items inside this bulk request. + repeated TopicEventBulkRequestEntry entries = 2; + + // The metadata associated with the this bulk request. + map metadata = 3; + + // 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; + + // The matching path from TopicSubscription/routes (if specified) for this event. + // This value is used by OnTopicEvent to "switch" inside the handler. + string path = 7; +} + +// TopicEventBulkResponseEntry Represents single response, as part of TopicEventBulkResponse, to be +// sent by subscibed App for the corresponding single message during bulk subscribe +message TopicEventBulkResponseEntry { + // Unique identifier associated the message. + string entry_id = 1; + + // The status of the response. + TopicEventResponse.TopicEventResponseStatus status = 2; +} + +// AppBulkResponse is response from app on published message +message TopicEventBulkResponse { + + // The list of all responses for the bulk request. + repeated TopicEventBulkResponseEntry statuses = 1; +} + // BindingEventRequest represents input bindings event. message BindingEventRequest { // Required. The name of the input binding component. @@ -150,7 +245,61 @@ message BindingEventResponse { // ListTopicSubscriptionsResponse is the message including the list of the subscribing topics. message ListTopicSubscriptionsResponse { // The list of topics. - repeated common.v1.TopicSubscription subscriptions = 1; + repeated TopicSubscription subscriptions = 1; +} + +// TopicSubscription represents topic and metadata. +message TopicSubscription { + // Required. The name of the pubsub containing the topic below to subscribe to. + string pubsub_name = 1; + + // Required. The name of topic which will be subscribed + string topic = 2; + + // The optional properties used for this topic's subscription e.g. session id + map metadata = 3; + + // The optional routing rules to match against. In the gRPC interface, OnTopicEvent + // is still invoked but the matching path is sent in the TopicEventRequest. + TopicRoutes routes = 5; + + // The optional dead letter queue for this topic to send events to. + string dead_letter_topic = 6; + + // The optional bulk subscribe settings for this topic. + BulkSubscribeConfig bulk_subscribe = 7; +} + +message TopicRoutes { + // The list of rules for this topic. + repeated TopicRule rules = 1; + + // The default path for this topic. + string default = 2; +} + +message TopicRule { + // The optional CEL expression used to match the event. + // 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. + // This value is passed in TopicEventRequest and used by OnTopicEvent to "switch" + // inside the handler. + string path = 2; +} + +// BulkSubscribeConfig is the message to pass settings for bulk subscribe +message BulkSubscribeConfig { + // Required. Flag to enable/disable bulk subscribe + bool enabled = 1; + + // Optional. Max number of messages to be sent in a single bulk request + int32 max_messages_count = 2; + + // Optional. Max duration to wait for messages to be sent in a single bulk request + int32 max_await_duration_ms = 3; } // ListInputBindingsResponse is the message including the list of input bindings. diff --git a/src/Dapr.Client/Protos/dapr/proto/dapr/v1/dapr.proto b/src/Dapr.Client/Protos/dapr/proto/dapr/v1/dapr.proto index 52cbfe6f8..9b9eec8c6 100644 --- a/src/Dapr.Client/Protos/dapr/proto/dapr/v1/dapr.proto +++ b/src/Dapr.Client/Protos/dapr/proto/dapr/v1/dapr.proto @@ -17,7 +17,6 @@ package dapr.proto.runtime.v1; import "google/protobuf/any.proto"; import "google/protobuf/empty.proto"; -import "google/protobuf/timestamp.proto"; import "dapr/proto/common/v1/common.proto"; option csharp_namespace = "Dapr.Client.Autogen.Grpc.v1"; @@ -28,6 +27,7 @@ option go_package = "github.com/dapr/dapr/pkg/proto/runtime/v1;runtime"; // Dapr service provides APIs to user application to access Dapr building blocks. service Dapr { // Invokes a method on a remote Dapr app. + // Deprecated: Use proxy mode service invocation instead. rpc InvokeService(InvokeServiceRequest) returns (common.v1.InvokeResponse) {} // Gets the state for a specific key. @@ -93,12 +93,21 @@ service Dapr { // GetConfiguration gets configuration from configuration store. rpc GetConfigurationAlpha1(GetConfigurationRequest) returns (GetConfigurationResponse) {} + // GetConfiguration gets configuration from configuration store. + rpc GetConfiguration(GetConfigurationRequest) returns (GetConfigurationResponse) {} + // SubscribeConfiguration gets configuration from configuration store and subscribe the updates event by grpc stream rpc SubscribeConfigurationAlpha1(SubscribeConfigurationRequest) returns (stream SubscribeConfigurationResponse) {} + // SubscribeConfiguration gets configuration from configuration store and subscribe the updates event by grpc stream + rpc SubscribeConfiguration(SubscribeConfigurationRequest) returns (stream SubscribeConfigurationResponse) {} + // UnSubscribeConfiguration unsubscribe the subscription of configuration rpc UnsubscribeConfigurationAlpha1(UnsubscribeConfigurationRequest) returns (UnsubscribeConfigurationResponse) {} + // UnSubscribeConfiguration unsubscribe the subscription of configuration + rpc UnsubscribeConfiguration(UnsubscribeConfigurationRequest) returns (UnsubscribeConfigurationResponse) {} + // TryLockAlpha1 tries to get a lock with an expiry. rpc TryLockAlpha1(TryLockRequest)returns (TryLockResponse) {} @@ -111,6 +120,27 @@ service Dapr { // Sets value in extended metadata of the sidecar rpc SetMetadata (SetMetadataRequest) returns (google.protobuf.Empty) {} + // SubtleGetKeyAlpha1 returns the public part of an asymmetric key stored in the vault. + rpc SubtleGetKeyAlpha1(SubtleGetKeyAlpha1Request) returns (SubtleGetKeyAlpha1Response); + + // SubtleEncryptAlpha1 encrypts a small message using a key stored in the vault. + rpc SubtleEncryptAlpha1(SubtleEncryptAlpha1Request) returns (SubtleEncryptAlpha1Response); + + // SubtleDecryptAlpha1 decrypts a small message using a key stored in the vault. + rpc SubtleDecryptAlpha1(SubtleDecryptAlpha1Request) returns (SubtleDecryptAlpha1Response); + + // SubtleWrapKeyAlpha1 wraps a key using a key stored in the vault. + rpc SubtleWrapKeyAlpha1(SubtleWrapKeyAlpha1Request) returns (SubtleWrapKeyAlpha1Response); + + // SubtleUnwrapKeyAlpha1 unwraps a key using a key stored in the vault. + rpc SubtleUnwrapKeyAlpha1(SubtleUnwrapKeyAlpha1Request) returns (SubtleUnwrapKeyAlpha1Response); + + // SubtleSignAlpha1 signs a message using a key stored in the vault. + rpc SubtleSignAlpha1(SubtleSignAlpha1Request) returns (SubtleSignAlpha1Response); + + // SubtleVerifyAlpha1 verifies the signature of a message using a key stored in the vault. + rpc SubtleVerifyAlpha1(SubtleVerifyAlpha1Request) returns (SubtleVerifyAlpha1Response); + // Start Workflow rpc StartWorkflowAlpha1 (StartWorkflowRequest) returns (WorkflowReference) {} @@ -118,7 +148,16 @@ service Dapr { rpc GetWorkflowAlpha1 (GetWorkflowRequest) returns (GetWorkflowResponse) {} // Terminate Workflow - rpc TerminateWorkflowAlpha1 (TerminateWorkflowRequest) returns (TerminateWorkflowResponse) {} + rpc TerminateWorkflowAlpha1 (WorkflowActivityRequest) returns (WorkflowActivityResponse) {} + + // Pause Workflow + rpc PauseWorkflowAlpha1 (WorkflowActivityRequest) returns (WorkflowActivityResponse) {} + + // Resume Workflow + rpc ResumeWorkflowAlpha1 (WorkflowActivityRequest) returns (WorkflowActivityResponse) {} + + // Raise Event for a Workflow + rpc RaiseEventWorkflowAlpha1 (RaiseEventWorkflowRequest) returns (RaiseEventWorkflowResponse) {} // Shutdown the sidecar rpc Shutdown (google.protobuf.Empty) returns (google.protobuf.Empty) {} @@ -243,7 +282,7 @@ message SaveStateRequest { // QueryStateRequest is the message to query state store. message QueryStateRequest { // The name of state store. - string store_name = 1; + string store_name = 1 [json_name = "storeName"]; // The query in JSON format. string query = 2; @@ -320,7 +359,7 @@ message BulkPublishRequestEntry { // The request scoped unique ID referring to this message. Used to map status in response string entry_id = 1; - // The event which will be published to the topic + // The event which will be pulished to the topic bytes event = 2; // The content type for the event @@ -336,7 +375,7 @@ message BulkPublishResponse { repeated BulkPublishResponseFailedEntry failedEntries = 1; } -// BulkPublishResponseEntry is the message mapping response status for each event in the BulkPublishEvent call +// BulkPublishResponseFailedEntry is the message containing the entryID and error of a failed event in BulkPublishEvent call message BulkPublishResponseFailedEntry { // The response scoped unique ID referring to this message @@ -346,6 +385,7 @@ message BulkPublishResponseFailedEntry { string error = 2; } + // InvokeBindingRequest is the message to send data to output bindings message InvokeBindingRequest { // The name of the output binding to invoke. @@ -379,7 +419,7 @@ message InvokeBindingResponse { // GetSecretRequest is the message to get secret from secret store. message GetSecretRequest { // The name of secret store. - string store_name = 1; + string store_name = 1 [json_name = "storeName"]; // The name of secret key. string key = 2; @@ -398,7 +438,7 @@ message GetSecretResponse { // GetBulkSecretRequest is the message to get the secrets from secret store. message GetBulkSecretRequest { // The name of secret store. - string store_name = 1; + string store_name = 1 [json_name = "storeName"]; // The metadata which will be sent to secret store components. map metadata = 2; @@ -506,6 +546,11 @@ message TransactionalActorStateOperation { string operationType = 1; string key = 2; google.protobuf.Any value = 3; + // The metadata used for transactional operations. + // + // Common metadata property: + // - ttlInSeconds : the time to live in seconds for the stored value. + map metadata = 4; } // InvokeActorRequest is the message to call an actor. @@ -623,11 +668,11 @@ message UnsubscribeConfigurationResponse { message TryLockRequest { // Required. The lock store name,e.g. `redis`. - string store_name = 1; + string store_name = 1 [json_name = "storeName"]; // Required. resource_id is the lock key. e.g. `order_id_111` // It stands for "which resource I want to protect" - string resource_id = 2; + string resource_id = 2 [json_name = "resourceId"]; // Required. lock_owner indicate the identifier of lock owner. // You can generate a uuid as lock_owner.For example,in golang: @@ -644,24 +689,21 @@ message TryLockRequest { // 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. - string lock_owner = 3; + string lock_owner = 3 [json_name = "lockOwner"]; // Required. The time before expiry.The time unit is second. - int32 expiryInSeconds = 4; + int32 expiry_in_seconds = 4 [json_name = "expiryInSeconds"]; } - message TryLockResponse { - bool success = 1; } message UnlockRequest { - string store_name = 1; + string store_name = 1 [json_name = "storeName"]; // resource_id is the lock key. - string resource_id = 2; - - string lock_owner = 3; + string resource_id = 2 [json_name = "resourceId"]; + string lock_owner = 3 [json_name = "lockOwner"]; } message UnlockResponse { @@ -675,14 +717,182 @@ message UnlockResponse { Status status = 1; } +// SubtleGetKeyAlpha1Request is the request object for SubtleGetKeyAlpha1. +message SubtleGetKeyAlpha1Request { + enum KeyFormat { + // PEM (PKIX) (default) + PEM = 0; + // 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 + string name = 2; + // Response format + KeyFormat format = 3; +} + +// SubtleGetKeyAlpha1Response is the response for SubtleGetKeyAlpha1. +message SubtleGetKeyAlpha1Response { + // Name (or name/version) of the key. + // This is returned as response too in case there is a version. + string name = 1; + // Public key, encoded in the requested format + string public_key = 2 [json_name="publicKey"]; +} + +// SubtleEncryptAlpha1Request is the request for SubtleEncryptAlpha1. +message SubtleEncryptAlpha1Request { + // Name of the component + string component_name = 1 [json_name="componentName"]; + // Message to encrypt. + bytes plaintext = 2; + // Algorithm to use, as in the JWA standard. + string algorithm = 3; + // Name (or name/version) of the key. + string key_name = 4 [json_name="keyName"]; + // Nonce / initialization vector. + // Ignored with asymmetric ciphers. + bytes nonce = 5; + // Associated Data when using AEAD ciphers (optional). + bytes associated_data = 6 [json_name="associatedData"]; +} + +// SubtleEncryptAlpha1Response is the response for SubtleEncryptAlpha1. +message SubtleEncryptAlpha1Response { + // Encrypted ciphertext. + bytes ciphertext = 1; + // Authentication tag. + // This is nil when not using an authenticated cipher. + bytes tag = 2; +} + +// SubtleDecryptAlpha1Request is the request for SubtleDecryptAlpha1. +message SubtleDecryptAlpha1Request { + // Name of the component + string component_name = 1 [json_name="componentName"]; + // Message to decrypt. + bytes ciphertext = 2; + // Algorithm to use, as in the JWA standard. + string algorithm = 3; + // Name (or name/version) of the key. + string key_name = 4 [json_name="keyName"]; + // Nonce / initialization vector. + // Ignored with asymmetric ciphers. + bytes nonce = 5; + // Authentication tag. + // This is nil when not using an authenticated cipher. + bytes tag = 6; + // Associated Data when using AEAD ciphers (optional). + bytes associated_data = 7 [json_name="associatedData"]; +} + +// SubtleDecryptAlpha1Response is the response for SubtleDecryptAlpha1. +message SubtleDecryptAlpha1Response { + // Decrypted plaintext. + bytes plaintext = 1; +} + +// SubtleWrapKeyAlpha1Request is the request for SubtleWrapKeyAlpha1. +message SubtleWrapKeyAlpha1Request { + // Name of the component + string component_name = 1 [json_name="componentName"]; + // Key to wrap + bytes plaintext_key = 2 [json_name="plaintextKey"]; + // Algorithm to use, as in the JWA standard. + string algorithm = 3; + // Name (or name/version) of the key. + string key_name = 4 [json_name="keyName"]; + // Nonce / initialization vector. + // Ignored with asymmetric ciphers. + bytes nonce = 5; + // Associated Data when using AEAD ciphers (optional). + bytes associated_data = 6 [json_name="associatedData"]; +} + +// SubtleWrapKeyAlpha1Response is the response for SubtleWrapKeyAlpha1. +message SubtleWrapKeyAlpha1Response { + // Wrapped key. + bytes wrapped_key = 1 [json_name="wrappedKey"]; + // Authentication tag. + // This is nil when not using an authenticated cipher. + bytes tag = 2; +} + +// SubtleUnwrapKeyAlpha1Request is the request for SubtleUnwrapKeyAlpha1. +message SubtleUnwrapKeyAlpha1Request { + // Name of the component + string component_name = 1 [json_name="componentName"]; + // Wrapped key. + bytes wrapped_key = 2 [json_name="wrappedKey"]; + // Algorithm to use, as in the JWA standard. + string algorithm = 3; + // Name (or name/version) of the key. + string key_name = 4 [json_name="keyName"]; + // Nonce / initialization vector. + // Ignored with asymmetric ciphers. + bytes nonce = 5; + // Authentication tag. + // This is nil when not using an authenticated cipher. + bytes tag = 6; + // Associated Data when using AEAD ciphers (optional). + bytes associated_data = 7 [json_name="associatedData"]; +} + +// SubtleUnwrapKeyAlpha1Response is the response for SubtleUnwrapKeyAlpha1. +message SubtleUnwrapKeyAlpha1Response { + // Key in plaintext + bytes plaintext_key = 1 [json_name="plaintextKey"]; +} + +// SubtleSignAlpha1Request is the request for SubtleSignAlpha1. +message SubtleSignAlpha1Request { + // Name of the component + string component_name = 1 [json_name="componentName"]; + // Digest to sign. + bytes digest = 2; + // Algorithm to use, as in the JWA standard. + string algorithm = 3; + // Name (or name/version) of the key. + string key_name = 4 [json_name="keyName"]; +} + +// SubtleSignAlpha1Response is the response for SubtleSignAlpha1. +message SubtleSignAlpha1Response { + // The signature that was computed + bytes signature = 1; +} + +// SubtleVerifyAlpha1Request is the request for SubtleVerifyAlpha1. +message SubtleVerifyAlpha1Request { + // Name of the component + string component_name = 1 [json_name="componentName"]; + // Digest of the message. + bytes digest = 2; + // Algorithm to use, as in the JWA standard. + string algorithm = 3; + // Name (or name/version) of the key. + string key_name = 4 [json_name="keyName"]; + // Signature to verify. + bytes signature = 5; +} + +// SubtleVerifyAlpha1Response is the response for SubtleVerifyAlpha1. +message SubtleVerifyAlpha1Response { + // True if the signature is valid. + bool valid = 1; +} + message WorkflowReference { - string instance_id = 1; + string instance_id = 1 [json_name = "instanceId"]; } message GetWorkflowRequest { - string instance_id = 1; - string workflow_type = 2; - string workflow_component = 3; + string instance_id = 1 [json_name = "instanceId"]; + string workflow_component = 2 [json_name = "workflowComponent"]; + string workflow_name = 3 [json_name = "workflowName"]; } message GetWorkflowResponse { @@ -692,17 +902,29 @@ message GetWorkflowResponse { } message StartWorkflowRequest { - string instance_id = 1; - string workflow_component = 2; - string workflow_name = 3; + string instance_id = 1 [json_name = "instanceId"]; + string workflow_component = 2 [json_name = "workflowComponent"]; + string workflow_name = 3 [json_name = "workflowName"]; map options = 4; bytes input = 5; } -message TerminateWorkflowRequest { - string instance_id = 1; - string workflow_component = 2; +message WorkflowActivityRequest { + string instance_id = 1 [json_name = "instanceId"]; + string workflow_component = 2 [json_name = "workflowComponent"]; +} + +message WorkflowActivityResponse { + // Empty +} + +message RaiseEventWorkflowRequest { + string instance_id = 1 [json_name = "instanceId"]; + string workflow_component = 2 [json_name = "workflowComponent"]; + string event_name = 3 [json_name = "eventName"]; + bytes input = 4; } -message TerminateWorkflowResponse { +message RaiseEventWorkflowResponse { + // Empty } diff --git a/test/Dapr.Client.Test/ConfigurationSourceTest.cs b/test/Dapr.Client.Test/ConfigurationSourceTest.cs index 223570fc2..af5d05a45 100644 --- a/test/Dapr.Client.Test/ConfigurationSourceTest.cs +++ b/test/Dapr.Client.Test/ConfigurationSourceTest.cs @@ -47,7 +47,7 @@ public async Task TestStreamingConfigurationSourceCanBeRead() var internalClient = Mock.Of(); var responseStream = new TestAsyncStreamReader(responses, TimeSpan.FromMilliseconds(100)); var response = new AsyncServerStreamingCall(responseStream, null, null, null, async () => await Task.Delay(TimeSpan.FromMilliseconds(1))); - Mock.Get(internalClient).Setup(client => client.SubscribeConfigurationAlpha1(streamRequest, callOptions)) + Mock.Get(internalClient).Setup(client => client.SubscribeConfiguration(streamRequest, callOptions)) .Returns(response); // Try and actually use the source.