@@ -128,6 +128,27 @@ impl<T: DaprInterface> Client<T> {
128
128
. await
129
129
}
130
130
131
+ /// Get all secrets for a given store
132
+ ///
133
+ /// # Arguments
134
+ ///
135
+ /// * `store_name` - The name of the secret store.
136
+ pub async fn get_bulk_secret < S > (
137
+ & mut self ,
138
+ store_name : S ,
139
+ metadata : Option < HashMap < String , String > > ,
140
+ ) -> Result < GetBulkSecretResponse , Error >
141
+ where
142
+ S : Into < String > ,
143
+ {
144
+ self . 0
145
+ . get_bulk_secret ( GetBulkSecretRequest {
146
+ store_name : store_name. into ( ) ,
147
+ metadata : metadata. unwrap_or_default ( ) ,
148
+ } )
149
+ . await
150
+ }
151
+
131
152
/// Get the state for a specific key.
132
153
///
133
154
/// # Arguments
@@ -373,6 +394,10 @@ pub trait DaprInterface: Sized {
373
394
request : InvokeBindingRequest ,
374
395
) -> Result < InvokeBindingResponse , Error > ;
375
396
async fn get_secret ( & mut self , request : GetSecretRequest ) -> Result < GetSecretResponse , Error > ;
397
+ async fn get_bulk_secret (
398
+ & mut self ,
399
+ request : GetBulkSecretRequest ,
400
+ ) -> Result < GetBulkSecretResponse , Error > ;
376
401
async fn get_state ( & mut self , request : GetStateRequest ) -> Result < GetStateResponse , Error > ;
377
402
async fn save_state ( & mut self , request : SaveStateRequest ) -> Result < ( ) , Error > ;
378
403
async fn delete_state ( & mut self , request : DeleteStateRequest ) -> Result < ( ) , Error > ;
@@ -434,6 +459,16 @@ impl DaprInterface for dapr_v1::dapr_client::DaprClient<TonicChannel> {
434
459
Ok ( self . get_secret ( Request :: new ( request) ) . await ?. into_inner ( ) )
435
460
}
436
461
462
+ async fn get_bulk_secret (
463
+ & mut self ,
464
+ request : GetBulkSecretRequest ,
465
+ ) -> Result < GetBulkSecretResponse , Error > {
466
+ Ok ( self
467
+ . get_bulk_secret ( Request :: new ( request) )
468
+ . await ?
469
+ . into_inner ( ) )
470
+ }
471
+
437
472
async fn get_state ( & mut self , request : GetStateRequest ) -> Result < GetStateResponse , Error > {
438
473
Ok ( self . get_state ( Request :: new ( request) ) . await ?. into_inner ( ) )
439
474
}
@@ -538,6 +573,12 @@ pub type GetSecretRequest = dapr_v1::GetSecretRequest;
538
573
/// A response from getting secret
539
574
pub type GetSecretResponse = dapr_v1:: GetSecretResponse ;
540
575
576
+ /// A request for getting bulk secrets
577
+ pub type GetBulkSecretRequest = dapr_v1:: GetBulkSecretRequest ;
578
+
579
+ /// A response for getting bulk secrets
580
+ pub type GetBulkSecretResponse = dapr_v1:: GetBulkSecretResponse ;
581
+
541
582
/// A response from getting metadata
542
583
pub type GetMetadataResponse = dapr_v1:: GetMetadataResponse ;
543
584
0 commit comments