Update protos to dapr/dapr master (#96)

Signed-off-by: joshvanl <me@joshvanl.dev>
This commit is contained in:
Josh van Leeuwen 2023-05-31 16:11:05 +01:00 committed by GitHub
parent b69e1f84b0
commit 48e683ea2d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 384 additions and 44 deletions

View File

@ -77,7 +77,7 @@ message InvokeRequest {
HTTPExtension http_extension = 4;
}
// InvokeResponse is the response message inclduing data and its content type
// InvokeResponse is the response message including data and its content type
// from app callback.
// This message is used in InvokeService of Dapr gRPC Service and OnInvoke
// of AppCallback gRPC service.
@ -99,7 +99,7 @@ message StreamPayload {
bytes data = 1;
// Sequence number. This is a counter that starts from 0 and increments by 1 on each chunk sent.
uint32 seq = 2;
uint64 seq = 2;
}
// StateItem represents state key, value, and additional options to save state.

View File

@ -17,6 +17,7 @@ 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";
@ -93,32 +94,80 @@ 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) {}
// UnlockAlpha1 unlocks a lock.
rpc UnlockAlpha1(UnlockRequest)returns (UnlockResponse) {}
// EncryptAlpha1 encrypts a message using the Dapr encryption scheme and a key stored in the vault.
rpc EncryptAlpha1(stream EncryptRequest) returns (stream EncryptResponse);
// DecryptAlpha1 decrypts a message using the Dapr encryption scheme and a key stored in the vault.
rpc DecryptAlpha1(stream DecryptRequest) returns (stream DecryptResponse);
// Gets metadata of the sidecar
rpc GetMetadata (google.protobuf.Empty) returns (GetMetadataResponse) {}
// Sets value in extended metadata of the sidecar
rpc SetMetadata (SetMetadataRequest) returns (google.protobuf.Empty) {}
// Start Workflow
rpc StartWorkflowAlpha1 (StartWorkflowRequest) returns (WorkflowReference) {}
// SubtleGetKeyAlpha1 returns the public part of an asymmetric key stored in the vault.
rpc SubtleGetKeyAlpha1(SubtleGetKeyRequest) returns (SubtleGetKeyResponse);
// Get Workflow details
// SubtleEncryptAlpha1 encrypts a small message using a key stored in the vault.
rpc SubtleEncryptAlpha1(SubtleEncryptRequest) returns (SubtleEncryptResponse);
// SubtleDecryptAlpha1 decrypts a small message using a key stored in the vault.
rpc SubtleDecryptAlpha1(SubtleDecryptRequest) returns (SubtleDecryptResponse);
// SubtleWrapKeyAlpha1 wraps a key using a key stored in the vault.
rpc SubtleWrapKeyAlpha1(SubtleWrapKeyRequest) returns (SubtleWrapKeyResponse);
// SubtleUnwrapKeyAlpha1 unwraps a key using a key stored in the vault.
rpc SubtleUnwrapKeyAlpha1(SubtleUnwrapKeyRequest) returns (SubtleUnwrapKeyResponse);
// SubtleSignAlpha1 signs a message using a key stored in the vault.
rpc SubtleSignAlpha1(SubtleSignRequest) returns (SubtleSignResponse);
// SubtleVerifyAlpha1 verifies the signature of a message using a key stored in the vault.
rpc SubtleVerifyAlpha1(SubtleVerifyRequest) returns (SubtleVerifyResponse);
// Starts a new instance of a workflow
rpc StartWorkflowAlpha1 (StartWorkflowRequest) returns (StartWorkflowResponse) {}
// Gets details about a started workflow instance
rpc GetWorkflowAlpha1 (GetWorkflowRequest) returns (GetWorkflowResponse) {}
// Terminate Workflow
rpc TerminateWorkflowAlpha1 (TerminateWorkflowRequest) returns (TerminateWorkflowResponse) {}
// Purge Workflow
rpc PurgeWorkflowAlpha1 (PurgeWorkflowRequest) returns (google.protobuf.Empty) {}
// Terminates a running workflow instance
rpc TerminateWorkflowAlpha1 (TerminateWorkflowRequest) returns (google.protobuf.Empty) {}
// Pauses a running workflow instance
rpc PauseWorkflowAlpha1 (PauseWorkflowRequest) returns (google.protobuf.Empty) {}
// Resumes a paused workflow instance
rpc ResumeWorkflowAlpha1 (ResumeWorkflowRequest) returns (google.protobuf.Empty) {}
// Raise an event to a running workflow instance
rpc RaiseEventWorkflowAlpha1 (RaiseEventWorkflowRequest) returns (google.protobuf.Empty) {}
// Shutdown the sidecar
rpc Shutdown (google.protobuf.Empty) returns (google.protobuf.Empty) {}
@ -243,7 +292,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;
@ -380,7 +429,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;
@ -399,7 +448,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<string, string> metadata = 2;
@ -507,6 +556,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<string, string> metadata = 4;
}
// InvokeActorRequest is the message to call an actor.
@ -526,10 +580,11 @@ message InvokeActorResponse {
// GetMetadataResponse is a message that is returned on GetMetadata rpc call
message GetMetadataResponse {
string id = 1;
repeated ActiveActorsCount active_actors_count = 2;
repeated RegisteredComponents registered_components = 3;
map<string, string> extended_metadata = 4;
repeated PubsubSubscription subscriptions = 5;
repeated ActiveActorsCount active_actors_count = 2 [json_name = "actors"];
repeated RegisteredComponents registered_components = 3 [json_name = "components"];
map<string, string> extended_metadata = 4 [json_name = "extended"];
repeated PubsubSubscription subscriptions = 5 [json_name = "subscriptions"];
repeated MetadataHTTPEndpoint http_endpoints = 6 [json_name = "httpEndpoints"];
}
message ActiveActorsCount {
@ -544,12 +599,16 @@ message RegisteredComponents {
repeated string capabilities = 4;
}
message MetadataHTTPEndpoint {
string name = 1 [json_name = "name"];
}
message PubsubSubscription {
string pubsub_name = 1;
string topic = 2;
map<string,string> metadata = 3;
PubsubSubscriptionRules rules = 4;
string dead_letter_topic = 5;
string pubsub_name = 1 [json_name = "pubsubname"];
string topic = 2 [json_name = "topic"];
map<string,string> metadata = 3 [json_name = "metadata"];
PubsubSubscriptionRules rules = 4 [json_name = "rules"];
string dead_letter_topic = 5 [json_name = "deadLetterTopic"];
}
message PubsubSubscriptionRules {
@ -624,11 +683,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:
@ -645,24 +704,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 {
@ -676,34 +732,318 @@ message UnlockResponse {
Status status = 1;
}
message WorkflowReference {
string instance_id = 1;
// SubtleGetKeyRequest is the request object for SubtleGetKeyAlpha1.
message SubtleGetKeyRequest {
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;
}
// SubtleGetKeyResponse is the response for SubtleGetKeyAlpha1.
message SubtleGetKeyResponse {
// 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"];
}
// SubtleEncryptRequest is the request for SubtleEncryptAlpha1.
message SubtleEncryptRequest {
// 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"];
}
// SubtleEncryptResponse is the response for SubtleEncryptAlpha1.
message SubtleEncryptResponse {
// Encrypted ciphertext.
bytes ciphertext = 1;
// Authentication tag.
// This is nil when not using an authenticated cipher.
bytes tag = 2;
}
// SubtleDecryptRequest is the request for SubtleDecryptAlpha1.
message SubtleDecryptRequest {
// 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"];
}
// SubtleDecryptResponse is the response for SubtleDecryptAlpha1.
message SubtleDecryptResponse {
// Decrypted plaintext.
bytes plaintext = 1;
}
// SubtleWrapKeyRequest is the request for SubtleWrapKeyAlpha1.
message SubtleWrapKeyRequest {
// 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"];
}
// SubtleWrapKeyResponse is the response for SubtleWrapKeyAlpha1.
message SubtleWrapKeyResponse {
// Wrapped key.
bytes wrapped_key = 1 [json_name="wrappedKey"];
// Authentication tag.
// This is nil when not using an authenticated cipher.
bytes tag = 2;
}
// SubtleUnwrapKeyRequest is the request for SubtleUnwrapKeyAlpha1.
message SubtleUnwrapKeyRequest {
// 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"];
}
// SubtleUnwrapKeyResponse is the response for SubtleUnwrapKeyAlpha1.
message SubtleUnwrapKeyResponse {
// Key in plaintext
bytes plaintext_key = 1 [json_name="plaintextKey"];
}
// SubtleSignRequest is the request for SubtleSignAlpha1.
message SubtleSignRequest {
// 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"];
}
// SubtleSignResponse is the response for SubtleSignAlpha1.
message SubtleSignResponse {
// The signature that was computed
bytes signature = 1;
}
// SubtleVerifyRequest is the request for SubtleVerifyAlpha1.
message SubtleVerifyRequest {
// 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;
}
// SubtleVerifyResponse is the response for SubtleVerifyAlpha1.
message SubtleVerifyResponse {
// True if the signature is valid.
bool valid = 1;
}
// EncryptRequest is the request for EncryptAlpha1.
message EncryptRequest {
// Request details. Must be present in the first message only.
EncryptRequestOptions options = 1;
// Chunk of data of arbitrary size.
common.v1.StreamPayload payload = 2;
}
// EncryptRequestOptions contains options for the first message in the EncryptAlpha1 request.
message EncryptRequestOptions {
// Name of the component. Required.
string component_name = 1 [json_name="componentName"];
// Name (or name/version) of the key. Required.
string key_name = 2 [json_name="keyName"];
// Key wrapping algorithm to use. Required.
// Supported options include: A256KW (alias: AES), A128CBC, A192CBC, A256CBC, RSA-OAEP-256 (alias: RSA).
string key_wrap_algorithm = 3;
// Cipher used to encrypt data (optional): "aes-gcm" (default) or "chacha20-poly1305"
string data_encryption_cipher = 10;
// 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"];
// 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).
// This option is ignored if omit_decryption_key_name is true.
string decryption_key_name = 12 [json_name="decryptionKeyName"];
}
// EncryptResponse is the response for EncryptAlpha1.
message EncryptResponse {
// Chunk of data.
common.v1.StreamPayload payload = 1;
}
// DecryptRequest is the request for DecryptAlpha1.
message DecryptRequest {
// Request details. Must be present in the first message only.
DecryptRequestOptions options = 1;
// Chunk of data of arbitrary size.
common.v1.StreamPayload payload = 2;
}
// DecryptRequestOptions contains options for the first message in the DecryptAlpha1 request.
message DecryptRequestOptions {
// Name of the component
string component_name = 1 [json_name="componentName"];
// Name (or name/version) of the key to decrypt the message.
// Overrides any key reference included in the message if present.
// This is required if the message doesn't include a key reference (i.e. was created with omit_decryption_key_name set to true).
string key_name = 12 [json_name="keyName"];
}
// DecryptResponse is the response for DecryptAlpha1.
message DecryptResponse {
// Chunk of data.
common.v1.StreamPayload payload = 1;
}
// GetWorkflowRequest is the request for GetWorkflowAlpha1.
message GetWorkflowRequest {
string instance_id = 1;
string workflow_type = 2;
string workflow_component = 3;
// ID of the workflow instance to query.
string instance_id = 1 [json_name = "instanceID"];
// Name of the workflow component.
string workflow_component = 2 [json_name = "workflowComponent"];
}
// GetWorkflowResponse is the response for GetWorkflowAlpha1.
message GetWorkflowResponse {
string instance_id = 1;
int64 start_time = 2;
map<string, string> metadata = 3;
// ID of the workflow instance.
string instance_id = 1 [json_name = "instanceID"];
// Name of the workflow.
string workflow_name = 2 [json_name = "workflowName"];
// The time at which the workflow instance was created.
google.protobuf.Timestamp created_at = 3 [json_name = "createdAt"];
// The last time at which the workflow instance had its state changed.
google.protobuf.Timestamp last_updated_at = 4 [json_name = "lastUpdatedAt"];
// The current status of the workflow instance, for example, "PENDING", "RUNNING", "SUSPENDED", "COMPLETED", "FAILED", and "TERMINATED".
string runtime_status = 5 [json_name = "runtimeStatus"];
// Additional component-specific properties of the workflow instance.
map<string, string> properties = 6;
}
// StartWorkflowRequest is the request for StartWorkflowAlpha1.
message StartWorkflowRequest {
string instance_id = 1;
string workflow_component = 2;
string workflow_name = 3;
// The ID to assign to the started workflow instance. If empty, a random ID is generated.
string instance_id = 1 [json_name = "instanceID"];
// Name of the workflow component.
string workflow_component = 2 [json_name = "workflowComponent"];
// Name of the workflow.
string workflow_name = 3 [json_name = "workflowName"];
// Additional component-specific options for starting the workflow instance.
map<string, string> options = 4;
// Input data for the workflow instance.
bytes input = 5;
}
message TerminateWorkflowRequest {
string instance_id = 1;
string workflow_component = 2;
// StartWorkflowResponse is the response for StartWorkflowAlpha1.
message StartWorkflowResponse {
// ID of the started workflow instance.
string instance_id = 1 [json_name = "instanceID"];
}
message TerminateWorkflowResponse {
// TerminateWorkflowRequest is the request for TerminateWorkflowAlpha1.
message TerminateWorkflowRequest {
// ID of the workflow instance to terminate.
string instance_id = 1 [json_name = "instanceID"];
// Name of the workflow component.
string workflow_component = 2 [json_name = "workflowComponent"];
}
// PauseWorkflowRequest is the request for PauseWorkflowAlpha1.
message PauseWorkflowRequest {
// ID of the workflow instance to pause.
string instance_id = 1 [json_name = "instanceID"];
// Name of the workflow component.
string workflow_component = 2 [json_name = "workflowComponent"];
}
// ResumeWorkflowRequest is the request for ResumeWorkflowAlpha1.
message ResumeWorkflowRequest {
// ID of the workflow instance to resume.
string instance_id = 1 [json_name = "instanceID"];
// Name of the workflow component.
string workflow_component = 2 [json_name = "workflowComponent"];
}
// RaiseEventWorkflowRequest is the request for RaiseEventWorkflowAlpha1.
message RaiseEventWorkflowRequest {
// ID of the workflow instance to raise an event for.
string instance_id = 1 [json_name = "instanceID"];
// Name of the workflow component.
string workflow_component = 2 [json_name = "workflowComponent"];
// Name of the event.
string event_name = 3 [json_name = "eventName"];
// Data associated with the event.
bytes event_data = 4;
}
// PurgeWorkflowRequest is the request for PurgeWorkflowAlpha1.
message PurgeWorkflowRequest {
// ID of the workflow instance to purge.
string instance_id = 1 [json_name = "instanceID"];
// Name of the workflow component.
string workflow_component = 2 [json_name = "workflowComponent"];
}