Commit 9f512a0
authored
Refactor Google Secrets integration to support options and improve configuration handling (#23)
This pull request introduces several significant changes to the
`GoogleSecrets` configuration functionality. The most important updates
include the addition of a new overload for `AddGoogleSecrets`, the
removal of redundant code, and enhancements to the handling of
`GoogleSecretsOptions`.
### Key Changes:
#### New Features:
* Added a new overload for `AddGoogleSecrets` to allow passing
`GoogleSecretsOptions`.
#### Code Simplification:
* Removed the redundant environment variable check for
`GoogleSecretsProject` in `ConfigurationBuilderExtensions`.
[[1]](diffhunk://#diff-3a42ad5a1b6e9fd57bf3513b6cdee8a15582556ed87bd3a456c3cff0da036c27L20-L29)
[[2]](diffhunk://#diff-4c1edd3a47fe0ee6052f244806defa0d9acf7a1e57660749e2a7de329850795eL20-R33)
* Simplified the `AddGoogleSecrets` method by removing the check for
`ProjectName` in `GoogleSecretsOptions`.
#### Enhancements:
* Set the `ProjectName` property in `GoogleSecretsOptions` to default to
the environment variable `GoogleSecretsProject` if available.
* Added a warning log and early return in `GoogleSecretsProvider` if
`ProjectName` is not set.1 parent c587a9e commit 9f512a0
5 files changed
Lines changed: 25 additions & 25 deletions
File tree
- GoogleSecrets
- Neolution.Extensions.Configuration.GoogleSecrets.AspNetCore
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
10 | 14 | | |
11 | 15 | | |
12 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | 20 | | |
31 | 21 | | |
32 | 22 | | |
| |||
45 | 35 | | |
46 | 36 | | |
47 | 37 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | 38 | | |
54 | 39 | | |
55 | 40 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
48 | 54 | | |
49 | 55 | | |
50 | 56 | | |
| |||
Lines changed: 14 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
29 | 34 | | |
30 | 35 | | |
31 | 36 | | |
0 commit comments