Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uses values from constants in documentation #5806

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion playground/AspireEventHub/EventHubsConsumer/Consumer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace EventHubsConsumer;
/// production scenario, as it offers a much more robust experience with higher throughput.
///
/// It is important to note that this method does not guarantee fairness amongst the partitions during iteration; each of the partitions compete to publish
/// events to be read by the enumerator. Depending on service communication, there may be a clustering of events per partition and/or there may be a noticeable
/// events to be read by the enumerator. Depending on service communication, there may be a clustering of events per partition and/or there may be a noticeable
/// bias for a given partition or subset of partitions.
///
/// Each reader of events is presented with an independent iterator; if there are multiple readers, each receive their own copy of an event to
Expand Down
4 changes: 2 additions & 2 deletions src/Aspire.Dashboard/Authentication/AspirePolicyEvaluator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ public AspirePolicyEvaluator(IAuthorizationService authorization)

/// <summary>
/// Does authentication for <see cref="AuthorizationPolicy.AuthenticationSchemes"/> and sets the resulting
/// <see cref="ClaimsPrincipal"/> to <see cref="HttpContext.User"/>. If no schemes are set, this is a no-op.
/// <see cref="ClaimsPrincipal"/> to <see cref="HttpContext.User"/>. If no schemes are set, this is a no-op.
/// </summary>
/// <param name="policy">The <see cref="AuthorizationPolicy"/>.</param>
/// <param name="context">The <see cref="HttpContext"/>.</param>
/// <returns><see cref="AuthenticateResult.Success"/> unless all schemes specified by <see cref="AuthorizationPolicy.AuthenticationSchemes"/> failed to authenticate. </returns>
/// <returns><see cref="AuthenticateResult.Success"/> unless all schemes specified by <see cref="AuthorizationPolicy.AuthenticationSchemes"/> failed to authenticate.</returns>
public virtual async Task<AuthenticateResult> AuthenticateAsync(AuthorizationPolicy policy, HttpContext context)
{
if (policy.AuthenticationSchemes != null && policy.AuthenticationSchemes.Count > 0)
Expand Down
13 changes: 7 additions & 6 deletions src/Aspire.Hosting.Azure.Storage/AzureStorageExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Diagnostics.CodeAnalysis;
using Aspire.Hosting.ApplicationModel;
using Aspire.Hosting.Azure;
using Aspire.Hosting.Azure.Storage;
using Aspire.Hosting.Utils;
using Azure.Provisioning;
using Azure.Provisioning.Storage;
Expand All @@ -16,7 +17,7 @@ namespace Aspire.Hosting;
public static class AzureStorageExtensions
{
/// <summary>
/// Adds an Azure Storage resource to the application model.This resource can be used to create Azure blob, table, and queue resources.
/// Adds an Azure Storage resource to the application model. This resource can be used to create Azure blob, table, and queue resources.
/// </summary>
/// <param name="builder">The builder for the distributed application.</param>
/// <param name="name">The name of the resource.</param>
Expand All @@ -29,7 +30,7 @@ public static IResourceBuilder<AzureStorageResource> AddAzureStorage(this IDistr
}

/// <summary>
/// Adds an Azure Storage resource to the application model.This resource can be used to create Azure blob, table, and queue resources.
/// Adds an Azure Storage resource to the application model. This resource can be used to create Azure blob, table, and queue resources.
/// </summary>
/// <param name="builder">The builder for the distributed application.</param>
/// <param name="name">The name of the resource.</param>
Expand Down Expand Up @@ -92,7 +93,7 @@ public static IResourceBuilder<AzureStorageResource> AddAzureStorage(this IDistr
}

/// <summary>
/// Configures an Azure Storage resource to be emulated using Azurite. This resource requires an <see cref="AzureStorageResource"/> to be added to the application model. This version the package defaults to version 3.29.0 of the mcr.microsoft.com/azure-storage/azurite container image.
/// Configures an Azure Storage resource to be emulated using Azurite. This resource requires an <see cref="AzureStorageResource"/> to be added to the application model. This version of the package defaults to the <inheritdoc cref="StorageEmulatorContainerImageTags.Tag"/> tag of the <inheritdoc cref="StorageEmulatorContainerImageTags.Registry"/>/<inheritdoc cref="StorageEmulatorContainerImageTags.Image"/> container image.
/// </summary>
/// <param name="builder">The Azure storage resource builder.</param>
/// <param name="configureContainer">Callback that exposes underlying container used for emulation to allow for customization.</param>
Expand All @@ -109,9 +110,9 @@ public static IResourceBuilder<AzureStorageResource> RunAsEmulator(this IResourc
.WithEndpoint(name: "table", targetPort: 10002)
.WithAnnotation(new ContainerImageAnnotation
{
Registry = "mcr.microsoft.com",
Image = "azure-storage/azurite",
Tag = "3.31.0"
Registry = StorageEmulatorContainerImageTags.Registry,
Image = StorageEmulatorContainerImageTags.Image,
Tag = StorageEmulatorContainerImageTags.Tag
});

if (configureContainer != null)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace Aspire.Hosting.Azure.Storage;

internal static class StorageEmulatorContainerImageTags
{
/// <summary>mcr.microsoft.com</summary>
public const string Registry = "mcr.microsoft.com";

/// <summary>azure-storage/azurite</summary>
public const string Image = "azure-storage/azurite";

/// <summary>3.31.0</summary>
public const string Tag = "3.31.0";
}
4 changes: 2 additions & 2 deletions src/Aspire.Hosting.Kafka/KafkaBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static class KafkaBuilderExtensions
private const string Target = "/var/lib/kafka/data";

/// <summary>
/// Adds a Kafka resource to the application. A container is used for local development. This version the package defaults to the 7.6.1 tag of the confluentinc/confluent-local container image.
/// Adds a Kafka resource to the application. A container is used for local development. This version of the package defaults to the <inheritdoc cref="KafkaContainerImageTags.Tag"/> tag of the <inheritdoc cref="KafkaContainerImageTags.Image"/> container image.
/// </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>
Expand Down Expand Up @@ -77,7 +77,7 @@ public static IResourceBuilder<KafkaServerResource> AddKafka(this IDistributedAp
}

/// <summary>
/// Adds a Kafka UI container to the application. This version of the package defaults to the 0.7.2 tag of the provectuslabs/kafka-ui container image.
/// Adds a Kafka UI container to the application. This version of the package defaults to the <inheritdoc cref="KafkaContainerImageTags.KafkaUiTag"/> tag of the <inheritdoc cref="KafkaContainerImageTags.KafkaUiImage"/> container image.
/// </summary>
/// <param name="builder">The Kafka server resource builder.</param>
/// <param name="configureContainer">Configuration callback for KafkaUI container resource.</param>
Expand Down
9 changes: 9 additions & 0 deletions src/Aspire.Hosting.Kafka/KafkaContainerImageTags.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,18 @@ namespace Aspire.Hosting;

internal static class KafkaContainerImageTags
{
/// <summary>docker.io</summary>
public const string Registry = "docker.io";

/// <summary>confluentinc/confluent-local</summary>
public const string Image = "confluentinc/confluent-local";

/// <summary>7.7.0</summary>
public const string Tag = "7.7.0";

/// <summary>provectuslabs/kafka-ui</summary>
public const string KafkaUiImage = "provectuslabs/kafka-ui";

/// <summary>v0.7.2</summary>
public const string KafkaUiTag = "v0.7.2";
}
4 changes: 2 additions & 2 deletions src/Aspire.Hosting.Milvus/MilvusBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public static class MilvusBuilderExtensions
/// </code>
/// </example>
/// <remarks>
/// This version the package defaults to the 2.3-latest tag of the milvusdb/milvus container image.
/// This version of the package defaults to the <inheritdoc cref="MilvusContainerImageTags.Tag"/> tag of the <inheritdoc cref="MilvusContainerImageTags.Image"/> container image.
/// The .NET client library uses the gRPC port by default to communicate and this resource exposes that endpoint.
/// A web-based administration tool for Milvus can also be added using <see cref="WithAttu"/>.
/// </remarks>
Expand Down Expand Up @@ -172,7 +172,7 @@ public static IResourceBuilder<MilvusDatabaseResource> AddDatabase(this IResourc
}

/// <summary>
/// Adds an administration and development platform for Milvus to the application model using Attu. This version the package defaults to the 2.3-latest tag of the attu container image
/// Adds an administration and development platform for Milvus to the application model using Attu. This version of the package defaults to the <inheritdoc cref="MilvusContainerImageTags.AttuTag"/> tag of the <inheritdoc cref="MilvusContainerImageTags.AttuImage"/> container image
/// </summary>
/// <example>
/// Use in application host with a Milvus resource
Expand Down
8 changes: 8 additions & 0 deletions src/Aspire.Hosting.Milvus/MilvusContainerImageTags.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,19 @@ namespace Aspire.Hosting.Milvus;

internal static class MilvusContainerImageTags
{
/// <summary>docker.io</summary>
public const string Registry = "docker.io";

/// <summary>milvusdb/milvus</summary>
public const string Image = "milvusdb/milvus";

/// <summary>v2.4.10</summary>
public const string Tag = "v2.4.10";

/// <summary>zilliz/attu</summary>
public const string AttuImage = "zilliz/attu";

/// <summary>v2.4</summary>
public const string AttuTag = "v2.4";
}

4 changes: 2 additions & 2 deletions src/Aspire.Hosting.MongoDB/MongoDBBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public static class MongoDBBuilderExtensions
private const int DefaultContainerPort = 27017;

/// <summary>
/// Adds a MongoDB resource to the application model. A container is used for local development. This version the package defaults to the 7.0.8 tag of the mongo container image.
/// Adds a MongoDB resource to the application model. A container is used for local development. This version of the package defaults to the <inheritdoc cref="MongoDBContainerImageTags.Tag"/> tag of the <inheritdoc cref="MongoDBContainerImageTags.Image"/> container image.
/// </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>
Expand Down Expand Up @@ -76,7 +76,7 @@ public static IResourceBuilder<MongoDBDatabaseResource> AddDatabase(this IResour
}

/// <summary>
/// Adds a MongoExpress administration and development platform for MongoDB to the application model. This version the package defaults to the 1.0.2-20 tag of the mongo-express container image
/// Adds a MongoExpress administration and development platform for MongoDB to the application model. This version of the package defaults to the <inheritdoc cref="MongoDBContainerImageTags.MongoExpressTag"/> tag of the <inheritdoc cref="MongoDBContainerImageTags.MongoExpressImage"/> container image
/// </summary>
/// <param name="builder">The MongoDB server resource builder.</param>
/// <param name="configureContainer">Configuration callback for Mongo Express container resource.</param>
Expand Down
11 changes: 11 additions & 0 deletions src/Aspire.Hosting.MongoDB/MongoDBContainerImageTags.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,21 @@ namespace Aspire.Hosting.MongoDB;

internal static class MongoDBContainerImageTags
{
/// <summary>docker.io</summary>
public const string Registry = "docker.io";

/// <summary>library/mongo</summary>
public const string Image = "library/mongo";

/// <summary>7.0</summary>
public const string Tag = "7.0";

/// <summary>docker.io</summary>
public const string MongoExpressRegistry = "docker.io";

/// <summary>library/mongo-express</summary>
public const string MongoExpressImage = "library/mongo-express";

/// <summary>1.0</summary>
public const string MongoExpressTag = "1.0";
}
4 changes: 2 additions & 2 deletions src/Aspire.Hosting.MySql/MySqlBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static class MySqlBuilderExtensions
private const string PasswordEnvVarName = "MYSQL_ROOT_PASSWORD";

/// <summary>
/// Adds a MySQL server resource to the application model. For local development a container is used. This version the package defaults to the 8.3.0 tag of the mysql container image
/// Adds a MySQL server resource to the application model. For local development a container is used. This version of the package defaults to the <inheritdoc cref="MySqlContainerImageTags.Tag"/> tag of the <inheritdoc cref="MySqlContainerImageTags.Image"/> container image
/// </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>
Expand Down Expand Up @@ -112,7 +112,7 @@ public static IResourceBuilder<MySqlDatabaseResource> AddDatabase(this IResource
}

/// <summary>
/// Adds a phpMyAdmin administration and development platform for MySql to the application model. This version the package defaults to the 5.2 tag of the phpmyadmin container image
/// Adds a phpMyAdmin administration and development platform for MySql to the application model. This version of the package defaults to the <inheritdoc cref="MySqlContainerImageTags.PhpMyAdminTag"/> tag of the <inheritdoc cref="MySqlContainerImageTags.PhpMyAdminImage"/> container image
/// </summary>
/// <param name="builder">The MySql server resource builder.</param>
/// <param name="configureContainer">Callback to configure PhpMyAdmin container resource.</param>
Expand Down
8 changes: 8 additions & 0 deletions src/Aspire.Hosting.MySql/MySqlContainerImageTags.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,18 @@ namespace Aspire.Hosting.MySql;

internal static class MySqlContainerImageTags
{
/// <summary>docker.io</summary>
public const string Registry = "docker.io";

/// <summary>library/mysql</summary>
public const string Image = "library/mysql";

/// <summary>9.0</summary>
public const string Tag = "9.0";

/// <summary>library/phpmyadmin</summary>
public const string PhpMyAdminImage = "library/phpmyadmin";

/// <summary>5.2</summary>
public const string PhpMyAdminTag = "5.2";
}
5 changes: 5 additions & 0 deletions src/Aspire.Hosting.Oracle/OracleContainerImageTags.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ namespace Aspire.Hosting;

internal static class OracleContainerImageTags
{
/// <summary>container-registry.oracle.com</summary>
public const string Registry = "container-registry.oracle.com";

/// <summary>database/free</summary>
public const string Image = "database/free";

/// <summary>23.5.0.0</summary>
public const string Tag = "23.5.0.0";
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public static class OracleDatabaseBuilderExtensions
private const string PasswordEnvVarName = "ORACLE_PWD";

/// <summary>
/// Adds a Oracle Server resource to the application model. A container is used for local development. This version the package defaults to the 23.3.0.0 tag of the container-registry.oracle.com/database/free container image
/// Adds a Oracle Server resource to the application model. A container is used for local development. This version of the package defaults to the <inheritdoc cref="OracleContainerImageTags.Tag"/> tag of the <inheritdoc cref="OracleContainerImageTags.Registry"/>/<inheritdoc cref="OracleContainerImageTags.Image"/> container image
/// </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>
Expand Down
6 changes: 3 additions & 3 deletions src/Aspire.Hosting.PostgreSQL/PostgresBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public static class PostgresBuilderExtensions
private const string PasswordEnvVarName = "POSTGRES_PASSWORD";

/// <summary>
/// Adds a PostgreSQL resource to the application model. A container is used for local development. This version the package defaults to the 16.2 tag of the postgres container image
/// Adds a PostgreSQL resource to the application model. A container is used for local development. This version of the package defaults to the <inheritdoc cref="PostgresContainerImageTags.Tag"/> tag of the <inheritdoc cref="PostgresContainerImageTags.Image"/> container image
/// </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>
Expand Down Expand Up @@ -153,7 +153,7 @@ public static IResourceBuilder<PostgresDatabaseResource> AddDatabase(this IResou
}

/// <summary>
/// Adds a pgAdmin 4 administration and development platform for PostgreSQL to the application model. This version the package defaults to the 8.8 tag of the dpage/pgadmin4 container image
/// Adds a pgAdmin 4 administration and development platform for PostgreSQL to the application model. This version of the package defaults to the <inheritdoc cref="PostgresContainerImageTags.PgAdminTag"/> tag of the <inheritdoc cref="PostgresContainerImageTags.PgAdminImage"/> container image
/// </summary>
/// <param name="builder">The PostgreSQL server resource builder.</param>
/// <param name="configureContainer">Callback to configure PgAdmin container resource.</param>
Expand Down Expand Up @@ -289,7 +289,7 @@ public static IResourceBuilder<PgWebContainerResource> WithHostPort(this IResour
/// </code>
/// </example>
/// <remarks>
/// This version the package defaults to the 0.15.0 tag of the sosedoff/pgweb container image.
/// This version of the package defaults to the <inheritdoc cref="PostgresContainerImageTags.PgWebTag"/> tag of the <inheritdoc cref="PostgresContainerImageTags.PgWebImage"/> container image.
/// </remarks>
/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
public static IResourceBuilder<PostgresServerResource> WithPgWeb(this IResourceBuilder<PostgresServerResource> builder, Action<IResourceBuilder<PgWebContainerResource>>? configureContainer = null, string? containerName = null)
Expand Down
17 changes: 17 additions & 0 deletions src/Aspire.Hosting.PostgreSQL/PostgresContainerImageTags.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,30 @@ namespace Aspire.Hosting.Postgres;

internal static class PostgresContainerImageTags
{
/// <summary>docker.io</summary>
public const string Registry = "docker.io";

/// <summary>library/postgres</summary>
public const string Image = "library/postgres";

/// <summary>16.4</summary>
public const string Tag = "16.4";

/// <summary>docker.io</summary>
public const string PgAdminRegistry = "docker.io";

/// <summary>dpage/pgadmin4</summary>
public const string PgAdminImage = "dpage/pgadmin4";

/// <summary>8.11</summary>
public const string PgAdminTag = "8.11";

/// <summary>docker.io</summary>
public const string PgWebRegistry = "docker.io";

/// <summary>sosedoff/pgweb</summary>
public const string PgWebImage = "sosedoff/pgweb";

/// <summary>0.15.0</summary>
public const string PgWebTag = "0.15.0";
}
2 changes: 1 addition & 1 deletion src/Aspire.Hosting.Qdrant/QdrantBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public static class QdrantBuilderExtensions
/// Adds a Qdrant resource to the application. A container is used for local development.
/// </summary>
/// <remarks>
/// This version the package defaults to the v1.8.4 tag of the qdrant/qdrant container image.
/// This version of the package defaults to the <inheritdoc cref="QdrantContainerImageTags.Tag"/> tag of the <inheritdoc cref="QdrantContainerImageTags.Image"/> container image.
/// The .NET client library uses the gRPC port by default to communicate and this resource exposes that endpoint.
/// </remarks>
/// <param name="builder">The <see cref="IDistributedApplicationBuilder"/>.</param>
Expand Down
5 changes: 5 additions & 0 deletions src/Aspire.Hosting.Qdrant/QdrantContainerImageTags.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@ namespace Aspire.Hosting.Qdrant;

internal static class QdrantContainerImageTags
{
/// <summary>docker.io</summary>
public const string Registry = "docker.io";

/// <summary>qdrant/qdrant</summary>
public const string Image = "qdrant/qdrant";

/// <summary>v1.11.3</summary>
public const string Tag = "v1.11.3";
}
Loading
Loading