5 instantiations of PostgresServerResource
Aspire.Hosting.PostgreSQL (1)
PostgresBuilderExtensions.cs (1)
51
var postgresServer = new
PostgresServerResource
(name, userName?.Resource, passwordParameter);
Aspire.Hosting.PostgreSQL.Tests (4)
PostgrePublicApiTests.cs (4)
80
var postgresParentResource = new
PostgresServerResource
("PostgresServer", default(ParameterResource?), parameterResource.Resource);
95
var postgresParentResource = new
PostgresServerResource
("PostgresServer", default(ParameterResource?), parameterResource.Resource);
123
var action = () => new
PostgresServerResource
(name, default(ParameterResource?), password.Resource);
135
var action = () => new
PostgresServerResource
(name, default(ParameterResource?), password);
43 references to PostgresServerResource
Aspire.Hosting.Azure.PostgreSQL (12)
AzurePostgresExtensions.cs (8)
19
private static IResourceBuilder<T> WithLoginAndPassword<T>(this IResourceBuilder<T> builder,
PostgresServerResource
postgresResource) where T : AzureBicepResource
31
private static IResourceBuilder<
PostgresServerResource
> PublishAsAzurePostgresFlexibleServerInternal(
32
this IResourceBuilder<
PostgresServerResource
> builder,
95
public static IResourceBuilder<
PostgresServerResource
> PublishAsAzurePostgresFlexibleServer(
96
this IResourceBuilder<
PostgresServerResource
> builder)
107
public static IResourceBuilder<
PostgresServerResource
> AsAzurePostgresFlexibleServer(
108
this IResourceBuilder<
PostgresServerResource
> builder)
205
public static IResourceBuilder<AzurePostgresFlexibleServerResource> RunAsContainer(this IResourceBuilder<AzurePostgresFlexibleServerResource> builder, Action<IResourceBuilder<
PostgresServerResource
>>? configureContainer = null)
AzurePostgresFlexibleServerResource.cs (2)
42
internal
PostgresServerResource
? InnerResource { get; private set; }
76
internal void SetInnerResource(
PostgresServerResource
innerResource)
AzurePostgresResource.cs (2)
11
/// <param name="innerResource"><see cref="
PostgresServerResource
"/> that this resource wraps.</param>
14
public class AzurePostgresResource(
PostgresServerResource
innerResource, Action<AzureResourceInfrastructure> configureInfrastructure) :
Aspire.Hosting.PostgreSQL (21)
PostgresBuilderExtensions.cs (16)
40
public static IResourceBuilder<
PostgresServerResource
> AddPostgres(this IDistributedApplicationBuilder builder,
51
var
postgresServer = new PostgresServerResource(name, userName?.Resource, passwordParameter);
78
.WithEndpoint(port: port, targetPort: 5432, name:
PostgresServerResource
.PrimaryEndpointName) // Internal port is always 5432.
105
/// Note that by default calling <see cref="AddDatabase(IResourceBuilder{
PostgresServerResource
}, string, string?)"/>
111
public static IResourceBuilder<PostgresDatabaseResource> AddDatabase(this IResourceBuilder<
PostgresServerResource
> builder, [ResourceName] string name, string? databaseName = null)
134
public static IResourceBuilder<T> WithPgAdmin<T>(this IResourceBuilder<T> builder, Action<IResourceBuilder<PgAdminContainerResource>>? configureContainer = null, string? containerName = null) where T :
PostgresServerResource
161
var postgresInstances = builder.ApplicationBuilder.Resources.OfType<
PostgresServerResource
>();
178
foreach (
var
postgresInstance in postgresInstances)
270
public static IResourceBuilder<
PostgresServerResource
> WithPgWeb(this IResourceBuilder<
PostgresServerResource
> builder, Action<IResourceBuilder<PgWebContainerResource>>? configureContainer = null, string? containerName = null)
359
public static IResourceBuilder<
PostgresServerResource
> WithDataVolume(this IResourceBuilder<
PostgresServerResource
> builder, string? name = null, bool isReadOnly = false)
374
public static IResourceBuilder<
PostgresServerResource
> WithDataBindMount(this IResourceBuilder<
PostgresServerResource
> builder, string source, bool isReadOnly = false)
389
public static IResourceBuilder<
PostgresServerResource
> WithInitBindMount(this IResourceBuilder<
PostgresServerResource
> builder, string source, bool isReadOnly = true)
PostgresDatabaseResource.cs (4)
10
/// A resource that represents a PostgreSQL database. This is a child resource of a <see cref="
PostgresServerResource
"/>.
15
public class PostgresDatabaseResource(string name, string databaseName,
PostgresServerResource
postgresParentResource) : Resource(ThrowIfNull(name)), IResourceWithParent<
PostgresServerResource
>, IResourceWithConnectionString
20
public
PostgresServerResource
Parent { get; } = ThrowIfNull(postgresParentResource);
PostgresServerResource.cs (1)
18
/// Initializes a new instance of the <see cref="
PostgresServerResource
"/> class.
Aspire.Hosting.PostgreSQL.Tests (10)
AddPostgresTests.cs (2)
178
var
postgresResource = Assert.Single(appModel.Resources.OfType<
PostgresServerResource
>());
PostgrePublicApiTests.cs (8)
16
IResourceBuilder<
PostgresServerResource
> builder = null!;
80
var
postgresParentResource = new PostgresServerResource("PostgresServer", default(ParameterResource?), parameterResource.Resource);
95
var
postgresParentResource = new PostgresServerResource("PostgresServer", default(ParameterResource?), parameterResource.Resource);
108
PostgresServerResource
postgresParentResource = null!;
144
IResourceBuilder<
PostgresServerResource
> builder = null!;
169
IResourceBuilder<
PostgresServerResource
> builder = null!;
191
IResourceBuilder<
PostgresServerResource
> builder = null!;
216
IResourceBuilder<
PostgresServerResource
> builder = null!;