PostaHostingExtensions Methods
ClassMethods19 members
Provides extension methods for adding Posta to an
Hosting.IDistributedApplicationBuilder. AddPosta(IDistributedApplicationBuilder, string, IResourceBuilder<PostgresDatabaseResource>, IResourceBuilder<RedisResource>, IResourceBuilder<ParameterResource>, IResourceBuilder<ParameterResource>, string, int?)Section titled AddPosta(IDistributedApplicationBuilder, string, IResourceBuilder<PostgresDatabaseResource>, IResourceBuilder<RedisResource>, IResourceBuilder<ParameterResource>, IResourceBuilder<ParameterResource>, string, int?)extensionIResourceBuilder<PostaResource> Adds a Posta container resource to the
Hosting.IDistributedApplicationBuilder and configures PostgreSQL and Redis references. public static class PostaHostingExtensions{ public static IResourceBuilder<PostaResource> AddPosta( this IDistributedApplicationBuilder builder, string name, IResourceBuilder<PostgresDatabaseResource> database, IResourceBuilder<RedisResource> redis, IResourceBuilder<ParameterResource>? jwtSecret = null, IResourceBuilder<ParameterResource>? adminPassword = null, string adminEmail = "admin@example.com", int? port = null) { // ... }}Parameters
builderIDistributedApplicationBuilderThe Hosting.IDistributedApplicationBuilder to which the Posta resource will be added.namestringThe name of the Posta container resource.databaseIResourceBuilder<PostgresDatabaseResource>The PostgreSQL database resource used by Posta.redisIResourceBuilder<RedisResource>The Redis resource used by Posta.jwtSecretIResourceBuilder<ParameterResource>optionalOptional parameter used as the Posta JWT signing secret.adminPasswordIResourceBuilder<ParameterResource>optionalOptional parameter used as the initial Posta admin password.adminEmailstringoptionalThe initial Posta admin account email.portint?optionalOptional host port for the Posta HTTP API and dashboard.Returns
IResourceBuilder<PostaResource>A reference to the ApplicationModel.IResourceBuilder`1 for further resource configuration.AddPosta(IDistributedApplicationBuilder, string, IResourceBuilder<PostgresDatabaseResource>, IResourceBuilder<RedisResource>, PostaOptions, IResourceBuilder<ParameterResource>, IResourceBuilder<ParameterResource>, string, int?)Section titled AddPosta(IDistributedApplicationBuilder, string, IResourceBuilder<PostgresDatabaseResource>, IResourceBuilder<RedisResource>, PostaOptions, IResourceBuilder<ParameterResource>, IResourceBuilder<ParameterResource>, string, int?)extensionIResourceBuilder<PostaResource> Adds a Posta container resource to the
Hosting.IDistributedApplicationBuilder with PostgreSQL, Redis, and additional Posta environment configuration. public static class PostaHostingExtensions{ public static IResourceBuilder<PostaResource> AddPosta( this IDistributedApplicationBuilder builder, string name, IResourceBuilder<PostgresDatabaseResource> database, IResourceBuilder<RedisResource> redis, PostaOptions options, IResourceBuilder<ParameterResource>? jwtSecret = null, IResourceBuilder<ParameterResource>? adminPassword = null, string adminEmail = "admin@example.com", int? port = null) { // ... }}Parameters
builderIDistributedApplicationBuilderThe Hosting.IDistributedApplicationBuilder to which the Posta resource will be added.namestringThe name of the Posta container resource.databaseIResourceBuilder<PostgresDatabaseResource>The PostgreSQL database resource used by Posta.redisIResourceBuilder<RedisResource>The Redis resource used by Posta.optionsPostaOptionsThe Posta environment configuration.jwtSecretIResourceBuilder<ParameterResource>optionalOptional parameter used as the Posta JWT signing secret.adminPasswordIResourceBuilder<ParameterResource>optionalOptional parameter used as the initial Posta admin password.adminEmailstringoptionalThe initial Posta admin account email.portint?optionalOptional host port for the Posta HTTP API and dashboard.Returns
IResourceBuilder<PostaResource>A reference to the ApplicationModel.IResourceBuilder`1 for further resource configuration.AddPosta(IDistributedApplicationBuilder, string, IResourceBuilder<PostgresDatabaseResource>, IResourceBuilder<RedisResource>, Action<PostaOptions>, IResourceBuilder<ParameterResource>, IResourceBuilder<ParameterResource>, string, int?)Section titled AddPosta(IDistributedApplicationBuilder, string, IResourceBuilder<PostgresDatabaseResource>, IResourceBuilder<RedisResource>, Action<PostaOptions>, IResourceBuilder<ParameterResource>, IResourceBuilder<ParameterResource>, string, int?)extensionIResourceBuilder<PostaResource> Adds a Posta container resource to the
Hosting.IDistributedApplicationBuilder with PostgreSQL, Redis, and additional Posta environment configuration. public static class PostaHostingExtensions{ public static IResourceBuilder<PostaResource> AddPosta( this IDistributedApplicationBuilder builder, string name, IResourceBuilder<PostgresDatabaseResource> database, IResourceBuilder<RedisResource> redis, Action<PostaOptions> configureOptions, IResourceBuilder<ParameterResource>? jwtSecret = null, IResourceBuilder<ParameterResource>? adminPassword = null, string adminEmail = "admin@example.com", int? port = null) { // ... }}Parameters
builderIDistributedApplicationBuilderThe Hosting.IDistributedApplicationBuilder to which the Posta resource will be added.namestringThe name of the Posta container resource.databaseIResourceBuilder<PostgresDatabaseResource>The PostgreSQL database resource used by Posta.redisIResourceBuilder<RedisResource>The Redis resource used by Posta.configureOptionsAction<PostaOptions>A delegate that configures Posta environment variables.jwtSecretIResourceBuilder<ParameterResource>optionalOptional parameter used as the Posta JWT signing secret.adminPasswordIResourceBuilder<ParameterResource>optionalOptional parameter used as the initial Posta admin password.adminEmailstringoptionalThe initial Posta admin account email.portint?optionalOptional host port for the Posta HTTP API and dashboard.Returns
IResourceBuilder<PostaResource>A reference to the ApplicationModel.IResourceBuilder`1 for further resource configuration.WithDataBindMount(IResourceBuilder<PostaResource>, string, bool)Section titled WithDataBindMount(IResourceBuilder<PostaResource>, string, bool)extensionIResourceBuilder<PostaResource> Adds a bind mount for Posta's filesystem-backed attachment data.
public static class PostaHostingExtensions{ public static IResourceBuilder<PostaResource> WithDataBindMount( this IResourceBuilder<PostaResource> builder, string source, bool isReadOnly = false) { // ... }}Parameters
builderIResourceBuilder<PostaResource>The Posta resource builder.sourcestringThe source directory on the host to mount into the container.isReadOnlybooloptionalIndicates whether the bind mount should be read-only.Returns
IResourceBuilder<PostaResource>A reference to the ApplicationModel.IResourceBuilder`1 for further resource configuration.WithDataVolume(IResourceBuilder<PostaResource>, string?, bool)Section titled WithDataVolume(IResourceBuilder<PostaResource>, string?, bool)extensionIResourceBuilder<PostaResource> Adds a named volume for Posta's filesystem-backed attachment data.
public static class PostaHostingExtensions{ public static IResourceBuilder<PostaResource> WithDataVolume( this IResourceBuilder<PostaResource> builder, string? name = null, bool isReadOnly = false) { // ... }}Parameters
builderIResourceBuilder<PostaResource>The Posta resource builder.namestring?optionalThe name of the volume. Defaults to an auto-generated name based on the application and resource names.isReadOnlybooloptionalIndicates whether the volume should be read-only.Returns
IResourceBuilder<PostaResource>A reference to the ApplicationModel.IResourceBuilder`1 for further resource configuration.WithEmailVerification(IResourceBuilder<PostaResource>, PostaEmailVerificationOptions)Section titled WithEmailVerification(IResourceBuilder<PostaResource>, PostaEmailVerificationOptions)extensionIResourceBuilder<PostaResource> Configures email verification behavior for Posta.
public static class PostaHostingExtensions{ public static IResourceBuilder<PostaResource> WithEmailVerification( this IResourceBuilder<PostaResource> builder, PostaEmailVerificationOptions options) { // ... }}Parameters
builderIResourceBuilder<PostaResource>The Posta resource builder.optionsPostaEmailVerificationOptionsThe parameter-based email verification configuration.Returns
IResourceBuilder<PostaResource>A reference to the ApplicationModel.IResourceBuilder`1 for further resource configuration.WithEmailVerification(IResourceBuilder<PostaResource>, Action<PostaEmailVerificationOptions>)Section titled WithEmailVerification(IResourceBuilder<PostaResource>, Action<PostaEmailVerificationOptions>)extensionIResourceBuilder<PostaResource> Configures email verification behavior for Posta.
public static class PostaHostingExtensions{ public static IResourceBuilder<PostaResource> WithEmailVerification( this IResourceBuilder<PostaResource> builder, Action<PostaEmailVerificationOptions> configureOptions) { // ... }}Parameters
builderIResourceBuilder<PostaResource>The Posta resource builder.configureOptionsAction<PostaEmailVerificationOptions>A delegate that configures the parameter-based email verification options.Returns
IResourceBuilder<PostaResource>A reference to the ApplicationModel.IResourceBuilder`1 for further resource configuration.WithGoogleOAuth(IResourceBuilder<PostaResource>, PostaGoogleOAuthOptions)Section titled WithGoogleOAuth(IResourceBuilder<PostaResource>, PostaGoogleOAuthOptions)extensionIResourceBuilder<PostaResource> Configures Google OAuth login for Posta.
public static class PostaHostingExtensions{ public static IResourceBuilder<PostaResource> WithGoogleOAuth( this IResourceBuilder<PostaResource> builder, PostaGoogleOAuthOptions options) { // ... }}Parameters
builderIResourceBuilder<PostaResource>The Posta resource builder.optionsPostaGoogleOAuthOptionsThe parameter-based Google OAuth configuration.Returns
IResourceBuilder<PostaResource>A reference to the ApplicationModel.IResourceBuilder`1 for further resource configuration.WithGoogleOAuth(IResourceBuilder<PostaResource>, Action<PostaGoogleOAuthOptions>)Section titled WithGoogleOAuth(IResourceBuilder<PostaResource>, Action<PostaGoogleOAuthOptions>)extensionIResourceBuilder<PostaResource> Configures Google OAuth login for Posta.
public static class PostaHostingExtensions{ public static IResourceBuilder<PostaResource> WithGoogleOAuth( this IResourceBuilder<PostaResource> builder, Action<PostaGoogleOAuthOptions> configureOptions) { // ... }}Parameters
builderIResourceBuilder<PostaResource>The Posta resource builder.configureOptionsAction<PostaGoogleOAuthOptions>A delegate that configures the parameter-based Google OAuth options.Returns
IResourceBuilder<PostaResource>A reference to the ApplicationModel.IResourceBuilder`1 for further resource configuration.WithInboundSmtp(IResourceBuilder<PostaResource>, PostaInboundSmtpOptions, int?, int)Section titled WithInboundSmtp(IResourceBuilder<PostaResource>, PostaInboundSmtpOptions, int?, int)extensionIResourceBuilder<PostaResource> Configures the built-in inbound SMTP receiver used by Posta.
public static class PostaHostingExtensions{ public static IResourceBuilder<PostaResource> WithInboundSmtp( this IResourceBuilder<PostaResource> builder, PostaInboundSmtpOptions options, int? port = null, int targetPort = 2525) { // ... }}Parameters
builderIResourceBuilder<PostaResource>The Posta resource builder.optionsPostaInboundSmtpOptionsThe parameter-based inbound SMTP configuration.portint?optionalOptional host port for the inbound SMTP endpoint.targetPortintoptionalThe port on which Posta listens for inbound SMTP inside the container. This must match PostaInboundSmtpOptions.Port when that option is supplied.Returns
IResourceBuilder<PostaResource>A reference to the ApplicationModel.IResourceBuilder`1 for further resource configuration.WithInboundSmtp(IResourceBuilder<PostaResource>, Action<PostaInboundSmtpOptions>, int?, int)Section titled WithInboundSmtp(IResourceBuilder<PostaResource>, Action<PostaInboundSmtpOptions>, int?, int)extensionIResourceBuilder<PostaResource> Configures the built-in inbound SMTP receiver used by Posta.
public static class PostaHostingExtensions{ public static IResourceBuilder<PostaResource> WithInboundSmtp( this IResourceBuilder<PostaResource> builder, Action<PostaInboundSmtpOptions> configureOptions, int? port = null, int targetPort = 2525) { // ... }}Parameters
builderIResourceBuilder<PostaResource>The Posta resource builder.configureOptionsAction<PostaInboundSmtpOptions>A delegate that configures the parameter-based inbound SMTP options.portint?optionalOptional host port for the inbound SMTP endpoint.targetPortintoptionalThe port on which Posta listens for inbound SMTP inside the container. This must match PostaInboundSmtpOptions.Port when that option is supplied.Returns
IResourceBuilder<PostaResource>A reference to the ApplicationModel.IResourceBuilder`1 for further resource configuration.WithReference(IResourceBuilder<PostaResource>, IResourceBuilder<PostgresDatabaseResource>)Section titled WithReference(IResourceBuilder<PostaResource>, IResourceBuilder<PostgresDatabaseResource>)extensionIResourceBuilder<PostaResource> Configures the PostgreSQL database used by Posta.
public static class PostaHostingExtensions{ public static IResourceBuilder<PostaResource> WithReference( this IResourceBuilder<PostaResource> builder, IResourceBuilder<PostgresDatabaseResource> database) { // ... }}Parameters
builderIResourceBuilder<PostaResource>The Posta resource builder.databaseIResourceBuilder<PostgresDatabaseResource>The PostgreSQL database resource used by Posta.Returns
IResourceBuilder<PostaResource>A reference to the ApplicationModel.IResourceBuilder`1 for further resource configuration.WithReference(IResourceBuilder<PostaResource>, IResourceBuilder<RedisResource>, IResourceBuilder<ParameterResource>)Section titled WithReference(IResourceBuilder<PostaResource>, IResourceBuilder<RedisResource>, IResourceBuilder<ParameterResource>)extensionIResourceBuilder<PostaResource> Configures the Redis server used by Posta.
public static class PostaHostingExtensions{ public static IResourceBuilder<PostaResource> WithReference( this IResourceBuilder<PostaResource> builder, IResourceBuilder<RedisResource> redis, IResourceBuilder<ParameterResource>? redisPassword = null) { // ... }}Parameters
builderIResourceBuilder<PostaResource>The Posta resource builder.redisIResourceBuilder<RedisResource>The Redis resource used by Posta.redisPasswordIResourceBuilder<ParameterResource>optionalOptional Redis password parameter that overrides the referenced Redis resource password.Returns
IResourceBuilder<PostaResource>A reference to the ApplicationModel.IResourceBuilder`1 for further resource configuration.WithS3BlobStorage(IResourceBuilder<PostaResource>, PostaS3BlobStorageOptions)Section titled WithS3BlobStorage(IResourceBuilder<PostaResource>, PostaS3BlobStorageOptions)extensionIResourceBuilder<PostaResource> Configures S3-compatible attachment storage for Posta.
public static class PostaHostingExtensions{ public static IResourceBuilder<PostaResource> WithS3BlobStorage( this IResourceBuilder<PostaResource> builder, PostaS3BlobStorageOptions options) { // ... }}Parameters
builderIResourceBuilder<PostaResource>The Posta resource builder.optionsPostaS3BlobStorageOptionsThe parameter-based S3 blob storage configuration.Returns
IResourceBuilder<PostaResource>A reference to the ApplicationModel.IResourceBuilder`1 for further resource configuration.WithS3BlobStorage(IResourceBuilder<PostaResource>, Action<PostaS3BlobStorageOptions>)Section titled WithS3BlobStorage(IResourceBuilder<PostaResource>, Action<PostaS3BlobStorageOptions>)extensionIResourceBuilder<PostaResource> Configures S3-compatible attachment storage for Posta.
public static class PostaHostingExtensions{ public static IResourceBuilder<PostaResource> WithS3BlobStorage( this IResourceBuilder<PostaResource> builder, Action<PostaS3BlobStorageOptions> configureOptions) { // ... }}Parameters
builderIResourceBuilder<PostaResource>The Posta resource builder.configureOptionsAction<PostaS3BlobStorageOptions>A delegate that configures the parameter-based S3 blob storage options.Returns
IResourceBuilder<PostaResource>A reference to the ApplicationModel.IResourceBuilder`1 for further resource configuration.WithSmtpRelay(IResourceBuilder<PostaResource>, PostaSmtpRelayOptions, int?, int)Section titled WithSmtpRelay(IResourceBuilder<PostaResource>, PostaSmtpRelayOptions, int?, int)extensionIResourceBuilder<PostaResource> Configures and exposes Posta's authenticated SMTP relay.
public static class PostaHostingExtensions{ public static IResourceBuilder<PostaResource> WithSmtpRelay( this IResourceBuilder<PostaResource> builder, PostaSmtpRelayOptions options, int? port = null, int targetPort = 2526) { // ... }}Parameters
builderIResourceBuilder<PostaResource>The Posta resource builder.optionsPostaSmtpRelayOptionsThe parameter-based SMTP relay configuration.portint?optionalOptional host port.targetPortintoptionalThe relay port inside the container.Returns
IResourceBuilder<PostaResource>The Posta resource builder.WithSmtpRelay(IResourceBuilder<PostaResource>, Action<PostaSmtpRelayOptions>, int?, int)Section titled WithSmtpRelay(IResourceBuilder<PostaResource>, Action<PostaSmtpRelayOptions>, int?, int)extensionIResourceBuilder<PostaResource> Configures and exposes Posta's authenticated SMTP relay.
public static class PostaHostingExtensions{ public static IResourceBuilder<PostaResource> WithSmtpRelay( this IResourceBuilder<PostaResource> builder, Action<PostaSmtpRelayOptions> configureOptions, int? port = null, int targetPort = 2526) { // ... }}Parameters
builderIResourceBuilder<PostaResource>The Posta resource builder.configureOptionsAction<PostaSmtpRelayOptions>A delegate that configures the SMTP relay.portint?optionalOptional host port.targetPortintoptionalThe relay port inside the container.Returns
IResourceBuilder<PostaResource>The Posta resource builder.WithSystemSmtp(IResourceBuilder<PostaResource>, PostaSystemSmtpOptions)Section titled WithSystemSmtp(IResourceBuilder<PostaResource>, PostaSystemSmtpOptions)extensionIResourceBuilder<PostaResource> Configures the system SMTP server used by Posta for platform notifications.
public static class PostaHostingExtensions{ public static IResourceBuilder<PostaResource> WithSystemSmtp( this IResourceBuilder<PostaResource> builder, PostaSystemSmtpOptions options) { // ... }}Parameters
builderIResourceBuilder<PostaResource>The Posta resource builder.optionsPostaSystemSmtpOptionsThe parameter-based system SMTP configuration.Returns
IResourceBuilder<PostaResource>A reference to the ApplicationModel.IResourceBuilder`1 for further resource configuration.WithSystemSmtp(IResourceBuilder<PostaResource>, Action<PostaSystemSmtpOptions>)Section titled WithSystemSmtp(IResourceBuilder<PostaResource>, Action<PostaSystemSmtpOptions>)extensionIResourceBuilder<PostaResource> Configures the system SMTP server used by Posta for platform notifications.
public static class PostaHostingExtensions{ public static IResourceBuilder<PostaResource> WithSystemSmtp( this IResourceBuilder<PostaResource> builder, Action<PostaSystemSmtpOptions> configureOptions) { // ... }}Parameters
builderIResourceBuilder<PostaResource>The Posta resource builder.configureOptionsAction<PostaSystemSmtpOptions>A delegate that configures the parameter-based system SMTP options.Returns
IResourceBuilder<PostaResource>A reference to the ApplicationModel.IResourceBuilder`1 for further resource configuration.