forked from dapr/rust-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdapr.proto
1090 lines (885 loc) · 37.5 KB
/
dapr.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
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.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
syntax = "proto3";
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";
option java_outer_classname = "DaprProtos";
option java_package = "io.dapr.v1";
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.
rpc GetState(GetStateRequest) returns (GetStateResponse) {}
// Gets a bulk of state items for a list of keys
rpc GetBulkState(GetBulkStateRequest) returns (GetBulkStateResponse) {}
// Saves the state for a specific key.
rpc SaveState(SaveStateRequest) returns (google.protobuf.Empty) {}
// Queries the state.
rpc QueryStateAlpha1(QueryStateRequest) returns (QueryStateResponse) {}
// Deletes the state for a specific key.
rpc DeleteState(DeleteStateRequest) returns (google.protobuf.Empty) {}
// Deletes a bulk of state items for a list of keys
rpc DeleteBulkState(DeleteBulkStateRequest) returns (google.protobuf.Empty) {}
// Executes transactions for a specified store
rpc ExecuteStateTransaction(ExecuteStateTransactionRequest) returns (google.protobuf.Empty) {}
// Publishes events to the specific topic.
rpc PublishEvent(PublishEventRequest) returns (google.protobuf.Empty) {}
// Bulk Publishes multiple events to the specified topic.
rpc BulkPublishEventAlpha1(BulkPublishRequest) returns (BulkPublishResponse) {}
// Invokes binding data to specific output bindings
rpc InvokeBinding(InvokeBindingRequest) returns (InvokeBindingResponse) {}
// Gets secrets from secret stores.
rpc GetSecret(GetSecretRequest) returns (GetSecretResponse) {}
// Gets a bulk of secrets
rpc GetBulkSecret(GetBulkSecretRequest) returns (GetBulkSecretResponse) {}
// Register an actor timer.
rpc RegisterActorTimer(RegisterActorTimerRequest) returns (google.protobuf.Empty) {}
// Unregister an actor timer.
rpc UnregisterActorTimer(UnregisterActorTimerRequest) returns (google.protobuf.Empty) {}
// Register an actor reminder.
rpc RegisterActorReminder(RegisterActorReminderRequest) returns (google.protobuf.Empty) {}
// Unregister an actor reminder.
rpc UnregisterActorReminder(UnregisterActorReminderRequest) returns (google.protobuf.Empty) {}
// Rename an actor reminder.
rpc RenameActorReminder(RenameActorReminderRequest) returns (google.protobuf.Empty) {}
// Gets the state for a specific actor.
rpc GetActorState(GetActorStateRequest) returns (GetActorStateResponse) {}
// Executes state transactions for a specified actor
rpc ExecuteActorStateTransaction(ExecuteActorStateTransactionRequest) returns (google.protobuf.Empty) {}
// InvokeActor calls a method on an actor.
rpc InvokeActor (InvokeActorRequest) returns (InvokeActorResponse) {}
// 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) {}
// SubtleGetKeyAlpha1 returns the public part of an asymmetric key stored in the vault.
rpc SubtleGetKeyAlpha1(SubtleGetKeyRequest) returns (SubtleGetKeyResponse);
// 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) {}
// 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) {}
// Starts a new instance of a workflow
rpc StartWorkflowBeta1 (StartWorkflowRequest) returns (StartWorkflowResponse) {}
// Gets details about a started workflow instance
rpc GetWorkflowBeta1 (GetWorkflowRequest) returns (GetWorkflowResponse) {}
// Purge Workflow
rpc PurgeWorkflowBeta1 (PurgeWorkflowRequest) returns (google.protobuf.Empty) {}
// Terminates a running workflow instance
rpc TerminateWorkflowBeta1 (TerminateWorkflowRequest) returns (google.protobuf.Empty) {}
// Pauses a running workflow instance
rpc PauseWorkflowBeta1 (PauseWorkflowRequest) returns (google.protobuf.Empty) {}
// Resumes a paused workflow instance
rpc ResumeWorkflowBeta1 (ResumeWorkflowRequest) returns (google.protobuf.Empty) {}
// Raise an event to a running workflow instance
rpc RaiseEventWorkflowBeta1 (RaiseEventWorkflowRequest) returns (google.protobuf.Empty) {}
// Shutdown the sidecar
rpc Shutdown (google.protobuf.Empty) returns (google.protobuf.Empty) {}
}
// InvokeServiceRequest represents the request message for Service invocation.
message InvokeServiceRequest {
// Required. Callee's app id.
string id = 1;
// Required. message which will be delivered to callee.
common.v1.InvokeRequest message = 3;
}
// GetStateRequest is the message to get key-value states from specific state store.
message GetStateRequest {
// The name of state store.
string store_name = 1;
// The key of the desired state
string key = 2;
// The read consistency of the state store.
common.v1.StateOptions.StateConsistency consistency = 3;
// The metadata which will be sent to state store components.
map<string, string> metadata = 4;
}
// GetBulkStateRequest is the message to get a list of key-value states from specific state store.
message GetBulkStateRequest {
// The name of state store.
string store_name = 1;
// The keys to get.
repeated string keys = 2;
// The number of parallel operations executed on the state store for a get operation.
int32 parallelism = 3;
// The metadata which will be sent to state store components.
map<string, string> metadata = 4;
}
// GetBulkStateResponse is the response conveying the list of state values.
message GetBulkStateResponse {
// The list of items containing the keys to get values for.
repeated BulkStateItem items = 1;
}
// BulkStateItem is the response item for a bulk get operation.
// Return values include the item key, data and etag.
message BulkStateItem {
// state item key
string key = 1;
// The byte array data
bytes data = 2;
// The entity tag which represents the specific version of data.
// ETag format is defined by the corresponding data store.
string etag = 3;
// The error that was returned from the state store in case of a failed get operation.
string error = 4;
// The metadata which will be sent to app.
map<string, string> metadata = 5;
}
// GetStateResponse is the response conveying the state value and etag.
message GetStateResponse {
// The byte array data
bytes data = 1;
// The entity tag which represents the specific version of data.
// ETag format is defined by the corresponding data store.
string etag = 2;
// The metadata which will be sent to app.
map<string, string> metadata = 3;
}
// DeleteStateRequest is the message to delete key-value states in the specific state store.
message DeleteStateRequest {
// The name of state store.
string store_name = 1;
// The key of the desired state
string key = 2;
// The entity tag which represents the specific version of data.
// The exact ETag format is defined by the corresponding data store.
common.v1.Etag etag = 3;
// State operation options which includes concurrency/
// consistency/retry_policy.
common.v1.StateOptions options = 4;
// The metadata which will be sent to state store components.
map<string, string> metadata = 5;
}
// DeleteBulkStateRequest is the message to delete a list of key-value states from specific state store.
message DeleteBulkStateRequest {
// The name of state store.
string store_name = 1;
// The array of the state key values.
repeated common.v1.StateItem states = 2;
}
// SaveStateRequest is the message to save multiple states into state store.
message SaveStateRequest {
// The name of state store.
string store_name = 1;
// The array of the state key values.
repeated common.v1.StateItem states = 2;
}
// QueryStateRequest is the message to query state store.
message QueryStateRequest {
// The name of state store.
string store_name = 1 [json_name = "storeName"];
// The query in JSON format.
string query = 2;
// The metadata which will be sent to state store components.
map<string, string> metadata = 3;
}
message QueryStateItem {
// The object key.
string key = 1;
// The object value.
bytes data = 2;
// The entity tag which represents the specific version of data.
// ETag format is defined by the corresponding data store.
string etag = 3;
// The error message indicating an error in processing of the query result.
string error = 4;
}
// QueryStateResponse is the response conveying the query results.
message QueryStateResponse {
// An array of query results.
repeated QueryStateItem results = 1;
// Pagination token.
string token = 2;
// The metadata which will be sent to app.
map<string, string> metadata = 3;
}
// PublishEventRequest is the message to publish event data to pubsub topic
message PublishEventRequest {
// The name of the pubsub component
string pubsub_name = 1;
// The pubsub topic
string topic = 2;
// The data which will be published to topic.
bytes data = 3;
// The content type for the data (optional).
string data_content_type = 4;
// The metadata passing to pub components
//
// metadata property:
// - key : the key of the message.
map<string, string> metadata = 5;
}
// BulkPublishRequest is the message to bulk publish events to pubsub topic
message BulkPublishRequest {
// The name of the pubsub component
string pubsub_name = 1;
// The pubsub topic
string topic = 2;
// The entries which contain the individual events and associated details to be published
repeated BulkPublishRequestEntry entries = 3;
// The request level metadata passing to to the pubsub components
map<string, string> metadata = 4;
}
// BulkPublishRequestEntry is the message containing the event to be bulk published
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 pulished to the topic
bytes event = 2;
// The content type for the event
string content_type = 3;
// The event level metadata passing to the pubsub component
map<string, string> metadata = 4;
}
// BulkPublishResponse is the message returned from a BulkPublishEvent call
message BulkPublishResponse {
// The entries for different events that failed publish in the BulkPublishEvent call
repeated BulkPublishResponseFailedEntry failedEntries = 1;
}
// 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
string entry_id = 1;
// The error message if any on failure
string error = 2;
}
// InvokeBindingRequest is the message to send data to output bindings
message InvokeBindingRequest {
// The name of the output binding to invoke.
string name = 1;
// The data which will be sent to output binding.
bytes data = 2;
// The metadata passing to output binding components
//
// 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.
map<string, string> metadata = 3;
// The name of the operation type for the binding to invoke
string operation = 4;
}
// InvokeBindingResponse is the message returned from an output binding invocation
message InvokeBindingResponse {
// The data which will be sent to output binding.
bytes data = 1;
// The metadata returned from an external system
map<string, string> metadata = 2;
}
// GetSecretRequest is the message to get secret from secret store.
message GetSecretRequest {
// The name of secret store.
string store_name = 1 [json_name = "storeName"];
// The name of secret key.
string key = 2;
// The metadata which will be sent to secret store components.
map<string, string> metadata = 3;
}
// GetSecretResponse is the response message to convey the requested secret.
message GetSecretResponse {
// data is the secret value. Some secret store, such as kubernetes secret
// store, can save multiple secrets for single secret key.
map<string, string> data = 1;
}
// GetBulkSecretRequest is the message to get the secrets from secret store.
message GetBulkSecretRequest {
// The name of secret store.
string store_name = 1 [json_name = "storeName"];
// The metadata which will be sent to secret store components.
map<string, string> metadata = 2;
}
// SecretResponse is a map of decrypted string/string values
message SecretResponse {
map<string, string> secrets = 1;
}
// GetBulkSecretResponse is the response message to convey the requested secrets.
message GetBulkSecretResponse {
// data hold the secret values. Some secret store, such as kubernetes secret
// store, can save multiple secrets for single secret key.
map<string, SecretResponse> data = 1;
}
// TransactionalStateOperation is the message to execute a specified operation with a key-value pair.
message TransactionalStateOperation {
// The type of operation to be executed
string operationType = 1;
// State values to be operated on
common.v1.StateItem request = 2;
}
// ExecuteStateTransactionRequest is the message to execute multiple operations on a specified store.
message ExecuteStateTransactionRequest {
// Required. name of state store.
string storeName = 1;
// Required. transactional operation list.
repeated TransactionalStateOperation operations = 2;
// The metadata used for transactional operations.
map<string, string> metadata = 3;
}
// RegisterActorTimerRequest is the message to register a timer for an actor of a given type and id.
message RegisterActorTimerRequest {
string actor_type = 1;
string actor_id = 2;
string name = 3;
string due_time = 4;
string period = 5;
string callback = 6;
bytes data = 7;
string ttl = 8;
}
// UnregisterActorTimerRequest is the message to unregister an actor timer
message UnregisterActorTimerRequest {
string actor_type = 1;
string actor_id = 2;
string name = 3;
}
// RegisterActorReminderRequest is the message to register a reminder for an actor of a given type and id.
message RegisterActorReminderRequest {
string actor_type = 1;
string actor_id = 2;
string name = 3;
string due_time = 4;
string period = 5;
bytes data = 6;
string ttl = 7;
}
// UnregisterActorReminderRequest is the message to unregister an actor reminder.
message UnregisterActorReminderRequest {
string actor_type = 1;
string actor_id = 2;
string name = 3;
}
// RenameActorReminderRequest is the message to rename an actor reminder.
message RenameActorReminderRequest {
string actor_type = 1;
string actor_id = 2;
string old_name = 3;
string new_name = 4;
}
// GetActorStateRequest is the message to get key-value states from specific actor.
message GetActorStateRequest {
string actor_type = 1;
string actor_id = 2;
string key = 3;
}
// GetActorStateResponse is the response conveying the actor's state value.
message GetActorStateResponse {
bytes data = 1;
// The metadata which will be sent to app.
map<string, string> metadata = 2;
}
// ExecuteActorStateTransactionRequest is the message to execute multiple operations on a specified actor.
message ExecuteActorStateTransactionRequest {
string actor_type = 1;
string actor_id = 2;
repeated TransactionalActorStateOperation operations = 3;
}
// TransactionalActorStateOperation is the message to execute a specified operation with a key-value pair.
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.
message InvokeActorRequest {
string actor_type = 1;
string actor_id = 2;
string method = 3;
bytes data = 4;
map<string, string> metadata = 5;
}
// InvokeActorResponse is the method that returns an actor invocation response.
message InvokeActorResponse {
bytes data = 1;
}
// GetMetadataResponse is a message that is returned on GetMetadata rpc call
message GetMetadataResponse {
string id = 1;
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"];
AppConnectionProperties app_connection_properties = 7 [json_name = "appConnectionProperties"];
string runtime_version = 8 [json_name = "runtimeVersion"];
repeated string enabled_features = 9 [json_name = "enabledFeatures"];
}
message ActiveActorsCount {
string type = 1;
int32 count = 2;
}
message RegisteredComponents {
string name = 1;
string type = 2;
string version = 3;
repeated string capabilities = 4;
}
message MetadataHTTPEndpoint {
string name = 1 [json_name = "name"];
}
message AppConnectionProperties {
int32 port = 1;
string protocol = 2;
string channel_address = 3 [json_name = "channelAddress"];
int32 max_concurrency = 4 [json_name = "maxConcurrency"];
AppConnectionHealthProperties health = 5;
}
message AppConnectionHealthProperties {
string health_check_path = 1 [json_name = "healthCheckPath"];
string health_probe_interval = 2 [json_name = "healthProbeInterval"];
string health_probe_timeout = 3 [json_name = "healthProbeTimeout"];
int32 health_threshold = 4 [json_name = "healthThreshold"];
}
message PubsubSubscription {
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 {
repeated PubsubSubscriptionRule rules = 1;
}
message PubsubSubscriptionRule {
string match = 1;
string path = 2;
}
message SetMetadataRequest {
string key = 1;
string value = 2;
}
// GetConfigurationRequest is the message to get a list of key-value configuration from specified configuration store.
message GetConfigurationRequest {
// Required. The name of configuration store.
string store_name = 1;
// Optional. The key of the configuration item to fetch.
// If set, only query for the specified configuration items.
// Empty list means fetch all.
repeated string keys = 2;
// Optional. The metadata which will be sent to configuration store components.
map<string, string> metadata = 3;
}
// GetConfigurationResponse is the response conveying the list of configuration values.
// It should be the FULL configuration of specified application which contains all of its configuration items.
message GetConfigurationResponse {
map<string, common.v1.ConfigurationItem> items = 1;
}
// SubscribeConfigurationRequest is the message to get a list of key-value configuration from specified configuration store.
message SubscribeConfigurationRequest {
// The name of configuration store.
string store_name = 1;
// Optional. The key of the configuration item to fetch.
// If set, only query for the specified configuration items.
// Empty list means fetch all.
repeated string keys = 2;
// The metadata which will be sent to configuration store components.
map<string, string> metadata = 3;
}
// UnSubscribeConfigurationRequest is the message to stop watching the key-value configuration.
message UnsubscribeConfigurationRequest {
// The name of configuration store.
string store_name = 1;
// The id to unsubscribe.
string id = 2;
}
message SubscribeConfigurationResponse {
// Subscribe id, used to stop subscription.
string id = 1;
// The list of items containing configuration values
map<string, common.v1.ConfigurationItem> items = 2;
}
message UnsubscribeConfigurationResponse {
bool ok = 1;
string message = 2;
}
message TryLockRequest {
// Required. The lock store name,e.g. `redis`.
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 [json_name = "resourceId"];
// Required. lock_owner indicate the identifier of lock owner.
// You can generate a uuid as lock_owner.For example,in golang:
//
// req.LockOwner = uuid.New().String()
//
// This field is per request,not per process,so it is different for each request,
// which aims to prevent multi-thread in the same process trying the same lock concurrently.
//
// 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
// 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.
// 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 [json_name = "lockOwner"];
// Required. The time before expiry.The time unit is second.
int32 expiry_in_seconds = 4 [json_name = "expiryInSeconds"];
}
message TryLockResponse {
bool success = 1;
}
message UnlockRequest {
string store_name = 1 [json_name = "storeName"];
// resource_id is the lock key.
string resource_id = 2 [json_name = "resourceId"];
string lock_owner = 3 [json_name = "lockOwner"];
}
message UnlockResponse {
enum Status {
SUCCESS = 0;
LOCK_DOES_NOT_EXIST = 1;
LOCK_BELONGS_TO_OTHERS = 2;
INTERNAL_ERROR = 3;
}
Status status = 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.