-
Notifications
You must be signed in to change notification settings - Fork 0
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
3dfdd27
commit e70667a
Showing
11 changed files
with
91 additions
and
84 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,18 @@ | ||
namespace Dan.Plugin.DATASOURCENAME.Config; | ||
|
||
public static class PluginConstants | ||
{ | ||
// These are not mandatory, but there should be a distinct error code (any integer) for all types of errors that can occur. The error codes does not have to be globally | ||
// unique. These should be used within either transient or permanent exceptions, see Plugin.cs for examples. | ||
public const int ErrorUpstreamUnavailble = 1001; | ||
public const int ErrorInvalidInput = 1002; | ||
public const int ErrorNotFound = 1003; | ||
public const int ErrorUnableToParseResponse = 1004; | ||
|
||
// The datasets must supply a human-readable source description from which they originate. Individual fields might come from different sources, and this string should reflect that (ie. name all possible sources). | ||
public const string SourceName = "Digitaliseringsdirektoratet"; | ||
|
||
// The function names (ie. HTTP endpoint names) and the dataset names must match. Using constants to avoid errors. | ||
public const string SimpleDatasetName = "SimpleDataset"; | ||
public const string RichDatasetName = "RichDataset"; | ||
} |
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,10 @@ | ||
namespace Dan.Plugin.DATASOURCENAME.Config; | ||
|
||
public class Settings | ||
{ | ||
public int DefaultCircuitBreakerOpenCircuitTimeSeconds { get; init; } | ||
public int DefaultCircuitBreakerFailureBeforeTripping { get; init; } | ||
public int SafeHttpClientTimeout { get; init; } | ||
|
||
public string EndpointUrl { get; init; } | ||
} |
11 changes: 6 additions & 5 deletions
11
src/Dan.Plugin.DATASOURCENAME/Dan.Plugin.DATASOURCENAME.csproj
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
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 was deleted.
Oops, something went wrong.
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,15 +1,16 @@ | ||
{ | ||
"IsEncrypted": false, | ||
"Host":{ | ||
"LocalHttpPort": 7075, | ||
"CORS": "*", | ||
"CORSCredentials": false | ||
}, | ||
"Values": { | ||
"AzureWebJobsStorage": "UseDevelopmentStorage=true", | ||
"FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated", | ||
|
||
|
||
"DefaultCircuitBreakerOpenCircuitTimeSeconds": "10", | ||
"DefaultCircuitBreakerFailureBeforeTripping": "4", | ||
"SafeHttpClientTimeout": "30", | ||
|
||
"EndpointUrl": "https://example.com" | ||
|
||
} | ||
} |
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