mirror of https://github.com/dapr/docs.git
				
				
				
			Added full code snippets of secrets management
Signed-off-by: Amulya Varote <amulyavarote@Amulyas-MacBook-Pro.local>
This commit is contained in:
		
							parent
							
								
									78848ef7bc
								
							
						
					
					
						commit
						08048e58d7
					
				|  | @ -122,7 +122,15 @@ Once you have a secret store, call Dapr to get the secrets from your application | ||||||
| {{% codetab %}} | {{% codetab %}} | ||||||
| ```csharp | ```csharp | ||||||
| //dependencies | //dependencies | ||||||
|  | using System; | ||||||
|  | using System.Collections.Generic; | ||||||
|  | using System.Net.Http; | ||||||
|  | using System.Net.Http.Headers; | ||||||
|  | using System.Threading.Tasks; | ||||||
| using Dapr.Client; | using Dapr.Client; | ||||||
|  | using Microsoft.AspNetCore.Mvc; | ||||||
|  | using System.Threading; | ||||||
|  | using System.Text.Json; | ||||||
| 
 | 
 | ||||||
| //code | //code | ||||||
| namespace EventService | namespace EventService | ||||||
|  | @ -146,15 +154,23 @@ namespace EventService | ||||||
| 
 | 
 | ||||||
| ```java | ```java | ||||||
| //dependencies | //dependencies | ||||||
|  | import com.fasterxml.jackson.core.JsonProcessingException; | ||||||
|  | import com.fasterxml.jackson.databind.ObjectMapper; | ||||||
| import io.dapr.client.DaprClient; | import io.dapr.client.DaprClient; | ||||||
| import io.dapr.client.DaprClientBuilder; | import io.dapr.client.DaprClientBuilder; | ||||||
| <<<<<<< HEAD | <<<<<<< HEAD | ||||||
|  | <<<<<<< HEAD | ||||||
|  | ======= | ||||||
|  | >>>>>>> e257da8d (Added full code snippets of secrets management) | ||||||
| import org.springframework.boot.autoconfigure.SpringBootApplication; | import org.springframework.boot.autoconfigure.SpringBootApplication; | ||||||
| import org.slf4j.Logger; | import org.slf4j.Logger; | ||||||
| import org.slf4j.LoggerFactory; | import org.slf4j.LoggerFactory; | ||||||
| import java.util.*; | import java.util.*; | ||||||
|  | <<<<<<< HEAD | ||||||
| ======= | ======= | ||||||
| >>>>>>> 7bfd5715 (Modified based on the review comments - 2) | >>>>>>> 7bfd5715 (Modified based on the review comments - 2) | ||||||
|  | ======= | ||||||
|  | >>>>>>> e257da8d (Added full code snippets of secrets management) | ||||||
| 
 | 
 | ||||||
| //code | //code | ||||||
| @SpringBootApplication | @SpringBootApplication | ||||||
|  | @ -180,12 +196,18 @@ public class OrderProcessingServiceApplication { | ||||||
| ```python | ```python | ||||||
| #dependencies  | #dependencies  | ||||||
| <<<<<<< HEAD | <<<<<<< HEAD | ||||||
|  | <<<<<<< HEAD | ||||||
|  | ======= | ||||||
|  | >>>>>>> e257da8d (Added full code snippets of secrets management) | ||||||
| import random | import random | ||||||
| from time import sleep     | from time import sleep     | ||||||
| import requests | import requests | ||||||
| import logging | import logging | ||||||
|  | <<<<<<< HEAD | ||||||
| ======= | ======= | ||||||
| >>>>>>> 7bfd5715 (Modified based on the review comments - 2) | >>>>>>> 7bfd5715 (Modified based on the review comments - 2) | ||||||
|  | ======= | ||||||
|  | >>>>>>> e257da8d (Added full code snippets of secrets management) | ||||||
| from dapr.clients import DaprClient | from dapr.clients import DaprClient | ||||||
| from dapr.clients.grpc._state import StateItem | from dapr.clients.grpc._state import StateItem | ||||||
| from dapr.clients.grpc._request import TransactionalStateOperation, TransactionOperationType | from dapr.clients.grpc._request import TransactionalStateOperation, TransactionOperationType | ||||||
|  | @ -205,9 +227,12 @@ with DaprClient() as client: | ||||||
|     logging.info('Result for bulk secret: ') |     logging.info('Result for bulk secret: ') | ||||||
|     logging.info(sorted(secret.secrets.items())) |     logging.info(sorted(secret.secrets.items())) | ||||||
| <<<<<<< HEAD | <<<<<<< HEAD | ||||||
|  | <<<<<<< HEAD | ||||||
| ======= | ======= | ||||||
| 
 | 
 | ||||||
| >>>>>>> 03751403 (Modified based on the review comments - 1) | >>>>>>> 03751403 (Modified based on the review comments - 1) | ||||||
|  | ======= | ||||||
|  | >>>>>>> e257da8d (Added full code snippets of secrets management) | ||||||
| ``` | ``` | ||||||
| {{% /codetab %}} | {{% /codetab %}} | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue