Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

LogtoResource

Handle
📦 CommunityToolkit.Aspire.Hosting.Logto v13.6.1

Represents a containerized resource specific to Logto that extends the base functionality of container resources by providing additional endpoint and connection string management.

type LogtoResource interface {
ExpressionValue
IComputeResource
Resource
ResourceWithArgs
ResourceWithConnectionString
ResourceWithEndpoints
ResourceWithEnvironment
ResourceWithWaitSupport
}

Properties

propertyConnectionStringExpression*ReferenceExpressionget
Gets the ConnectionStringExpression property
ConnectionStringExpression() *ReferenceExpression
propertyHostEndpointReferenceExpressionget
Gets the Host property
Host() EndpointReferenceExpression
propertyPortEndpointReferenceExpressionget
Gets the Port property
Port() EndpointReferenceExpression
propertyPrimaryEndpointEndpointReferenceget
Gets the PrimaryEndpoint property
PrimaryEndpoint() EndpointReference
propertyUriExpression*ReferenceExpressionget
Gets the connection URI expression for the Logto container resource.
UriExpression() *ReferenceExpression

Methods

methodWithAdminEndpointbuilder
Configures the specified Logto resource to include an administrative endpoint with the given URL.
WithAdminEndpoint(url string) LogtoResource
urlstringThe URL of the administrative endpoint to be used for the Logto resource.
LogtoResource

The resource builder for the configured Logto resource.

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

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().

methodWithDatabaseSeedingbuilder
Starts Logto by running the database seed command before the application process.
WithDatabaseSeeding() LogtoResource
LogtoResource

The resource builder for the configured Logto resource.

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

methodWithDataBindMountbuilder
Configures the Logto resource to use a data bind mount with the specified source directory.
WithDataBindMount(source string) LogtoResource
sourcestringThe host directory to be mounted as the data volume.
LogtoResource

The resource builder for the configured Logto resource.

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

methodWithDataVolumebuilder
Configures the Logto resource with a data volume, allowing persistent storage.
WithDataVolume(options ...*WithDataVolumeOptions) LogtoResource
options...*WithDataVolumeOptionsOptional settings, described under Options.

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

Name*stringThe optional name of the data volume. If not provided, a default name is generated.
LogtoResource

The resource builder configured with the specified data volume.

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

Enables Node.js deprecation tracing for the Logto by setting the NODE_OPTIONS environment variable to '--trace-deprecation'. This allows stack traces to be printed for deprecated API usage.
WithDeprecationTracing() LogtoResource
LogtoResource

The resource builder for the configured Logto resource.

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

Configures the Logto resource to disable the Admin Console port.
WithDisableAdminConsole(disable bool) LogtoResource
disableboolA value indicating whether to disable the Admin Console port.
LogtoResource

The resource builder for the configured Logto resource.

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

methodWithNodeEnvbuilder
Configures the Logto resource to use the specified Node.js environment value by setting the corresponding environment variable.
WithNodeEnv(env string) LogtoResource
envstringThe value of the Node.js environment variable to set, typically "development", "production", or "test".
LogtoResource

The resource builder for the configured Logto resource.

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

methodWithRedisbuilder
Configures the Logto resource to use a specified Redis resource for caching or other functionality.
WithRedis(redis RedisResource) LogtoResource
redisRedisResourceThe resource builder for the Redis resource to be used by the Logto resource.
LogtoResource

The resource builder configured with the specified Redis resource.

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

methodWithResourcePortbuilder
Configures HTTP endpoints for the given Logto resource builder with specified port settings.
WithResourcePort(options ...*WithResourcePortOptions) LogtoResource
options...*WithResourcePortOptionsOptional settings, described under Options.

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

Port*float64The host port to be configured for the primary endpoint. If null, Aspire will assign a random host port.
AdminPort*float64The host port to be configured for the administrative endpoint. If null, Aspire will assign a random host port.
LogtoResource

The updated resource builder with the configured HTTP endpoints.

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

methodWithSecretVaultbuilder
Configures the Logto resource to use a secret vault with the specified key encryption key (KEK).
WithSecretVault(secretVaultKek string) LogtoResource
secretVaultKekstringThe base64-encoded key encryption key (KEK) for the secret vault.
LogtoResource

The resource builder for the configured Logto resource.

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

Specifies whether the username is case-sensitive.
WithSensitiveUsername(sensitiveUsername bool) LogtoResource
sensitiveUsernameboolA value indicating whether usernames should be treated as case-sensitive.
LogtoResource

The updated resource builder with the configured case-sensitivity setting.

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

Configures the Logto resource to enable or disable the trust proxy header behavior.
WithTrustProxyHeader(trustProxyHeader bool) LogtoResource
trustProxyHeaderboolA value indicating whether to trust the proxy header.
LogtoResource

The resource builder for the configured Logto resource.

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