Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Naming inconsistency fxd
  • Loading branch information
Harold-Morgan committed Jun 5, 2025
commit 67b09bfa0ba2ac48629eac36dabf0b3ce4dc8fe6
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ This repository contains the source code for the .NET Aspire Community Toolkit,
| - **Learn More**: [`Hosting.MailPit`][mailpit-ext-integration-docs] <br /> - Stable 📦: [![CommunityToolkit.Aspire.Hosting.MailPit][mailpit-ext-shields]][mailpit-ext-nuget] <br /> - Preview 📦: [![CommunityToolkit.Aspire.Hosting.MailPit][mailpit-ext-shields-preview]][mailpit-ext-nuget-preview] | An Aspire integration leveraging the [MailPit](https://mailpit.axllent.org/) container. |
| - **Learn More**: [`Hosting.k6`][k6-integration-docs] <br /> - Stable 📦: [![CommunityToolkit.Aspire.Hosting.k6][k6-shields]][k6-nuget] <br /> - Preview 📦: [![CommunityToolkit.Aspire.Hosting.k6][k6-shields-preview]][k6-nuget-preview] | An Aspire integration leveraging the [Grafana k6](https://k6.io/) container. |
| - **Learn More**: [`Hosting.MySql.Extensions`][mysql-ext-integration-docs] <br /> - Stable 📦: [![CommunityToolkit.Aspire.MySql.Extensions][mysql-ext-shields]][mysql-ext-nuget] <br /> - Preview 📦: [![CommunityToolkit.Aspire.Hosting.MySql.Extensions][mysql-ext-shields-preview]][mysql-ext-nuget-preview] | An integration that contains some additional extensions for hosting MySql container. |
| - **Learn More**: [`Hosting.MiniO`][minio-integration-docs] <br /> - Stable 📦: [![CommunityToolkit.Aspire.Hosting.Minio][minio-hosting-shields]][minio-hosting-nuget] <br /> - Preview 📦: [![CommunityToolkit.Aspire.Hosting.Minio][minio-hosting-shields-preview]][minio-hosting-nuget-preview] | An Aspire hosting integration to setup a [MiniO S3](https://min.io/) storage. |
| - **Learn More**: [`MiniO.Client`][minio-integration-docs] <br /> - Stable 📦: [![CommunityToolkit.Aspire.Minio.Client][minio-client-shields]][minio-client-nuget] <br /> - Preview 📦: [![CommunityToolkit.Aspire.Client.Minio][minio-client-shields-preview]][minio-client-nuget-preview] | An Aspire client integration for the [Minio](https://github.com/minio/minio-dotnet) package. |
| - **Learn More**: [`Hosting.MinIO`][minio-integration-docs] <br /> - Stable 📦: [![CommunityToolkit.Aspire.Hosting.Minio][minio-hosting-shields]][minio-hosting-nuget] <br /> - Preview 📦: [![CommunityToolkit.Aspire.Hosting.Minio][minio-hosting-shields-preview]][minio-hosting-nuget-preview] | An Aspire hosting integration to setup a [MinIO S3](https://min.io/) storage. |
| - **Learn More**: [`MinIO.Client`][minio-integration-docs] <br /> - Stable 📦: [![CommunityToolkit.Aspire.Minio.Client][minio-client-shields]][minio-client-nuget] <br /> - Preview 📦: [![CommunityToolkit.Aspire.Client.Minio][minio-client-shields-preview]][minio-client-nuget-preview] | An Aspire client integration for the [MinIO](https://github.com/minio/minio-dotnet) package. |

## 🙌 Getting Started

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<AdditionalPackageTags>MinioS3 Hosting integration</AdditionalPackageTags>
<Description>A .NET Aspire hosting integration for MiniO</Description>
<AdditionalPackageTags>minio hosting cloud storage</AdditionalPackageTags>
<Description>A .NET Aspire hosting integration for MinIO</Description>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,21 @@
namespace Aspire.Hosting;

/// <summary>
/// Provides extension methods for adding MiniO resources to an <see cref="IDistributedApplicationBuilder"/>.
/// Provides extension methods for adding MinIO resources to an <see cref="IDistributedApplicationBuilder"/>.
/// </summary>
public static class MinioBuilderExtensions
{
private const string RootUserEnvVarName = "MINIO_ROOT_USER";
private const string RootPasswordEnvVarName = "MINIO_ROOT_PASSWORD";

/// <summary>
/// Adds a MiniO container to the application model. The default image is "minio/minio" and the tag is "latest".
/// Adds a MinIO container to the application model. The default image is "minio/minio" and the tag is "latest".
/// </summary>
/// <param name="builder">The <see cref="IDistributedApplicationBuilder"/>.</param>
/// <param name="name">The name of the resource. This name will be used as the connection string name when referenced in a dependency.</param>
/// <param name="port">The host port for MiniO.</param>
/// <param name="rootUser">The parameter used to provide the root user name for the MiniO resource. If <see langword="null"/> a default value will be used.</param>
/// <param name="rootPassword">The parameter used to provide the administrator password for the MiniO resource. If <see langword="null"/> a random password will be generated.</param>
/// <param name="port">The host port for MinIO.</param>
/// <param name="rootUser">The parameter used to provide the root user name for the MinIO resource. If <see langword="null"/> a default value will be used.</param>
/// <param name="rootPassword">The parameter used to provide the administrator password for the MinIO resource. If <see langword="null"/> a random password will be generated.</param>
/// <returns>A reference to the <see cref="IResourceBuilder{MinioContainerResource}"/>.</returns>
public static IResourceBuilder<MinioContainerResource> AddMinioContainer(
this IDistributedApplicationBuilder builder,
Expand Down Expand Up @@ -68,10 +68,10 @@ public static IResourceBuilder<MinioContainerResource> AddMinioContainer(


/// <summary>
/// Configures the user name that the Minio resource uses.
/// Configures the user name that the MinIO resource uses.
/// </summary>
/// <param name="builder">The resource builder.</param>
/// <param name="userName">The parameter used to provide the user name for the PostgreSQL resource.</param>
/// <param name="userName">The parameter used to provide the user name for the MinIO resource.</param>
/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
public static IResourceBuilder<MinioContainerResource> WithUserName(this IResourceBuilder<MinioContainerResource> builder, IResourceBuilder<ParameterResource> userName)
{
Expand All @@ -83,10 +83,10 @@ public static IResourceBuilder<MinioContainerResource> WithUserName(this IResour
}

/// <summary>
/// Configures the password that the MiniO resource is used.
/// Configures the password that the MinIO resource is used.
/// </summary>
/// <param name="builder">The resource builder.</param>
/// <param name="password">The parameter used to provide the password for the MiniO resource. If <see langword="null"/>, no password will be configured.</param>
/// <param name="password">The parameter used to provide the password for the MinIO resource. If <see langword="null"/>, no password will be configured.</param>
/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
public static IResourceBuilder<MinioContainerResource> WithPassword(this IResourceBuilder<MinioContainerResource> builder, IResourceBuilder<ParameterResource> password)
{
Expand All @@ -97,11 +97,11 @@ public static IResourceBuilder<MinioContainerResource> WithPassword(this IResour
}

/// <summary>
/// Configures the host port that the PGAdmin resource is exposed on instead of using randomly assigned port.
/// Configures the host port that the MinIO resource is exposed on instead of using randomly assigned port.
/// </summary>
/// <param name="builder">The resource builder for PGAdmin.</param>
/// <param name="builder">The resource builder for MinIO.</param>
/// <param name="port">The port to bind on the host. If <see langword="null"/> is used, a random port will be assigned.</param>
/// <returns>The resource builder for PGAdmin.</returns>
/// <returns>The resource builder for MinIO.</returns>
public static IResourceBuilder<MinioContainerResource> WithHostPort(this IResourceBuilder<MinioContainerResource> builder, int? port)
{
ArgumentNullException.ThrowIfNull(builder);
Expand All @@ -113,14 +113,14 @@ public static IResourceBuilder<MinioContainerResource> WithHostPort(this IResour
}

/// <summary>
/// Adds a named volume for the data folder to a Minio container resource.
/// Adds a named volume for the data folder to a MinIO container resource.
/// </summary>
/// <param name="builder">The resource builder.</param>
/// <param name="name">The name of the volume. Defaults to an auto-generated name based on the application and resource names.</param>
/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
/// <remarks>
/// <example>
/// Add an Minio container to the application model and reference it in a .NET project. Additionally, in this
/// Add an MinIO container to the application model and reference it in a .NET project. Additionally, in this
/// example a data volume is added to the container to allow data to be persisted across container restarts.
/// <code lang="csharp">
/// var builder = DistributedApplication.CreateBuilder(args);
Expand All @@ -142,14 +142,14 @@ public static IResourceBuilder<MinioContainerResource> WithDataVolume(this IReso
}

/// <summary>
/// Adds a bind mount for the data folder to a Minio container resource.
/// Adds a bind mount for the data folder to a MinIO container resource.
/// </summary>
/// <param name="builder">The resource builder.</param>
/// <param name="source">The source directory on the host to mount into the container.</param>
/// <returns>The <see cref="IResourceBuilder{T}"/>.</returns>
/// <remarks>
/// <example>
/// Add an Minio container to the application model and reference it in a .NET project. Additionally, in this
/// Add an MinIO container to the application model and reference it in a .NET project. Additionally, in this
/// example a bind mount is added to the container to allow data to be persisted across container restarts.
/// <code lang="csharp">
/// var builder = DistributedApplication.CreateBuilder(args);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
namespace Aspire.Hosting.ApplicationModel;

/// <summary>
/// A resource that represents a MiniO storage
/// A resource that represents a MinIO storage
/// </summary>
public sealed class MinioContainerResource : ContainerResource, IResourceWithConnectionString
{
Expand All @@ -13,28 +13,28 @@ public sealed class MinioContainerResource : ContainerResource, IResourceWithCon
/// Initializes a new instance of the <see cref="MinioContainerResource"/> class.
/// </summary>
/// <param name="name">The name of the resource.</param>
/// <param name="user">A parameter that contains the Minio server root user name.</param>
/// <param name="password">A parameter that contains the Minio server root password.</param>
/// <param name="user">A parameter that contains the MinIO server root user name.</param>
/// <param name="password">A parameter that contains the MinIO server root password.</param>
public MinioContainerResource(string name, ParameterResource user, ParameterResource password) : base(name)
{
RootUser = user;
PasswordParameter = password;
}

/// <summary>
/// The MiniO root user.
/// The MinIO root user.
/// </summary>
public ParameterResource RootUser { get; set; }

/// <summary>
/// The MiniO root password.
/// The MinIO root password.
/// </summary>
public ParameterResource PasswordParameter { get; set; }

private EndpointReference? _primaryEndpoint;

/// <summary>
/// Gets the primary endpoint for the Minio. This endpoint is used for all API calls over HTTP.
/// Gets the primary endpoint for the MinIO. This endpoint is used for all API calls over HTTP.
/// </summary>
public EndpointReference PrimaryEndpoint => _primaryEndpoint ??= new(this, PrimaryEndpointName);

Expand All @@ -44,10 +44,10 @@ public MinioContainerResource(string name, ParameterResource user, ParameterReso
public ReferenceExpression ConnectionStringExpression => GetConnectionString();

/// <summary>
/// Gets the connection string for the MiniO server.
/// Gets the connection string for the MinIO server.
/// </summary>
/// <param name="cancellationToken"> A <see cref="CancellationToken"/> to observe while waiting for the task to complete.</param>
/// <returns>A connection string for the PostgreSQL server in the form "Host=host;Port=port;Username=postgres;Password=password".</returns>
/// <returns>A connection string for the MinIO server in the form "Host=host;Port=port;Username=postgres;Password=password".</returns>
public ValueTask<string?> GetConnectionStringAsync(CancellationToken cancellationToken = default)
{
if (this.TryGetLastAnnotation<ConnectionStringRedirectAnnotation>(out var connectionStringAnnotation))
Expand All @@ -59,7 +59,7 @@ public MinioContainerResource(string name, ParameterResource user, ParameterReso
}

/// <summary>
/// Gets the connection string for the MiniO server.
/// Gets the connection string for the MinIO server.
/// </summary>
private ReferenceExpression GetConnectionString()
{
Expand Down
6 changes: 3 additions & 3 deletions src/CommunityToolkit.Aspire.Hosting.Minio/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# CommunityToolkit.Aspire.Hosting.MinoO library
# CommunityToolkit.Aspire.Hosting.MinIO library

Provides extension methods and resource definitions for the .NET Aspire AppHost to support running [MiniO](https://min.io/) containers.
Provides extension methods and resource definitions for the .NET Aspire AppHost to support running [MinIO](https://min.io/) containers.

## Getting Started

Expand All @@ -14,7 +14,7 @@ dotnet add package CommunityToolkit.Aspire.Hosting.Minio

### Example usage

Then, in the _Program.cs_ file of `AppHost`, add a Minio resource and consume the connection using the following methods:
Then, in the _Program.cs_ file of `AppHost`, add a MinIO resource and consume the connection using the following methods:

```csharp
var builder = DistributedApplication.CreateBuilder(args);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<AdditionalPackageTags>MinioS3 Client integration</AdditionalPackageTags>
<Description>A .NET Aspire client integration for MinioS#</Description>
<AdditionalPackageTags>minio hosting cloud storage</AdditionalPackageTags>
<Description>A .NET Aspire client integration for MinIO</Description>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
namespace Microsoft.Extensions.Hosting;

/// <summary>
/// Provides extension methods for registering MiniO-related services in an <see cref="IHostApplicationBuilder"/>.
/// Provides extension methods for registering MinIO-related services in an <see cref="IHostApplicationBuilder"/>.
/// </summary>
public static class MinioClientBuilderExtensionMethods
{
private const string DefaultConfigSectionName = "Aspire:Minio:Client";

/// <summary>
/// Adds Minio Client to ASPNet host
/// Adds MinIO Client to ASPNet host
/// </summary>
/// <param name="builder">The <see cref="IHostApplicationBuilder"/> used to add services.</param>
/// <param name="configurationSectionName">Name of the configuration settings section</param>
Expand All @@ -37,7 +37,7 @@ private static void AddMinioInternal(this IHostApplicationBuilder builder, Minio
{
ArgumentNullException.ThrowIfNull(settings);

// Add the Minio client to the service collection.
// Add the MinIO client to the service collection.
void ConfigureClient(IMinioClient configureClient)
{
var client = configureClient.WithEndpoint(settings.Endpoint)
Expand All @@ -59,7 +59,7 @@ void ConfigureClient(IMinioClient configureClient)
IMinioClient GetClient()
{
if (settings.Endpoint is null)
throw new InvalidOperationException("The MiniO endpoint must be provided either in configuration section, or as a part of connection string or settings delegate");
throw new InvalidOperationException("The MinIO endpoint must be provided either in configuration section, or as a part of connection string or settings delegate");

return minioClientFactory.CreateClient();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace CommunityToolkit.Aspire.Minio.Client;

/// <summary>
/// Minio client configuration
/// MinIO client configuration
/// </summary>
public sealed class MinioClientSettings
{
Expand All @@ -30,7 +30,7 @@ public sealed class MinioClientSettings
public HeaderAppInformation? UserAgentHeaderInfo { get; set; }

/// <summary>
/// Minio client service lifetime
/// MinIO client service lifetime
/// </summary>
public ServiceLifetime ServiceLifetime = ServiceLifetime.Singleton;

Expand Down Expand Up @@ -92,17 +92,17 @@ public class HeaderAppInformation
}

/// <summary>
/// Minio credentials (access and secret keys)
/// MinIO credentials (access and secret keys)
/// </summary>
public class MinioCredentials
{
/// <summary>
/// Minio Access Key
/// MinIO Access Key
/// </summary>
public string AccessKey { get; set; } = string.Empty;

/// <summary>
/// Minio Secret Key
/// MinIO Secret Key
/// </summary>
public string SecretKey { get; set; } = string.Empty;
}
Loading