Feature: Google Cloud Storage Provider (ManagedCode.Storage.Gcp)

Purpose

Implement IStorage on top of Google Cloud Storage (GCS) using Google.Cloud.Storage.V1.

Main Flows

flowchart LR
  App --> GCS[GCPStorage : IGCPStorage]
  GCS --> SDK[Google.Cloud.Storage.V1 StorageClient]
  SDK --> Cloud[(GCS)]

Components

DI Wiring

dotnet add package ManagedCode.Storage.Gcp
using Google.Apis.Auth.OAuth2;
using ManagedCode.Storage.Google.Extensions;
using ManagedCode.Storage.Google.Options;

builder.Services.AddGCPStorageAsDefault(options =>
{
    options.GoogleCredential = GoogleCredential.FromFile("service-account.json");
    options.BucketOptions = new BucketOptions
    {
        ProjectId = "my-project-id",
        Bucket = "my-bucket"
    };
});

Current Behavior

Tests