Centeva.ObjectStorage.GCP
5.0.0-tags-v5-0-0-pre-1.1
Prefix Reserved
See the version list below for details.
dotnet add package Centeva.ObjectStorage.GCP --version 5.0.0-tags-v5-0-0-pre-1.1
NuGet\Install-Package Centeva.ObjectStorage.GCP -Version 5.0.0-tags-v5-0-0-pre-1.1
<PackageReference Include="Centeva.ObjectStorage.GCP" Version="5.0.0-tags-v5-0-0-pre-1.1" />
paket add Centeva.ObjectStorage.GCP --version 5.0.0-tags-v5-0-0-pre-1.1
#r "nuget: Centeva.ObjectStorage.GCP, 5.0.0-tags-v5-0-0-pre-1.1"
// Install Centeva.ObjectStorage.GCP as a Cake Addin #addin nuget:?package=Centeva.ObjectStorage.GCP&version=5.0.0-tags-v5-0-0-pre-1.1&prerelease // Install Centeva.ObjectStorage.GCP as a Cake Tool #tool nuget:?package=Centeva.ObjectStorage.GCP&version=5.0.0-tags-v5-0-0-pre-1.1&prerelease
Centeva Object Storage Library
Centeva.ObjectStorage is a .NET 6+ / .NET Standard library that provides a generic interface to local or cloud-hosted object ("blob") storage providers.
Supported providers are:
- Amazon AWS S3 (and anything compatible with its API such as MinIO
- Google Cloud Storage
- Azure Blob Storage
- Local disk
Built With
Getting Started
Import the Centeva.ObjectStorage
package to your projects where needed, along
with the desired provider sub-packages:
Centeva.ObjectStorage.GCP
Centeva.ObjectStorage.AWS
Centeva.ObjectStorage.Azure.Blob
Create an instance of StorageFactory
and register the providers you require,
then build an instance of IObjectStorage
using a connection string:
var factory = new StorageFactory()
.UseAwsS3Storage()
.UseAzureBlobStorage()
.UseGoogleCloudStorage();
var storage = factory.GetConnection("provider://key1=value1;key2=value2");
In modern .NET applications, you will likely do this as part of service registration in Program.cs, obtaining the connection string from configuration.
In some cases you may prefer to instantiate storage providers directly rather than using connection strings. Each provider's constructor allows the needed parameters to be provided.
Examples
// Local Disk
var storageFromConnectionString = factory.GetConnection("disk://path=C:\\temp\\files");
var storageFromConstructor = new DiskObjectStorage("C:\\temp\\files");
// AWS S3
var storageFromConnectionString = factory.GetConnection("aws.s3://bucket=myfiles;accessKey=mykey;secretKey=secret");
var storageFromConstructor = new AwsS3ObjectStorage("myfiles", "regionName", "endpointUrl", "accessKey", "secret");
// Azure Blob Storage
var storageFromConnectionString = factory.GetConnection("azure.blob://container=myfiles;accountName=myaccount;accountKey=myAccountKey");
var storageFromConstructor = new AzureBlobObjectStorage("accountName", "accountKey", "containerName");
// Google Cloud Storage
var storageFromConnectionString = factory.GetConnection("google.storage://bucket=myfiles;credentialsFilePath=/path/to/creds.json");
var storageFromConnectionString2 = factory.GetConnection("google.storage://bucket=myfiles;credentials=base64EncodedCredentialsJson");
var storageFromConstructor = GoogleObjectStorage.CreateFromCredentialsFile("bucketName", "/path/to/creds.json");
var storageFromConstructor2 = GoogleObjectStorage.CreateFromCredentialsJson("bucketName", "credentialsJsonString");
// MinIO (using AWS S3 provider)
var storageFromConnectionString = factory.GetConnection("aws.s3://endpoint=http://localhost:9000;region=us-east-1;bucket=myfiles;accessKey=myAccount;secretKey=myPassword");
var storageFromConstructor = new AwsS3ObjectStorage("myfiles", "us-east-1", "http://localhost:9000", "myAccount", "myPassword");
TODO: Write API documentation
Contributing
Please use a Pull Request to suggest changes to this library. As this is a shared library, strict semantic versioning rules should be followed to avoid unexpected breaking changes.
Running Tests
From Windows, use the dotnet test
command, or your Visual Studio Test
Explorer.
Deployment
This library is versioned by GitVersion. Create a Git tag for an official release (e.g., "v1.0.0"). Version numbers can be incremented via commit message using the GitVersion approaches.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. 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. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Centeva.ObjectStorage (>= 5.0.0-tags-v5-0-0-pre-1.1)
- Google.Cloud.Storage.V1 (>= 4.10.0)
-
net6.0
- Centeva.ObjectStorage (>= 5.0.0-tags-v5-0-0-pre-1.1)
- Google.Cloud.Storage.V1 (>= 4.10.0)
-
net8.0
- Centeva.ObjectStorage (>= 5.0.0-tags-v5-0-0-pre-1.1)
- 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 |
---|---|---|
5.0.0 | 81 | 12/19/2024 |
5.0.0-tags-v5-0-0-pre-1.1 | 51 | 11/15/2024 |
4.0.0 | 125 | 10/21/2024 |
3.1.0 | 96 | 10/9/2024 |
3.0.0 | 89 | 9/26/2024 |
3.0.0-tags-v3-0-0-pre-4.1 | 49 | 9/26/2024 |
3.0.0-tags-v3-0-0-pre-3.1 | 53 | 9/26/2024 |
3.0.0-tags-v3-0-0-pre-2.1 | 58 | 9/26/2024 |
3.0.0-tags-v3-0-0-pre-1.1 | 55 | 9/26/2024 |
2.0.1 | 260 | 1/4/2024 |
2.0.0 | 173 | 12/28/2023 |
2.0.0-pre.3 | 83 | 12/20/2023 |
2.0.0-pre.2 | 67 | 12/19/2023 |
2.0.0-pre.1 | 89 | 12/18/2023 |
1.1.0 | 218 | 10/30/2023 |
1.0.0 | 147 | 10/30/2023 |