Raileasy.DataProtection.Gcs
1.0.0
Prefix Reserved
dotnet add package Raileasy.DataProtection.Gcs --version 1.0.0
NuGet\Install-Package Raileasy.DataProtection.Gcs -Version 1.0.0
<PackageReference Include="Raileasy.DataProtection.Gcs" Version="1.0.0" />
paket add Raileasy.DataProtection.Gcs --version 1.0.0
#r "nuget: Raileasy.DataProtection.Gcs, 1.0.0"
// Install Raileasy.DataProtection.Gcs as a Cake Addin #addin nuget:?package=Raileasy.DataProtection.Gcs&version=1.0.0 // Install Raileasy.DataProtection.Gcs as a Cake Tool #tool nuget:?package=Raileasy.DataProtection.Gcs&version=1.0.0
Raileasy.DataProtection.Gcs
This library provides a way to store and retrieve ASP.NET data protection keys in an Google Cloud Storage bucket. The keys can either be stored in the root of the bucket, or the objects can use a configurable prefix.
All GCS operations are attempted 5 times with exponential backup. If all 5 attempts fail the final exception is thrown.
Installation
A net8.0
Nuget package is available here.
Or you can install with the dotnet cli:
dotnet add package Raileasy.DataProtection.Gcs
Sample Code
Setting the persistence provider
The PersistKeysToGcs
method can be used to set the storage up easily.
using Raileasy.DataProtection.Gcs;
var gcsDataProtectionConfiguration = builder.Configuration
.GetSection("GcsDataProtection")
.Get<GcsDataProtectionConfiguration>();
builder.Services.AddDataProtection().PersistKeysToGcs(gcsDataProtectionConfiguration);
Configuration options
GcsDataProtectionConfiguration
has two properties:
StorageBucket
: Required - the name of the GCS bucket to store the keys inObjectPrefix
: Optional - the prefix to use for the key objects (for example,staging/
). If this is not provided then the keys are stored in the root of the bucket.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- Google.Cloud.Storage.V1 (>= 4.10.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.0 | 5,379 | 3/28/2024 |