-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e575715
commit 3552b97
Showing
16 changed files
with
613 additions
and
213 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
[CmdletBinding()] | ||
param( | ||
[Parameter(Mandatory = $true)] | ||
[string]$Name, | ||
[switch]$Require) | ||
|
||
$originalErrorActionPreference = $ErrorActionPreference | ||
try { | ||
$ErrorActionPreference = 'Stop' | ||
|
||
# Get the URL. | ||
$description = Get-LocString -Key PSLIB_EndpointUrl0 -ArgumentList $Name | ||
$key = "ENDPOINT_URL_$Name" | ||
$url = Get-VaultValue -Description $description -Key $key -Require:$Require | ||
|
||
# Get the auth object. | ||
$description = Get-LocString -Key PSLIB_EndpointAuth0 -ArgumentList $Name | ||
$key = "ENDPOINT_AUTH_$Name" | ||
if ($auth = (Get-VaultValue -Description $description -Key $key -Require:$Require)) { | ||
$auth = ConvertFrom-Json -InputObject $auth | ||
} | ||
|
||
# Get the data. | ||
$description = "'$Name' service endpoint data" | ||
$key = "ENDPOINT_DATA_$Name" | ||
if ($data = (Get-VaultValue -Description $description -Key $key)) { | ||
$data = ConvertFrom-Json -InputObject $data | ||
} | ||
|
||
# Return the endpoint. | ||
if ($url -or $auth -or $data) { | ||
New-Object -TypeName psobject -Property @{ | ||
Url = $url | ||
Auth = $auth | ||
Data = $data | ||
} | ||
} | ||
} catch { | ||
$ErrorActionPreference = $originalErrorActionPreference | ||
Write-Error $_ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
Default|2.250.124 | ||
Node20-225|2.250.125 | ||
Default|2.250.168 | ||
Node20-225|2.250.169 |
Oops, something went wrong.