Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

WithDatabase

Method
📦 CommunityToolkit.Aspire.Hosting.Logto v13.6.1
func (LogtoResource) WithDatabase(
postgres PostgresServerResource,
options ...*WithDatabaseOptions,
) LogtoResource

Signature

methodWithDatabasebuilder
Configures the Logto resource to connect to the specified PostgreSQL database.
WithDatabase(
postgres PostgresServerResource,
options ...*WithDatabaseOptions,
) LogtoResource
postgresPostgresServerResourceThe resource builder for the PostgreSQL server to connect to.
options...*WithDatabaseOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithDatabaseOptions argument.

DatabaseName*stringThe PostgreSQL database name Logto should use.
LogtoResource

The resource builder for the configured Logto resource.

Returns a handle; failures surface later via Err().

Applies to

This method applies to the following types: