Help us shape the future of Go! Take the 2026 Go Developer Survey

application

package
v0.5.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2026 License: MIT Imports: 92 Imported by: 0

Documentation

Overview

Package application assembles configured Foundry services, domain declarations and runtime kernels without consumer-written infrastructure factories. Feature packages do not import it.

Index

Constants

View Source
const AttachmentProvider foundation.ProviderID = "foundry.application.attachments"
View Source
const AuditProvider foundation.ProviderID = "foundry.application.audit"
View Source
const AuthorizationProvider foundation.ProviderID = "foundry.application.authorization"

AuthorizationProvider owns the application's shared authorization registry.

View Source
const EncryptionProvider foundation.ProviderID = "foundry.application.encryption"
View Source
const EventDeclarationsProvider foundation.ProviderID = "foundry.application.listeners"
View Source
const EventListenerQueueProvider foundation.ProviderID = "foundry.application.events.listener-queue"
View Source
const EventOutboxProvider foundation.ProviderID = "foundry.application.events.outbox"
View Source
const EventProvider foundation.ProviderID = "foundry.application.events"
View Source
const ExtensionProvider foundation.ProviderID = "foundry.application.extensions"
View Source
const FeatureDeclarationsProvider foundation.ProviderID = "foundry.application.feature-declarations"
View Source
const HTTPProvider foundation.ProviderID = "foundry.application.http"
View Source
const HealthProvider foundation.ProviderID = "foundry.application.health"
View Source
const IdempotencyProvider foundation.ProviderID = "foundry.application.idempotency"
View Source
const ImageProvider foundation.ProviderID = "foundry.application.image"
View Source
const JobArchiveProvider foundation.ProviderID = "foundry.application.jobs.archive"
View Source
const JobDeclarationsProvider foundation.ProviderID = "foundry.application.jobs"
View Source
const LocaleProvider foundation.ProviderID = "foundry.application.locales"
View Source
const MFAProvider foundation.ProviderID = "foundry.application.mfa"
View Source
const MaintenanceProvider foundation.ProviderID = "foundry.application.maintenance"
View Source
const MetricsProvider foundation.ProviderID = "foundry.application.metrics"
View Source
const NotificationProvider foundation.ProviderID = "foundry.application.notifications"
View Source
const OutboxProvider foundation.ProviderID = "foundry.application.outbox"
View Source
const ProbeProvider foundation.ProviderID = "foundry.application.probes"
View Source
const Provider foundation.ProviderID = "foundry.application"
View Source
const RealtimeProvider foundation.ProviderID = "foundry.application.realtime"
View Source
const RealtimePublisherProvider foundation.ProviderID = "foundry.application.realtime.publisher"
View Source
const ReportProvider foundation.ProviderID = "foundry.application.reports"
View Source
const RouterProvider foundation.ProviderID = "foundry.application.router"
View Source
const SchedulerProvider foundation.ProviderID = "foundry.application.scheduler"
View Source
const SessionProvider foundation.ProviderID = "foundry.application.sessions"
View Source
const StickyReadsMiddlewareID http.MiddlewareID = "foundry.database.sticky_reads"

StickyReadsMiddlewareID identifies the database.StickyReadsHandler that the configured HTTP kernel installs outermost when a database connection with a read pool sets sticky_read_window.

View Source
const TokenProvider foundation.ProviderID = "foundry.application.tokens"
View Source
const WorkerProvider foundation.ProviderID = "foundry.application.worker"

Variables

View Source
var AuditScopeKey = foundation.NewKey[*audit.Scope](string(AuditProvider) + ".scope")

AuthorizationKey is the application-owned registry of contributed guards, policies, permissions and hooks. Plugins and providers contribute with auth.RegisterAuthorization(r, AuthorizationKey, declaration) or Authorization. Configured browser/token guards extend it, so every policy and permission registered here is available to their routes. Its Config is Features.Auth.Registry.

EncryptionKey resolves the application key ring when Encryption.KeyID is set.

View Source
var HTTPKey = foundation.NewKey[*http.Server]("foundry.application.http")
View Source
var ImageKey = foundation.NewKey[*imaging.Engine]("foundry.application.image")

MaintenanceKey resolves the application's admission gate. It exists whether or not observability is enabled.

View Source
var MaintenanceStoreKey = foundation.NewKey[maintenance.Store](string(MaintenanceProvider) + ".store")

MaintenanceStoreKey resolves the shared maintenance store when Store is set.

View Source
var MetadataKey = foundation.NewKey[*metadata.Manager]("foundry.application.metadata")

ProbeKey resolves the diagnostics runtime backing the public probe routes.

View Source
var RouterKey = foundation.NewKey[*http.Router]("foundry.application.router")
View Source
var SettingsKey = foundation.NewKey[*settings.Manager]("foundry.application.settings")
View Source
var TranslationKey = foundation.NewKey[*translations.Manager]("foundry.application.translations")

Functions

func AboutCommand

func AboutCommand(name cli.Name, settings Settings) (cli.Declaration, error)

AboutCommand describes the framework version, Go toolchain and the configured kernels/service drivers from settings. It prints names and drivers only: hosts, users, credentials and paths are never included. It performs no I/O beyond writing output, so it can run before Build.

func AuditCommand

func AuditCommand() (cli.Declaration, error)

AuditCommand declares the explicit `audit prune` operator command. It resolves the configured audit scope after boot and removes history in bounded transactions using the configured retention or an explicit --before cutoff. Register it in the application's CLI registry; nothing prunes automatically.

func Authorization

func Authorization(id foundation.ProviderID, declarations ...AuthorizationDeclaration) foundation.Provider

Authorization returns a provider contributing application policies and permissions to the shared registry, for example application.New(s).Register(application.Authorization("app.authorization", application.Authorize(ViewAccount), application.Authorize(ReadOrder))).

func BrowserGuardSettingsConfigSchema

func BrowserGuardSettingsConfigSchema() (*config.Schema[BrowserGuardSettings], error)

BrowserGuardSettingsConfigSchema reuses the shared file/environment/override loader.

func EncryptionKeySettingsConfigSchema

func EncryptionKeySettingsConfigSchema() (*config.Schema[EncryptionKeySettings], error)

EncryptionKeySettingsConfigSchema reuses the shared file/environment/override loader.

func MFACommand

func MFACommand() (cli.Declaration, error)

MFACommand declares the `mfa reencrypt` operator command. After adding a new active key (keeping the old one in Encryption.Previous), it re-encrypts every stored factor under the active key in bounded batches without any user's password. Remove the previous key only after it reports complete with no failures. Register it in the application's CLI registry.

func MaintenanceCommands

func MaintenanceCommands() ([]cli.Declaration, error)

MaintenanceCommands returns the `down` and `up` operator commands. They run while maintenance is paused and publish to the configured shared store, which every instance polls; without Maintenance.Store they fail with fault.Missing. Register them in the application's CLI registry and run them through the ordinary CLI kernel.

func MessageDefinitions

func MessageDefinitions() []i18n.MessageDefinition

MessageDefinitions returns the framework message definitions a configured application's catalog registers: validation rules, HTTP errors and input decoding, and pagination labels. An application that builds its own catalog declares them beside its own messages, so later framework additions reach it as well. The result is owned by the caller.

func RedisKeysCommand

func RedisKeysCommand(name cli.Name, builder *Builder) (cli.Declaration, error)

RedisKeysCommand snapshots the configured inventory for a service-free CLI registry, following AboutCommand. Use the name "redis.keys" by convention. Register this command before Build and execute it without starting services.

func Resolve

func Resolve[T any](s Services, key foundation.Key[T]) (T, error)

Resolve resolves a typed service from the application's resolver.

func SettingsConfigSchema

func SettingsConfigSchema() (*config.Schema[Settings], error)

SettingsConfigSchema reuses the shared file/environment/override loader.

Types

type About

type About struct {
	Framework   string            `json:"framework"`
	Go          string            `json:"go"`
	Platform    string            `json:"platform"`
	Application string            `json:"application"`
	Environment string            `json:"environment"`
	TimeZone    string            `json:"time_zone"`
	Kernels     map[string]string `json:"kernels"`
	Maintenance string            `json:"maintenance"`
	Services    map[string]string `json:"services"`
}

About is the secret-free application summary printed by AboutCommand.

type App

type App struct {
	*foundation.App
	// contains filtered or unexported fields
}

App retains the existing lifecycle and kernel contract. Each Build constructs independent resources. HTTPReady reports the actual bound listener address.

func (*App) HTTPReady

func (a *App) HTTPReady(ctx context.Context) (string, error)

HTTPReady waits for the HTTP server's ready address, returning a missing fault when HTTP is unavailable.

func (*App) Migrations

func (a *App) Migrations() []infrastructure.MigrationTarget

Migrations returns owned copies of the enabled framework feature targets followed by the Builder.Migrations targets. Explicit tooling such as RunDatabaseCommand and the PostgreSQL testkit applies them; boot never does.

func (*App) Models

func (a *App) Models() []slots.Declaration

Models returns the model extension declarations registered with Builder.Models, for declaration inspection. The slice is an owned copy.

func (*App) RealtimeReady

func (a *App) RealtimeReady(ctx context.Context) (string, error)

RealtimeReady waits for the realtime hub's ready address, or returns an error if realtime is unavailable.

func (*App) Resources

func (a *App) Resources() Services

Resources returns the application's service accessors.

func (*App) RunDatabaseCommand

func (a *App) RunDatabaseCommand(ctx context.Context, invocation dbcommand.Command, resources DatabaseCommandResources, output io.Writer) (err error)

RunDatabaseCommand runs one parsed database command against the connection it selects with --database, or the default connection. It needs only a built application: it never starts providers, prepares just that connection's primary pool and closes it before returning, so unrelated services need not be reachable. The pool connects only for a command that needs the database; migrate show, seed list and prune list read their registries without I/O. It uses the application's encryption key ring, if any, for encrypted model fields. Every App.Migrations() group on that database gets a runner that keeps history in <schema>.schema_migrations and executes with that schema as its search path; --schema selects one. Status stays read-only and creates no history table. Up runs the schemas in order and stops at the first failure.

type AttachmentSettings

type AttachmentSettings struct {
	Enabled bool
	Config  attachments.Config
}

AttachmentSettings configures the attachment feature.

type AuditSettings

type AuditSettings struct {
	Enabled  bool
	Database database.ConnectionName
	Schema   string
	Config   audit.Config
}

AuditSettings configures the audit recorder and its database schema.

type AuthSettings

type AuthSettings struct {
	Registry          auth.Config
	Sessions          SessionSettings
	Tokens            TokenSettings
	MFA               MFASettings
	Browser           BrowserSettings
	DefaultTokenGuard auth.GuardName
}

AuthSettings configures authentication registries, stores, and default guards.

func DefaultAuthSettings

func DefaultAuthSettings() AuthSettings

DefaultAuthSettings returns the default authentication configuration.

type AuthorizationDeclaration

type AuthorizationDeclaration struct {
	// contains filtered or unexported fields
}

AuthorizationDeclaration is one typed contribution to AuthorizationKey. Its concrete declaration type is retained for foundation override validation.

func Authorize

func Authorize[D authorizationDeclaration](declaration D) AuthorizationDeclaration

Authorize wraps a typed guard, policy, permission or Before/After hook for Authorization. Construction performs no validation; registration does.

type BrowserGuard

type BrowserGuard[M model.Identifiable, K any] struct {
	Sessions *session.Sessions[M, K]
	Browser  *http.BrowserSessions[M, K]
	Binding  http.GuardBinding[M]
}

BrowserGuard retains one concrete actor across session issuance, browser policy and its route-group default. Authentication is distinct from resource policy. Its registry extends the application's AuthorizationKey registry, so routes can use WithPermissions and handlers can authorize with contributed policies.

func NewBrowserGuard

func NewBrowserGuard[M model.Identifiable, K any](s Services, name auth.GuardName, provider auth.Provider[M, K], source auth.CredentialName) (BrowserGuard[M, K], error)

NewBrowserGuard constructs a browser guard using the configured session store and policy. An empty name selects the default browser guard.

type BrowserGuardSettings

type BrowserGuardSettings struct {
	Cookie  http.CookieName
	Options http.CookieOptions
	CSRF    http.CSRFConfig
}

BrowserGuardSettings configures a browser guard's session cookie and CSRF protection.

func DefaultBrowserGuardSettings

func DefaultBrowserGuardSettings(name auth.GuardName) BrowserGuardSettings

DefaultBrowserGuardSettings returns browser session defaults with a host cookie named for the guard.

type BrowserGuardSettingsCSRFConfigKeySet

type BrowserGuardSettingsCSRFConfigKeySet struct {
	// TrustedOrigins selects csrf.trusted_origins. Set accepts []http.Origin.
	TrustedOrigins config.Key[BrowserGuardSettings, []http.Origin]
}

BrowserGuardSettingsCSRFConfigKeySet exposes compiler-checked configuration overrides.

type BrowserGuardSettingsConfigKeySet

type BrowserGuardSettingsConfigKeySet struct {
	// Cookie selects cookie. Set accepts http.CookieName.
	Cookie  config.Key[BrowserGuardSettings, http.CookieName]
	Options BrowserGuardSettingsOptionsConfigKeySet
	CSRF    BrowserGuardSettingsCSRFConfigKeySet
}

BrowserGuardSettingsConfigKeySet exposes compiler-checked configuration overrides.

func BrowserGuardSettingsConfigKeys

func BrowserGuardSettingsConfigKeys() BrowserGuardSettingsConfigKeySet

BrowserGuardSettingsConfigKeys derives keys from the handwritten settings declaration.

type BrowserGuardSettingsOptionsConfigKeySet

type BrowserGuardSettingsOptionsConfigKeySet struct {
	// Path selects options.path. Set accepts string.
	Path config.Key[BrowserGuardSettings, string]
	// Domain selects options.domain. Set accepts string.
	Domain config.Key[BrowserGuardSettings, string]
	// Secure selects options.secure. Set accepts bool.
	Secure config.Key[BrowserGuardSettings, bool]
	// HTTPOnly selects options.http_only. Set accepts bool.
	HTTPOnly config.Key[BrowserGuardSettings, bool]
	// SameSite selects options.same_site. Set accepts http1.SameSite.
	SameSite config.Key[BrowserGuardSettings, http1.SameSite]
	// Partitioned selects options.partitioned. Set accepts bool.
	Partitioned config.Key[BrowserGuardSettings, bool]
	// MaxAge selects options.max_age. Set accepts time.Duration.
	MaxAge config.Key[BrowserGuardSettings, time.Duration]
	// Expires selects options.expires. Set accepts time.Time.
	Expires config.Key[BrowserGuardSettings, time.Time]
}

BrowserGuardSettingsOptionsConfigKeySet exposes compiler-checked configuration overrides.

type BrowserGuards

type BrowserGuards map[auth.GuardName]BrowserGuardSettings

BrowserGuards maps guard names to browser session settings.

func (*BrowserGuards) UnmarshalText

func (m *BrowserGuards) UnmarshalText(data []byte) error

UnmarshalText decodes the guard table and replaces the receiver only on success.

type BrowserSettings

type BrowserSettings struct {
	Default auth.GuardName
	Guards  BrowserGuards
}

BrowserSettings configures named browser guards and their default.

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

Builder collects configuration and declarations for a single application build.

func New

func New(settings Settings, opts ...Option) *Builder

New snapshots configuration. Build returns any invalid settings/option error.

func (*Builder) Build

func (b *Builder) Build(ctx context.Context) (*App, error)

Build consumes the builder and constructs the application. Once construction begins, the builder cannot be reused, even if construction fails.

func (*Builder) Events

func (b *Builder) Events(declarations ...EventDeclaration) *Builder

Events adds event declarations to the builder.

func (*Builder) Features

func (b *Builder) Features(construct Features) *Builder

Features adds a feature constructor, recording an invalid fault if it is nil.

func (Builder) Format

func (Builder) Format(s fmt.State, _ rune)

Format writes a fixed label without exposing builder configuration.

func (*Builder) HTTP

func (b *Builder) HTTP(routes ...Routes) *Builder

HTTP adds route constructors, recording an invalid fault for nil constructors or more than 128 total constructors.

func (*Builder) Jobs

func (b *Builder) Jobs(declarations ...JobDeclaration) *Builder

Jobs adds job declarations to the builder.

func (Builder) LogValue

func (Builder) LogValue() slog.Value

LogValue returns a fixed log label without exposing builder configuration.

func (*Builder) Migrations

func (b *Builder) Migrations(targets ...infrastructure.MigrationTarget) *Builder

Migrations adds the application's own historical definitions. A blank Connection selects the default connection and a blank Schema that connection's schema (public when unscoped). The targets are snapshotted, join App.Migrations() and App.RunDatabaseCommand after the framework feature targets, are validated with them at Build, and are never applied during boot.

func (*Builder) Models

func (b *Builder) Models(declarations ...slots.Declaration) *Builder

Models registers generated model extension declarations, such as a model package's FoundryExtensions(). Each registers its owner, its translated, attachment and metadata slots, and a hard-delete cleanup observer on every configured database connection: on the extension store's it cleans inside the deletion transaction, on another after the deletion commits, or through the features.extension_cleanup job.

func (*Builder) ObserveHTTP

func (b *Builder) ObserveHTTP(observers ...http.RequestObserver) *Builder

ObserveHTTP adds HTTP request observers to the builder.

func (*Builder) Realtime

func (b *Builder) Realtime(construct Realtime) *Builder

Realtime sets the realtime constructor, recording an invalid fault for a nil or duplicate constructor.

func (*Builder) RedisKeys

RedisKeys inspects the builder's configured Redis consumers without Build, opening pools, reading credentials, or invoking application callbacks. It uses the same infrastructure options and resolution as Build. External providers are opaque; use WithRedisStores for application rate-limit/lockout consumers.

func (*Builder) Register

func (b *Builder) Register(providers ...foundation.Provider) *Builder

Register adds foundation providers to the builder.

func (*Builder) RegisterPlugin

func (b *Builder) RegisterPlugin(plugins ...foundation.Plugin) *Builder

RegisterPlugin adds plugins to the builder.

func (*Builder) SPA

func (b *Builder) SPA(id http.RouteID, assets foundation.Key[*http.Assets], config http.SPAConfig) *Builder

SPA declares a single-page application fallback on the application router, served from the assets registered under assets (usually by http.AssetsModule). Existing files under config.Prefix are served, and an HTML navigation to a missing extensionless path receives config.Index with config.CacheControl; declared routes and more specific asset mounts keep precedence, and an asset mount with a less specific or equal prefix, such as a root public mount, defers to it (see http.Router.WithSPA). Build checks the declaration before any resource opens: an unknown assets key, invalid configuration or a duplicate route ID or prefix fails Build.

func (*Builder) Schedules

func (b *Builder) Schedules(construct Schedules) *Builder

Schedules adds a schedule constructor, recording an invalid fault if it is nil.

func (*Builder) Use

func (b *Builder) Use(middleware ...http.Middleware) *Builder

Use applies global middleware in declaration order, including router misses.

type DatabaseCommandResources

type DatabaseCommandResources struct {
	Seeders   *seed.Registry
	Prunables *prune.Registry
}

DatabaseCommandResources supplies the application registries used by the seed and prune commands. Both are optional; migration commands use neither.

type DownArguments

type DownArguments struct {
	Retry      time.Duration
	Message    string
	Secret     string
	WithSecret bool
	Allow      []netip.Prefix
	Except     []maintenance.Rule
}

DownArguments are the parsed `down` flags.

type EncryptionKeySettings

type EncryptionKeySettings struct {
	Key secret.String
}

EncryptionKeySettings is one retired key retained to decrypt and re-encrypt existing data. Key is 32 bytes encoded as unpadded base64url.

type EncryptionKeySettingsConfigKeySet

type EncryptionKeySettingsConfigKeySet struct {
	// Key selects key. Set accepts secret.String.
	Key config.Key[EncryptionKeySettings, secret.String]
}

EncryptionKeySettingsConfigKeySet exposes compiler-checked configuration overrides.

func EncryptionKeySettingsConfigKeys

func EncryptionKeySettingsConfigKeys() EncryptionKeySettingsConfigKeySet

EncryptionKeySettingsConfigKeys derives keys from the handwritten settings declaration.

type EncryptionKeys

type EncryptionKeys map[encryption.KeyID]EncryptionKeySettings

EncryptionKeys maps retired key IDs to their material.

func (*EncryptionKeys) UnmarshalText

func (m *EncryptionKeys) UnmarshalText(data []byte) error

UnmarshalText decodes the encryption key table and replaces the receiver only on success.

type EncryptionSettings

type EncryptionSettings struct {
	KeyID    encryption.KeyID
	Key      secret.String
	Previous EncryptionKeys `config:",secret"`
}

EncryptionSettings configures the application key ring. KeyID names the active key and Key holds its material (32 bytes, unpadded base64url, for example from encryption.GenerateKey). Previous retains retired keys so existing data stays readable until it is re-encrypted. Load Key and previous keys from secret files or environment (NAME_FILE); never commit them. An empty KeyID disables application encryption.

func (EncryptionSettings) Enabled

func (s EncryptionSettings) Enabled() bool

Enabled reports whether an active key is configured.

type ErrorLogSettings

type ErrorLogSettings struct {
	Enabled            bool
	Window             time.Duration
	MaxFingerprints    int
	DontReportFaults   []fault.Code `config:",json"`
	DontReportStatuses []int        `config:",json"`
}

ErrorLogSettings enables the built-in structured-log error reporter on the default logger. Window suppresses duplicate fingerprints (zero logs every report); DontReport filters skip matching fault codes or HTTP statuses.

func DefaultErrorLogSettings

func DefaultErrorLogSettings() ErrorLogSettings

DefaultErrorLogSettings returns default error log deduplication settings.

type EventDeclaration

type EventDeclaration struct {
	// contains filtered or unexported fields
}

EventDeclaration holds an event registration and optional outbox declaration.

func EventOutbox

func EventOutbox(key foundation.Key[*events.Outbox], destination outbox.Destination) EventDeclaration

EventOutbox declares a producer for Topic.Enqueue under key, on the configured event bus. features.outbox.events must map destination to a durable job connection. Build registers its QueuedOutbox job and publication route; the application's ordinary worker delivers it. Events and outbox must be enabled.

func Listen

func Listen[E any](topic events.Topic[E], name events.ListenerID, construct func(Services) (events.Handler[E], error)) EventDeclaration

Listen declares a typed event listener whose handler is constructed from application services.

func ListenQueued

func ListenQueued[E any](topic events.Topic[E], name events.ListenerID, construct func(Services) (events.Handler[E], error)) EventDeclaration

ListenQueued registers a listener that runs as a job instead of inline. It requires features.events.queued_listeners.

func Subscribe

func Subscribe(id string, construct func(Services) (events.Subscriber, error)) EventDeclaration

Subscribe registers every listener of one subscriber type constructed from the application's services. id names the subscriber uniquely.

func Topic

func Topic[E any](topic events.Topic[E]) EventDeclaration

Topic declares an event topic for registration.

type EventsSettings

type EventsSettings struct {
	Enabled            bool
	Config             events.Config
	QueuedListeners    bool
	ListenerConnection jobs.ConnectionName
	ListenerQueue      jobs.Queue
}

EventsSettings configure the event bus. QueuedListeners delivers listeners declared with ListenQueued (or events.Listener.Queued) as jobs on ListenerConnection (empty selects the default job connection) and ListenerQueue (empty uses "default"); a worker must consume that queue.

type ExtensionCleanupSettings

type ExtensionCleanupSettings struct {
	// Jobs names the job connection that runs the cleanup job. The deletion
	// enqueues it in its own transaction through the outbox, so it needs a
	// destination in features.outbox.jobs and a worker consuming the
	// connection's default queue. Empty keeps process-local after-commit cleanup.
	Jobs jobs.ConnectionName
}

ExtensionCleanupSettings makes the cleanup of models with extension slots deleted through a database connection other than the extension store's crash-durable (features.extension_cleanup).

type FeatureDeclarations

type FeatureDeclarations struct {
	Owners        []extensions.Declaration
	Settings      []settings.Registration
	Metadata      []metadata.Registration
	Translations  []translations.Registration
	Attachments   []attachments.Registration
	Notifications []notifications.Registration
	Reports       []datatable.Registration
	Messages      []i18n.MessageDefinition
	Catalog       map[i18n.LocaleID]map[i18n.MessageKey]i18n.Template
	Outbox        []publisher.Route
	Readiness     []health.Probe
	// Pruning joins application stores to the maintenance schedule
	// (features.maintenance); it is ignored while that schedule is disabled.
	Pruning []Pruning
}

FeatureDeclarations retains the framework's typed registration envelopes. This is an assembly boundary, never a dynamic runtime model/service container.

type FeatureSettings

type FeatureSettings struct {
	Idempotency      IdempotencySettings
	Auth             AuthSettings
	Events           EventsSettings
	Outbox           OutboxSettings
	Audit            AuditSettings
	Locales          LocaleSettings
	Extensions       StoreSettings
	ExtensionCleanup ExtensionCleanupSettings
	Notifications    StoreSettings
	Attachments      AttachmentSettings
	Reports          ReportSettings
	Health           HealthSettings
	Observability    ObservabilitySettings
	// Maintenance schedules framework housekeeping (features.maintenance).
	Maintenance MaintenanceScheduleSettings
}

FeatureSettings groups configuration for application features.

func DefaultFeatureSettings

func DefaultFeatureSettings() FeatureSettings

DefaultFeatureSettings returns default settings for application features.

type Features

type Features func(Services) (FeatureDeclarations, error)

Features constructs feature declarations from application services.

type HTTPSettings

type HTTPSettings struct {
	StatementDetector StatementDetectorSettings
	Enabled           bool
	Server            http.ServerConfig
	SecurityHeaders   bool
	Probes            ProbeSettings
}

HTTPSettings configures the HTTP server, security headers, probes, and statement detector.

type HealthSettings

type HealthSettings struct {
	Enabled               bool
	Config                health.Config
	ConfiguredConnections bool
	ConfiguredStorage     bool
	ConfiguredMail        bool
}

HealthSettings select readiness probes. ConfiguredConnections probes every database and Redis connection, plus the realtime hub when realtime is enabled. ConfiguredStorage stats a probe key on every disk; ConfiguredMail checks that every mailer still admits submissions (no transport round trip).

type IdempotencySettings

type IdempotencySettings struct {
	Enabled  bool
	Database database.ConnectionName
	Config   idempotency.Config
}

IdempotencySettings configures the idempotency store and its database connection.

func DefaultIdempotencySettings

func DefaultIdempotencySettings() IdempotencySettings

DefaultIdempotencySettings returns default idempotency store settings.

type ImageSettings

type ImageSettings struct {
	Enabled bool
	Config  imaging.Config
}

ImageSettings configures the image processing engine.

type JobArchiveSettings

type JobArchiveSettings struct {
	Enabled  bool
	Database database.ConnectionName
	Schema   string
}

JobArchiveSettings enable the durable failed-job archive (jobs/archive): the worker writes each confirmed terminal failure to Database/Schema, which must have archive.Migrations applied.

type JobDeclaration

type JobDeclaration struct {
	// contains filtered or unexported fields
}

JobDeclaration is only an assembly envelope; payload contracts remain in the captured Definition and RegisterJob's compiler-checked contribution boundary.

func Job

func Job[P any](definition jobs.Definition[P], construct func(Services) (jobs.Handler[P], error)) JobDeclaration

Job declares a typed job with a handler constructor and default handler options.

func JobWith

func JobWith[P any](definition jobs.Definition[P], construct func(Services) (jobs.Handler[P], jobs.HandlerOptions[P], error)) JobDeclaration

JobWith binds typed middleware and admission using the same configured registration as Job. Use Failed middleware for explicit domain diagnostics; worker failure metadata is logged automatically by the configured worker.

func (JobDeclaration) On

On selects a named backend for registration; zero selects the configured default.

type LocaleSettings

type LocaleSettings struct {
	Enabled  bool
	Default  i18n.LocaleID
	Locales  []i18n.LocaleID `config:",json"`
	Fallback i18n.LocaleID
}

LocaleSettings configures supported locales and default and fallback locale identifiers.

type LogChannels

LogChannels maps channel names to logging settings.

func (*LogChannels) UnmarshalText

func (m *LogChannels) UnmarshalText(data []byte) error

UnmarshalText decodes the channel table and replaces the receiver only on success.

type LogSettings

type LogSettings struct {
	Default  logging.ChannelName
	Channels LogChannels
}

LogSettings configures named logging channels and their default.

func DefaultLogSettings

func DefaultLogSettings() LogSettings

DefaultLogSettings returns logging settings with a single default channel.

type MFASettings

type MFASettings struct {
	Enabled  bool
	Database database.ConnectionName
	Schema   string
	Config   mfa.Config
}

MFASettings configures the application MFA store. It requires application encryption keys; factor secrets are encrypted with the application key ring. Schema holds the factor table and must also resolve the domain models that factor callbacks lock. Config.Issuer defaults to the application name.

type MaintenanceScheduleSettings

type MaintenanceScheduleSettings struct {
	Enabled  bool
	Defaults MaintenanceTaskSettings
	// Outbox removes published outbox rows completed before Retention; pending
	// and failed rows are never pruned.
	Outbox MaintenanceTaskSettings
	// Idempotency removes expired outcomes, but only while the store's own
	// pruner is disabled (features.idempotency.config.prune_interval = 0).
	Idempotency MaintenanceTaskSettings
	// Audit applies features.audit.config.retention_days to the configured
	// area; zero retention registers no audit task. MaxBatches does not apply:
	// one run removes every expired batch within its Timeout.
	Audit MaintenanceTaskSettings
	// JobArchive removes archived failed jobs older than Retention.
	JobArchive MaintenanceTaskSettings
	// Notifications removes inbox records older than Retention. Unread records
	// are kept unless NotificationsUnread is set.
	Notifications       MaintenanceTaskSettings
	NotificationsUnread bool
	// Sessions, Tokens, Models and Custom tune declared Pruning of each kind.
	Sessions MaintenanceTaskSettings
	Tokens   MaintenanceTaskSettings
	Models   MaintenanceTaskSettings
	Custom   MaintenanceTaskSettings
}

MaintenanceScheduleSettings (features.maintenance) register leader-only housekeeping schedules in processes that run the scheduler kernel. Each enabled framework store with a prune API gets one schedule; application stores join through FeatureDeclarations.Pruning. Processes without the scheduler register nothing, and declarations are ignored while disabled.

func DefaultMaintenanceScheduleSettings

func DefaultMaintenanceScheduleSettings() MaintenanceScheduleSettings

DefaultMaintenanceScheduleSettings returns default housekeeping intervals, batch limits, timeouts, and retention periods.

type MaintenanceSettings

type MaintenanceSettings struct {
	Store        cache.StoreName
	PollInterval time.Duration
	Exempt       []maintenance.Rule `config:",json"`
	Allow        []netip.Prefix     `config:",json"`
	BypassTTL    time.Duration
}

MaintenanceSettings configure admission while the application is paused. Store names a configured cache store (Redis or PostgreSQL for a fleet) that shares operator state written by the down/up commands; every instance polls it every PollInterval. Empty Store keeps maintenance local to this process. Exempt rules ("[METHOD ]/path[/*]" as JSON Rule objects) and Allow networks admit matching requests while paused; draining still rejects everything.

func DefaultMaintenanceSettings

func DefaultMaintenanceSettings() MaintenanceSettings

DefaultMaintenanceSettings returns default maintenance polling and bypass durations.

type MaintenanceTaskSettings

type MaintenanceTaskSettings struct {
	// Disabled turns this task off.
	Disabled bool
	// Interval separates runs. Each task keeps a stable offset within its
	// interval, so housekeeping does not pile onto the top of every hour.
	Interval time.Duration
	// Batch bounds the rows one statement or transaction removes; MaxBatches
	// bounds the batches of one run, so a backlog continues at the next run.
	Batch      int
	MaxBatches int
	// Timeout bounds one run.
	Timeout time.Duration
	// Retention keeps younger rows of stores pruned by age (outbox, job archive
	// and notification inbox).
	Retention time.Duration
}

MaintenanceTaskSettings tune one housekeeping task. Zero fields inherit MaintenanceScheduleSettings.Defaults.

type ObservabilitySettings

type ObservabilitySettings struct {
	Enabled, Maintenance                                             bool
	MaxSeries, MaxRecent, MaxActive, ErrorQueue, ReporterConcurrency int
	ReporterTimeout                                                  time.Duration
	SampleTraces                                                     bool
	// TraceSampleRatio selects the sampled fraction of traces; zero means 1.
	TraceSampleRatio                             float64
	TraceQueue, TraceConcurrency, TraceBatchSize int
	TraceTimeout                                 time.Duration
	ErrorLog                                     ErrorLogSettings
}

ObservabilitySettings configures application metrics, error reporting, and trace collection.

func DefaultObservabilitySettings

func DefaultObservabilitySettings() ObservabilitySettings

DefaultObservabilitySettings returns default observability limits, trace settings, and error logging settings.

type Option

type Option func(*options) error

Option applies configuration to application construction.

func WithClock

func WithClock(c clock.Clock) Option

WithClock sets the application clock, rejecting a nil clock.

func WithCredentials

func WithCredentials(name credentials.Name, p credentials.Provider) Option

WithCredentials registers a named cloud credential provider with infrastructure configuration.

func WithErrorReporter

func WithErrorReporter(reporter observability.Reporter) Option

WithErrorReporter adds an error reporter, rejecting a nil reporter.

func WithLogHandler

func WithLogHandler(name logging.ChannelName, handler slog.Handler) Option

WithLogHandler binds a typed slog.Handler to a named log channel. The channel may be configured with the custom driver (selecting its minimum level) or be absent, in which case it is added at the default INFO minimum. The handler is borrowed: the application never closes it. See logging.WithHandler.

func WithLogger

func WithLogger(l *slog.Logger) Option

WithLogger replaces the selected default channel with a borrowed logger. Other explicitly configured channels retain their own lifecycle.

func WithMailDriver

func WithMailDriver(name infrastructure.MailDriver, driver email.Driver) Option

WithMailDriver borrows a custom driver under a distinct configured driver name.

func WithObservability

func WithObservability(r *observability.Recorder) Option

WithObservability sets the application observability recorder, rejecting nil.

func WithQueryObserver

func WithQueryObserver(observer database.QueryObserver) Option

WithQueryObserver installs a borrowed observer on every framework-built database pool, including named primary/read pools and RunDatabaseCommand pools. It follows database.QueryObserver's synchronous callback, isolation and argument-redaction contract. Example: application.New(settings, application.WithQueryObserver(observer)).

func WithRedisStores

func WithRedisStores(stores ...infrastructure.RedisStore) Option

WithRedisStores registers typed application stores with the configured plan.

func WithTables

func WithTables(tables ...orm.CheckedTable) Option

WithTables validates the application's explicit table declarations before any providers are constructed. Build reports all declaration errors from orm.Check. The list is copied; declarations themselves are immutable after orm.Define. Example: application.New(settings, application.WithTables(models.Orders.Table)).

func WithTraceBatchExporter

func WithTraceBatchExporter(exporter observability.TraceBatchExporter) Option

WithTraceBatchExporter adds a batch exporter such as observability.NewOTLPExporter to the configured recorder.

func WithTraceExporter

func WithTraceExporter(exporter observability.TraceExporter) Option

WithTraceExporter adds a trace exporter, rejecting a nil exporter.

type OutboxSettings

type OutboxSettings struct {
	Enabled  bool
	Database database.ConnectionName
	Schema   string
	Jobs     map[jobs.ConnectionName]outbox.Destination `config:",json"`
	// Events maps declared EventOutbox destinations to durable job connections.
	// Empty connection selects the default. Each connection uses its default
	// queue and jobs.DefaultPolicy for the framework event delivery job.
	Events                                     map[outbox.Destination]jobs.ConnectionName `config:",json"`
	Kernels                                    []foundation.KernelKind                    `config:",json"`
	MaxAttempts                                uint32
	RetryDelay, OperationTimeout, PollInterval time.Duration
	MaxRetryDelay, Jitter, MaxPollInterval     time.Duration
	MaxInFlight                                int
}

OutboxSettings configures the shared publisher. Kernels selects which running kernels also run the publisher; empty runs it under every kernel. Prefer the worker and/or scheduler kernels so CLI commands and HTTP replicas do not poll.

func DefaultOutboxSettings

func DefaultOutboxSettings() OutboxSettings

DefaultOutboxSettings returns default outbox publisher settings in the public schema.

type ProbeSettings

type ProbeSettings struct {
	Liveness      bool
	LivenessPath  string
	Readiness     bool
	ReadinessPath string
	// ReadinessCache is how long public readiness reuses one dependency check
	// (100ms to one minute); lifecycle and maintenance state are read live.
	ReadinessCache time.Duration
}

ProbeSettings mount unauthenticated probe routes on the application listener. Liveness performs no dependency checks and reports only that the process is live. Readiness reuses diagnostics readiness (lifecycle, maintenance and the configured health probes) and reports only ready/unavailable. Both paths stay reachable while maintenance is paused. Authenticated diagnostics are separate.

func DefaultProbeSettings

func DefaultProbeSettings() ProbeSettings

DefaultProbeSettings returns liveness and readiness route defaults.

type Pruning

type Pruning struct {
	// contains filtered or unexported fields
}

Pruning is one application-declared housekeeping task for the maintenance schedule. Construct it with PruneSessions, PruneTokens, PruneModels or PruneWith and return it in FeatureDeclarations.Pruning.

func PruneModels

func PruneModels(s Services, connection database.ConnectionName, declare func(now time.Time) ([]prune.Target, error)) (Pruning, error)

PruneModels schedules prunable model declarations (database/prune) on one configured database connection, empty selecting the default, as task models.<connection>. declare runs at the start of every run with the application's current time, so selections can use cutoffs relative to it; it is also run once here to reject invalid declarations at Build. Declare every target of one connection in one call.

func PruneSessions

func PruneSessions[M model.Identifiable, K any](guard BrowserGuard[M, K]) Pruning

PruneSessions schedules removal of the guard's expired sessions (Sessions.Prune) as task sessions.<guard>.

func PruneTokens

func PruneTokens[M model.Identifiable, K any](guard TokenGuard[M, K]) Pruning

PruneTokens schedules removal of the guard's expired token families (Tokens.Prune) as task tokens.<guard>.

func PruneWith

func PruneWith(name string, maxBatch int, step func(ctx context.Context, limit int) (int64, error)) Pruning

PruneWith schedules another store's bounded prune operation, such as an auth challenge flow, email verification, password reset or MFA factor store, as task name. step removes at most limit rows and reports how many; limit never exceeds maxBatch, the store's own bound, which the Custom batch must fit.

type Realtime

type Realtime func(Services) (RealtimeDeclarations, error)

Realtime constructs realtime declarations from application services.

type RealtimeDeclarations

type RealtimeDeclarations struct {
	Channels       []websocket.Registration
	Authentication *http.Authentication
	Middleware     []http.Middleware
	Tickets        []auth.TicketRedeemer
}

RealtimeDeclarations contains domain channels, typed authentication and upgrade middleware. Tickets lists the token guards whose single-use handshake tickets the hub redeems (see websocket.WithTickets); each guard's credential source must also be declared by Authentication. The framework owns the selected hub, listener and shutdown.

type RealtimeServerSettings

type RealtimeServerSettings struct {
	Enabled bool
	// Shared serves upgrades at Path on the application HTTP listener instead
	// of a dedicated listener and WebSocket kernel; running foundation.HTTP then
	// serves both. HTTP request/connection limits must accommodate sockets.
	Shared bool
	// Publisher constructs a managed cross-process publisher for processes
	// that run no hub, such as workers. It requires a cluster connection and
	// the same channel declarations as the socket servers.
	Publisher  bool
	Connection websocket.ConnectionName
	Config     websocket.Config
	HTTP       http.ServerConfig
	Path       string
}

RealtimeServerSettings configures the realtime hub, listener, and publisher mode.

func DefaultRealtimeServerSettings

func DefaultRealtimeServerSettings() RealtimeServerSettings

DefaultRealtimeServerSettings returns default realtime hub and HTTP listener settings.

type ReportSettings

type ReportSettings struct {
	Enabled  bool
	Database database.ConnectionName
	Config   datatable.Config
}

ReportSettings configures the datatable report feature and its database connection.

type Routes

type Routes func(Services) ([]http.RouteRegistration, error)

Routes constructs only domain handlers from typed resources; the framework owns router/server creation. It runs once at Build and must perform no I/O.

type SchedulerSettings

type SchedulerSettings struct {
	Enabled                             bool
	Group                               schedule.Group
	Concurrency, MaxHistory, MaxPerTick int
	PollInterval, LeadershipTTL, Grace  time.Duration
	CapacityWait, DrainTimeout          time.Duration
}

SchedulerSettings configures scheduler concurrency, timing, and retained history.

func DefaultSchedulerSettings

func DefaultSchedulerSettings() SchedulerSettings

DefaultSchedulerSettings returns scheduler defaults for the default group.

type Schedules

type Schedules func(Services) ([]schedule.Declaration, error)

Schedules constructs schedule declarations from application services.

type Services

type Services struct {
	*infrastructure.Services
	Logger *slog.Logger
	Logs   *logging.Channels
	// LogFiles borrows the existing logger owner for authorized file controls.
	LogFiles *logging.ChannelSet
	// contains filtered or unexported fields
}

Services is a constructor input, never a request context value. Ordinary constructors receive concrete default/named handles from its typed accessors. Resolve is the explicit extension boundary for application-specific services.

func FromResolver

func FromResolver(r foundation.Resolver) (Services, error)

FromResolver provides constructor services bound to this active resolver. Custom provider factories use it while constructing concrete domain handles. Retaining constructor services does not extend the resolver's lifetime; App.Resources uses the application's frozen runtime resolver instead.

func (Services) Attachments

func (s Services) Attachments() (*attachments.Manager, error)

Attachments resolves the application's attachment manager.

func (Services) Audit

func (s Services) Audit() (*audit.Recorder, error)

Audit resolves the application's audit recorder.

func (Services) AuditScope

func (s Services) AuditScope() (*audit.Scope, error)

AuditScope resolves a concrete handle during construction. Domain handlers retain this handle and call Within, rather than retaining constructor Services. It reuses the configured recorder, schema and exact database pool.

func (Services) Authorization

func (s Services) Authorization() (*auth.Registry, error)

Authorization returns the application-owned registry shared by configured guards. It contains every contributed guard, policy, permission and hook.

func (Services) Calendar

func (s Services) Calendar() schedule.Calendar

Calendar constructs schedule declarations inheriting the application timezone.

func (Services) CookieEncrypter

func (s Services) CookieEncrypter() (http.CookieEncrypter, error)

CookieEncrypter encrypts cookies with the application key ring and clock, for Cookie.Encrypted. Rotating the key keeps existing cookies readable while the previous key is retained.

func (Services) Encryption

func (s Services) Encryption() (*encryption.Keyring, error)

Encryption returns the application key ring: new data uses the active key and retained previous keys decrypt existing data. It fails with fault.Missing when Encryption.KeyID is not configured.

func (Services) Events

func (s Services) Events() (*events.Bus, error)

Events resolves the application's event bus.

func (Services) ExtensionStore

func (s Services) ExtensionStore() (*extensions.Store, error)

ExtensionStore resolves the application's extension store.

func (Services) Format

func (Services) Format(s fmt.State, _ rune)

Format writes a fixed label without exposing service values.

func (Services) Health

func (s Services) Health() (*health.Registry, error)

Health resolves the application's health registry.

func (Services) Idempotency

func (s Services) Idempotency() (*idempotency.Store, error)

Idempotency resolves the application's idempotency store.

func (Services) Image

func (s Services) Image() (*imaging.Engine, error)

Image returns the image engine, or a missing fault if image processing is unconfigured.

func (Services) JobArchive

func (s Services) JobArchive() (*archive.Store, error)

JobArchive returns the durable failed-job archive when it is enabled.

func (Services) JobOutbox

func (s Services) JobOutbox(name jobs.ConnectionName) (*jobs.Outbox, error)

JobOutbox selects the named job connection's configured durable producer. Empty name selects the configured default connection, never another producer.

func (Services) Locales

func (s Services) Locales() (*i18n.Catalog, error)

Locales resolves the application's locale catalog.

func (Services) LogValue

func (Services) LogValue() slog.Value

LogValue returns a fixed log label without exposing service values.

func (Services) MFA

func (s Services) MFA() (*mfa.Store, error)

MFA returns the configured MFA store, whose factor secrets use the application key ring. Bind model factors with mfa.New(store, provider, ...).

func (Services) Maintenance

func (s Services) Maintenance() (*maintenance.Gate, error)

Maintenance resolves the application's maintenance gate.

func (Services) MaintenanceStore

func (s Services) MaintenanceStore() (maintenance.Store, error)

MaintenanceStore returns the configured shared store, or fault.Missing.

func (Services) Metadata

func (s Services) Metadata() (*metadata.Manager, error)

Metadata resolves the application's metadata manager.

func (Services) ModelExtensions

func (s Services) ModelExtensions() (slots.Runtime, error)

ModelExtensions returns the managers bound model extension slots use, resolving only enabled features. Bind it once in a constructor with models.<Model>Extensions().From(runtime).

func (Services) Notifications

func (s Services) Notifications() (*notifications.Manager, error)

Notifications resolves the application's notification manager.

func (Services) Observability

func (s Services) Observability() *observability.Recorder

Observability returns the application's observability recorder, which may be nil.

func (Services) OutboxPublisher

func (s Services) OutboxPublisher() (*publisher.Publisher, error)

OutboxPublisher resolves the application's outbox publisher.

func (Services) RealtimeHub

func (s Services) RealtimeHub() (*websocket.Hub, error)

RealtimeHub resolves the application's realtime hub.

func (Services) RealtimePublisher

func (s Services) RealtimePublisher() (websocket.PublisherSource, error)

RealtimePublisher returns the hub when this process serves realtime, or the managed cross-process publisher when Realtime.Publisher is enabled. Both accept Publish, Broadcast and disconnect operations for HTTP handlers and jobs.

func (Services) Reports

func (s Services) Reports() (*datatable.Manager, error)

Reports resolves the application's datatable manager.

func (Services) Scheduler

func (s Services) Scheduler() (*schedule.Scheduler, error)

Scheduler resolves the application's scheduler.

func (Services) Sessions

func (s Services) Sessions() (*session.Store, error)

Sessions resolves the application's session store.

func (Services) Settings

func (s Services) Settings() (*settings.Manager, error)

Settings resolves the application's settings manager.

func (Services) Time

func (s Services) Time() temporal.Service

Time provides the application's clock and timezone-bound date helpers.

func (Services) Tokens

func (s Services) Tokens() (*token.Store, error)

Tokens resolves the application's token store.

func (Services) Translations

func (s Services) Translations() (*translations.Manager, error)

Translations resolves the application's translation manager.

type SessionSettings

type SessionSettings struct {
	Enabled  bool
	Database database.ConnectionName
	Schema   string
	Config   session.Config
}

SessionSettings configures the session store and its database schema.

type Settings

type Settings struct {
	TimeZone    temporal.ZoneName
	Services    infrastructure.Settings
	HTTP        HTTPSettings
	Worker      WorkerSettings
	Scheduler   SchedulerSettings
	Realtime    RealtimeServerSettings
	Features    FeatureSettings
	Image       ImageSettings
	Log         LogSettings
	Maintenance MaintenanceSettings
	// Encryption is the application key ring (active key plus retained
	// previous keys) used for MFA factors and encrypted cookies.
	Encryption EncryptionSettings
	// ShutdownTimeout is the whole shutdown budget: StopDelay, kernel drain
	// (such as the HTTP shutdown grace) and every cleanup share it.
	ShutdownTimeout time.Duration
	// StopDelay is a lame-duck period after a shutdown request: readiness
	// fails while listeners keep serving, then admission closes and kernels
	// drain. Zero disables it. It must leave room for kernel drain.
	StopDelay time.Duration
	// StartupTimeout bounds provider boot; zero leaves it unbounded.
	StartupTimeout time.Duration
}

Settings contains deployment values. Routes, models and callbacks stay Go declarations.

func DefaultSettings

func DefaultSettings() Settings

DefaultSettings returns the default application configuration.

func (Settings) WithDatabaseScopes

func (s Settings) WithDatabaseScopes(databases infrastructure.DatabaseSettings) (Settings, error)

WithDatabaseScopes snapshots consumer settings and aligns every declared persistence feature with its selected scoped connection. It preserves named defaults and rejects incompatible explicit schemas before application Build. Blank/public feature schemas follow the connection; custom schemas must match.

type SettingsConfigKeySet

type SettingsConfigKeySet struct {
	// TimeZone selects time_zone. Set accepts temporal.ZoneName.
	TimeZone    config.Key[Settings, temporal.ZoneName]
	Services    SettingsServicesConfigKeySet
	HTTP        SettingsHTTPConfigKeySet
	Worker      SettingsWorkerConfigKeySet
	Scheduler   SettingsSchedulerConfigKeySet
	Realtime    SettingsRealtimeConfigKeySet
	Features    SettingsFeaturesConfigKeySet
	Image       SettingsImageConfigKeySet
	Log         SettingsLogConfigKeySet
	Maintenance SettingsMaintenanceConfigKeySet
	//
	// Encryption is the application key ring (active key plus retained
	// previous keys) used for MFA factors and encrypted cookies.
	//
	Encryption SettingsEncryptionConfigKeySet
	// ShutdownTimeout selects shutdown_timeout. Set accepts time.Duration.
	//
	// ShutdownTimeout is the whole shutdown budget: StopDelay, kernel drain
	// (such as the HTTP shutdown grace) and every cleanup share it.
	//
	ShutdownTimeout config.Key[Settings, time.Duration]
	// StopDelay selects stop_delay. Set accepts time.Duration.
	//
	// StopDelay is a lame-duck period after a shutdown request: readiness
	// fails while listeners keep serving, then admission closes and kernels
	// drain. Zero disables it. It must leave room for kernel drain.
	//
	StopDelay config.Key[Settings, time.Duration]
	// StartupTimeout selects startup_timeout. Set accepts time.Duration.
	//
	// StartupTimeout bounds provider boot; zero leaves it unbounded.
	//
	StartupTimeout config.Key[Settings, time.Duration]
}

SettingsConfigKeySet exposes compiler-checked configuration overrides.

func SettingsConfigKeys

func SettingsConfigKeys() SettingsConfigKeySet

SettingsConfigKeys derives keys from the handwritten settings declaration.

type SettingsEncryptionConfigKeySet

type SettingsEncryptionConfigKeySet struct {
	// KeyID selects encryption.key_id. Set accepts encryption.KeyID.
	KeyID config.Key[Settings, encryption.KeyID]
	// Key selects encryption.key. Set accepts secret.String.
	Key config.Key[Settings, secret.String]
	// Previous selects encryption.previous. Set accepts EncryptionKeys.
	Previous config.Key[Settings, EncryptionKeys]
}

SettingsEncryptionConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesAttachmentsConfigConfigKeySet

type SettingsFeaturesAttachmentsConfigConfigKeySet struct {
	// MaxActive selects features.attachments.config.max_active. Set accepts int.
	MaxActive config.Key[Settings, int]
	// MaxReads selects features.attachments.config.max_reads. Set accepts int.
	MaxReads config.Key[Settings, int]
	// Timeout selects features.attachments.config.timeout. Set accepts time.Duration.
	Timeout config.Key[Settings, time.Duration]
	// CleanupTimeout selects features.attachments.config.cleanup_timeout. Set accepts time.Duration.
	CleanupTimeout config.Key[Settings, time.Duration]
	// CleanupGrace selects features.attachments.config.cleanup_grace. Set accepts time.Duration.
	CleanupGrace config.Key[Settings, time.Duration]
	// StoredGrace selects features.attachments.config.stored_grace. Set accepts time.Duration.
	StoredGrace config.Key[Settings, time.Duration]
	// SettleAfter selects features.attachments.config.settle_after. Set accepts time.Duration.
	SettleAfter config.Key[Settings, time.Duration]
}

SettingsFeaturesAttachmentsConfigConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesAttachmentsConfigKeySet

type SettingsFeaturesAttachmentsConfigKeySet struct {
	// Enabled selects features.attachments.enabled. Set accepts bool.
	Enabled config.Key[Settings, bool]
	Config  SettingsFeaturesAttachmentsConfigConfigKeySet
}

SettingsFeaturesAttachmentsConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesAuditConfigConfigKeySet

type SettingsFeaturesAuditConfigConfigKeySet struct {
	// Area selects features.audit.config.area. Set accepts audit.Area.
	Area config.Key[Settings, audit.Area]
	// RetentionDays selects features.audit.config.retention_days. Set accepts uint16.
	RetentionDays config.Key[Settings, uint16]
	// MaxValueBytes selects features.audit.config.max_value_bytes. Set accepts int.
	MaxValueBytes config.Key[Settings, int]
}

SettingsFeaturesAuditConfigConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesAuditConfigKeySet

type SettingsFeaturesAuditConfigKeySet struct {
	// Enabled selects features.audit.enabled. Set accepts bool.
	Enabled config.Key[Settings, bool]
	// Database selects features.audit.database. Set accepts database.ConnectionName.
	Database config.Key[Settings, database.ConnectionName]
	// Schema selects features.audit.schema. Set accepts string.
	Schema config.Key[Settings, string]
	Config SettingsFeaturesAuditConfigConfigKeySet
}

SettingsFeaturesAuditConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesAuthBrowserConfigKeySet

type SettingsFeaturesAuthBrowserConfigKeySet struct {
	// Default selects features.auth.browser.default. Set accepts auth.GuardName.
	Default config.Key[Settings, auth.GuardName]
	// Guards selects features.auth.browser.guards. Set accepts BrowserGuards.
	Guards config.Key[Settings, BrowserGuards]
}

SettingsFeaturesAuthBrowserConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesAuthConfigKeySet

type SettingsFeaturesAuthConfigKeySet struct {
	Registry SettingsFeaturesAuthRegistryConfigKeySet
	Sessions SettingsFeaturesAuthSessionsConfigKeySet
	Tokens   SettingsFeaturesAuthTokensConfigKeySet
	MFA      SettingsFeaturesAuthMFAConfigKeySet
	Browser  SettingsFeaturesAuthBrowserConfigKeySet
	// DefaultTokenGuard selects features.auth.default_token_guard. Set accepts auth.GuardName.
	DefaultTokenGuard config.Key[Settings, auth.GuardName]
}

SettingsFeaturesAuthConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesAuthMFAConfigConfigKeySet

type SettingsFeaturesAuthMFAConfigConfigKeySet struct {
	Namespace SettingsFeaturesAuthMFAConfigNamespaceConfigKeySet
	// Issuer selects features.auth.mfa.config.issuer. Set accepts string.
	Issuer config.Key[Settings, string]
	// EnrollmentLifetime selects features.auth.mfa.config.enrollment_lifetime. Set accepts time.Duration.
	EnrollmentLifetime config.Key[Settings, time.Duration]
	// Window selects features.auth.mfa.config.window. Set accepts int.
	Window config.Key[Settings, int]
	// RecoveryCodes selects features.auth.mfa.config.recovery_codes. Set accepts int.
	RecoveryCodes config.Key[Settings, int]
	// MaxConcurrent selects features.auth.mfa.config.max_concurrent. Set accepts int.
	MaxConcurrent config.Key[Settings, int]
	// Timeout selects features.auth.mfa.config.timeout. Set accepts time.Duration.
	Timeout config.Key[Settings, time.Duration]
}

SettingsFeaturesAuthMFAConfigConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesAuthMFAConfigKeySet

type SettingsFeaturesAuthMFAConfigKeySet struct {
	// Enabled selects features.auth.mfa.enabled. Set accepts bool.
	Enabled config.Key[Settings, bool]
	// Database selects features.auth.mfa.database. Set accepts database.ConnectionName.
	Database config.Key[Settings, database.ConnectionName]
	// Schema selects features.auth.mfa.schema. Set accepts string.
	Schema config.Key[Settings, string]
	Config SettingsFeaturesAuthMFAConfigConfigKeySet
}

SettingsFeaturesAuthMFAConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesAuthMFAConfigNamespaceConfigKeySet

type SettingsFeaturesAuthMFAConfigNamespaceConfigKeySet struct {
	// Application selects features.auth.mfa.config.namespace.application. Set accepts string.
	Application config.Key[Settings, string]
	// Environment selects features.auth.mfa.config.namespace.environment. Set accepts string.
	Environment config.Key[Settings, string]
}

SettingsFeaturesAuthMFAConfigNamespaceConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesAuthRegistryConfigKeySet

type SettingsFeaturesAuthRegistryConfigKeySet struct {
	// MaxConcurrent selects features.auth.registry.max_concurrent. Set accepts int.
	MaxConcurrent config.Key[Settings, int]
	// Timeout selects features.auth.registry.timeout. Set accepts time.Duration.
	Timeout config.Key[Settings, time.Duration]
}

SettingsFeaturesAuthRegistryConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesAuthSessionsConfigConfigKeySet

type SettingsFeaturesAuthSessionsConfigConfigKeySet struct {
	Namespace  SettingsFeaturesAuthSessionsConfigNamespaceConfigKeySet
	Regular    SettingsFeaturesAuthSessionsConfigRegularConfigKeySet
	Remembered SettingsFeaturesAuthSessionsConfigRememberedConfigKeySet
	Pending    SettingsFeaturesAuthSessionsConfigPendingConfigKeySet
	// MaxPerSubject selects features.auth.sessions.config.max_per_subject. Set accepts int.
	MaxPerSubject config.Key[Settings, int]
	// MaxPendingPerSubject selects features.auth.sessions.config.max_pending_per_subject. Set accepts int.
	MaxPendingPerSubject config.Key[Settings, int]
	// Limit selects features.auth.sessions.config.limit. Set accepts auth.LimitPolicy.
	Limit config.Key[Settings, auth.LimitPolicy]
	// MaxConcurrent selects features.auth.sessions.config.max_concurrent. Set accepts int.
	MaxConcurrent config.Key[Settings, int]
	// Timeout selects features.auth.sessions.config.timeout. Set accepts time.Duration.
	Timeout config.Key[Settings, time.Duration]
}

SettingsFeaturesAuthSessionsConfigConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesAuthSessionsConfigKeySet

type SettingsFeaturesAuthSessionsConfigKeySet struct {
	// Enabled selects features.auth.sessions.enabled. Set accepts bool.
	Enabled config.Key[Settings, bool]
	// Database selects features.auth.sessions.database. Set accepts database.ConnectionName.
	Database config.Key[Settings, database.ConnectionName]
	// Schema selects features.auth.sessions.schema. Set accepts string.
	Schema config.Key[Settings, string]
	Config SettingsFeaturesAuthSessionsConfigConfigKeySet
}

SettingsFeaturesAuthSessionsConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesAuthSessionsConfigNamespaceConfigKeySet

type SettingsFeaturesAuthSessionsConfigNamespaceConfigKeySet struct {
	// Application selects features.auth.sessions.config.namespace.application. Set accepts string.
	Application config.Key[Settings, string]
	// Environment selects features.auth.sessions.config.namespace.environment. Set accepts string.
	Environment config.Key[Settings, string]
}

SettingsFeaturesAuthSessionsConfigNamespaceConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesAuthSessionsConfigPendingConfigKeySet

type SettingsFeaturesAuthSessionsConfigPendingConfigKeySet struct {
	// Idle selects features.auth.sessions.config.pending.idle. Set accepts time.Duration.
	Idle config.Key[Settings, time.Duration]
	// Absolute selects features.auth.sessions.config.pending.absolute. Set accepts time.Duration.
	Absolute config.Key[Settings, time.Duration]
	// Sliding selects features.auth.sessions.config.pending.sliding. Set accepts bool.
	Sliding config.Key[Settings, bool]
}

SettingsFeaturesAuthSessionsConfigPendingConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesAuthSessionsConfigRegularConfigKeySet

type SettingsFeaturesAuthSessionsConfigRegularConfigKeySet struct {
	// Idle selects features.auth.sessions.config.regular.idle. Set accepts time.Duration.
	Idle config.Key[Settings, time.Duration]
	// Absolute selects features.auth.sessions.config.regular.absolute. Set accepts time.Duration.
	Absolute config.Key[Settings, time.Duration]
	// Sliding selects features.auth.sessions.config.regular.sliding. Set accepts bool.
	Sliding config.Key[Settings, bool]
}

SettingsFeaturesAuthSessionsConfigRegularConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesAuthSessionsConfigRememberedConfigKeySet

type SettingsFeaturesAuthSessionsConfigRememberedConfigKeySet struct {
	// Idle selects features.auth.sessions.config.remembered.idle. Set accepts time.Duration.
	Idle config.Key[Settings, time.Duration]
	// Absolute selects features.auth.sessions.config.remembered.absolute. Set accepts time.Duration.
	Absolute config.Key[Settings, time.Duration]
	// Sliding selects features.auth.sessions.config.remembered.sliding. Set accepts bool.
	Sliding config.Key[Settings, bool]
}

SettingsFeaturesAuthSessionsConfigRememberedConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesAuthTokensConfigChallengeConfigKeySet

type SettingsFeaturesAuthTokensConfigChallengeConfigKeySet struct {
	// Access selects features.auth.tokens.config.challenge.access. Set accepts time.Duration.
	Access config.Key[Settings, time.Duration]
	// RefreshIdle selects features.auth.tokens.config.challenge.refresh_idle. Set accepts time.Duration.
	RefreshIdle config.Key[Settings, time.Duration]
	// Absolute selects features.auth.tokens.config.challenge.absolute. Set accepts time.Duration.
	Absolute config.Key[Settings, time.Duration]
}

SettingsFeaturesAuthTokensConfigChallengeConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesAuthTokensConfigConfigKeySet

type SettingsFeaturesAuthTokensConfigConfigKeySet struct {
	Namespace SettingsFeaturesAuthTokensConfigNamespaceConfigKeySet
	Personal  SettingsFeaturesAuthTokensConfigPersonalConfigKeySet
	Renewable SettingsFeaturesAuthTokensConfigRenewableConfigKeySet
	Challenge SettingsFeaturesAuthTokensConfigChallengeConfigKeySet
	// MaxPerSubject selects features.auth.tokens.config.max_per_subject. Set accepts int.
	MaxPerSubject config.Key[Settings, int]
	// MaxPendingPerSubject selects features.auth.tokens.config.max_pending_per_subject. Set accepts int.
	MaxPendingPerSubject config.Key[Settings, int]
	// Limit selects features.auth.tokens.config.limit. Set accepts auth.LimitPolicy.
	Limit config.Key[Settings, auth.LimitPolicy]
	// MaxRotations selects features.auth.tokens.config.max_rotations. Set accepts int.
	MaxRotations config.Key[Settings, int]
	// AccessGrace selects features.auth.tokens.config.access_grace. Set accepts time.Duration.
	AccessGrace config.Key[Settings, time.Duration]
	// Prefix selects features.auth.tokens.config.prefix. Set accepts string.
	Prefix config.Key[Settings, string]
	// MaxConcurrent selects features.auth.tokens.config.max_concurrent. Set accepts int.
	MaxConcurrent config.Key[Settings, int]
	// Timeout selects features.auth.tokens.config.timeout. Set accepts time.Duration.
	Timeout config.Key[Settings, time.Duration]
	// TicketLifetime selects features.auth.tokens.config.ticket_lifetime. Set accepts time.Duration.
	TicketLifetime config.Key[Settings, time.Duration]
	// MaxTicketsPerFamily selects features.auth.tokens.config.max_tickets_per_family. Set accepts int.
	MaxTicketsPerFamily config.Key[Settings, int]
}

SettingsFeaturesAuthTokensConfigConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesAuthTokensConfigKeySet

type SettingsFeaturesAuthTokensConfigKeySet struct {
	// Enabled selects features.auth.tokens.enabled. Set accepts bool.
	Enabled config.Key[Settings, bool]
	// Database selects features.auth.tokens.database. Set accepts database.ConnectionName.
	Database config.Key[Settings, database.ConnectionName]
	// Schema selects features.auth.tokens.schema. Set accepts string.
	Schema config.Key[Settings, string]
	Config SettingsFeaturesAuthTokensConfigConfigKeySet
}

SettingsFeaturesAuthTokensConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesAuthTokensConfigNamespaceConfigKeySet

type SettingsFeaturesAuthTokensConfigNamespaceConfigKeySet struct {
	// Application selects features.auth.tokens.config.namespace.application. Set accepts string.
	Application config.Key[Settings, string]
	// Environment selects features.auth.tokens.config.namespace.environment. Set accepts string.
	Environment config.Key[Settings, string]
}

SettingsFeaturesAuthTokensConfigNamespaceConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesAuthTokensConfigPersonalConfigKeySet

type SettingsFeaturesAuthTokensConfigPersonalConfigKeySet struct {
	// Access selects features.auth.tokens.config.personal.access. Set accepts time.Duration.
	Access config.Key[Settings, time.Duration]
	// RefreshIdle selects features.auth.tokens.config.personal.refresh_idle. Set accepts time.Duration.
	RefreshIdle config.Key[Settings, time.Duration]
	// Absolute selects features.auth.tokens.config.personal.absolute. Set accepts time.Duration.
	Absolute config.Key[Settings, time.Duration]
}

SettingsFeaturesAuthTokensConfigPersonalConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesAuthTokensConfigRenewableConfigKeySet

type SettingsFeaturesAuthTokensConfigRenewableConfigKeySet struct {
	// Access selects features.auth.tokens.config.renewable.access. Set accepts time.Duration.
	Access config.Key[Settings, time.Duration]
	// RefreshIdle selects features.auth.tokens.config.renewable.refresh_idle. Set accepts time.Duration.
	RefreshIdle config.Key[Settings, time.Duration]
	// Absolute selects features.auth.tokens.config.renewable.absolute. Set accepts time.Duration.
	Absolute config.Key[Settings, time.Duration]
}

SettingsFeaturesAuthTokensConfigRenewableConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesEventsConfigConfigKeySet

type SettingsFeaturesEventsConfigConfigKeySet struct {
	// MaxInFlight selects features.events.config.max_in_flight. Set accepts int.
	MaxInFlight config.Key[Settings, int]
	// MaxDepth selects features.events.config.max_depth. Set accepts int.
	MaxDepth config.Key[Settings, int]
}

SettingsFeaturesEventsConfigConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesEventsConfigKeySet

type SettingsFeaturesEventsConfigKeySet struct {
	// Enabled selects features.events.enabled. Set accepts bool.
	Enabled config.Key[Settings, bool]
	Config  SettingsFeaturesEventsConfigConfigKeySet
	// QueuedListeners selects features.events.queued_listeners. Set accepts bool.
	QueuedListeners config.Key[Settings, bool]
	// ListenerConnection selects features.events.listener_connection. Set accepts jobs.ConnectionName.
	ListenerConnection config.Key[Settings, jobs.ConnectionName]
	// ListenerQueue selects features.events.listener_queue. Set accepts jobs.Queue.
	ListenerQueue config.Key[Settings, jobs.Queue]
}

SettingsFeaturesEventsConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesExtensionCleanupConfigKeySet

type SettingsFeaturesExtensionCleanupConfigKeySet struct {
	// Jobs selects features.extension_cleanup.jobs. Set accepts jobs.ConnectionName.
	//
	// Jobs names the job connection that runs the cleanup job. The deletion
	// enqueues it in its own transaction through the outbox, so it needs a
	// destination in features.outbox.jobs and a worker consuming the
	// connection's default queue. Empty keeps process-local after-commit cleanup.
	//
	Jobs config.Key[Settings, jobs.ConnectionName]
}

SettingsFeaturesExtensionCleanupConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesExtensionsConfigKeySet

type SettingsFeaturesExtensionsConfigKeySet struct {
	// Enabled selects features.extensions.enabled. Set accepts bool.
	Enabled config.Key[Settings, bool]
	// Database selects features.extensions.database. Set accepts database.ConnectionName.
	Database config.Key[Settings, database.ConnectionName]
	// Schema selects features.extensions.schema. Set accepts string.
	Schema config.Key[Settings, string]
	// MaxActive selects features.extensions.max_active. Set accepts int.
	MaxActive config.Key[Settings, int]
	// Timeout selects features.extensions.timeout. Set accepts time.Duration.
	Timeout config.Key[Settings, time.Duration]
}

SettingsFeaturesExtensionsConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesHealthConfigConfigKeySet

type SettingsFeaturesHealthConfigConfigKeySet struct {
	// MaxProbes selects features.health.config.max_probes. Set accepts int.
	MaxProbes config.Key[Settings, int]
	// MaxConcurrent selects features.health.config.max_concurrent. Set accepts int.
	MaxConcurrent config.Key[Settings, int]
	// CheckTimeout selects features.health.config.check_timeout. Set accepts time.Duration.
	CheckTimeout config.Key[Settings, time.Duration]
	// ProbeTimeout selects features.health.config.probe_timeout. Set accepts time.Duration.
	ProbeTimeout config.Key[Settings, time.Duration]
}

SettingsFeaturesHealthConfigConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesHealthConfigKeySet

type SettingsFeaturesHealthConfigKeySet struct {
	// Enabled selects features.health.enabled. Set accepts bool.
	Enabled config.Key[Settings, bool]
	Config  SettingsFeaturesHealthConfigConfigKeySet
	// ConfiguredConnections selects features.health.configured_connections. Set accepts bool.
	ConfiguredConnections config.Key[Settings, bool]
	// ConfiguredStorage selects features.health.configured_storage. Set accepts bool.
	ConfiguredStorage config.Key[Settings, bool]
	// ConfiguredMail selects features.health.configured_mail. Set accepts bool.
	ConfiguredMail config.Key[Settings, bool]
}

SettingsFeaturesHealthConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesIdempotencyConfigConfigKeySet

type SettingsFeaturesIdempotencyConfigConfigKeySet struct {
	// Schema selects features.idempotency.config.schema. Set accepts string.
	Schema config.Key[Settings, string]
	// MaxActive selects features.idempotency.config.max_active. Set accepts int.
	MaxActive config.Key[Settings, int]
	// MaxRetainedPerCaller selects features.idempotency.config.max_retained_per_caller. Set accepts int.
	MaxRetainedPerCaller config.Key[Settings, int]
	// MaxKeyBytes selects features.idempotency.config.max_key_bytes. Set accepts int.
	MaxKeyBytes config.Key[Settings, int]
	// MaxInputBytes selects features.idempotency.config.max_input_bytes. Set accepts int.
	MaxInputBytes config.Key[Settings, int]
	// MaxResultBytes selects features.idempotency.config.max_result_bytes. Set accepts int.
	MaxResultBytes config.Key[Settings, int]
	// Timeout selects features.idempotency.config.timeout. Set accepts time.Duration.
	Timeout config.Key[Settings, time.Duration]
	// DuplicateWait selects features.idempotency.config.duplicate_wait. Set accepts time.Duration.
	DuplicateWait config.Key[Settings, time.Duration]
	// Retention selects features.idempotency.config.retention. Set accepts time.Duration.
	Retention config.Key[Settings, time.Duration]
	// PruneInterval selects features.idempotency.config.prune_interval. Set accepts time.Duration.
	PruneInterval config.Key[Settings, time.Duration]
	// PruneBatch selects features.idempotency.config.prune_batch. Set accepts int.
	PruneBatch config.Key[Settings, int]
}

SettingsFeaturesIdempotencyConfigConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesIdempotencyConfigKeySet

type SettingsFeaturesIdempotencyConfigKeySet struct {
	// Enabled selects features.idempotency.enabled. Set accepts bool.
	Enabled config.Key[Settings, bool]
	// Database selects features.idempotency.database. Set accepts database.ConnectionName.
	Database config.Key[Settings, database.ConnectionName]
	Config   SettingsFeaturesIdempotencyConfigConfigKeySet
}

SettingsFeaturesIdempotencyConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesLocalesConfigKeySet

type SettingsFeaturesLocalesConfigKeySet struct {
	// Enabled selects features.locales.enabled. Set accepts bool.
	Enabled config.Key[Settings, bool]
	// Default selects features.locales.default. Set accepts i18n.LocaleID.
	Default config.Key[Settings, i18n.LocaleID]
	// Locales selects features.locales.locales. Set accepts []i18n.LocaleID.
	Locales config.Key[Settings, []i18n.LocaleID]
	// Fallback selects features.locales.fallback. Set accepts i18n.LocaleID.
	Fallback config.Key[Settings, i18n.LocaleID]
}

SettingsFeaturesLocalesConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesMaintenanceAuditConfigKeySet

type SettingsFeaturesMaintenanceAuditConfigKeySet struct {
	// Disabled selects features.maintenance.audit.disabled. Set accepts bool.
	//
	// Disabled turns this task off.
	//
	Disabled config.Key[Settings, bool]
	// Interval selects features.maintenance.audit.interval. Set accepts time.Duration.
	//
	// Interval separates runs. Each task keeps a stable offset within its
	// interval, so housekeeping does not pile onto the top of every hour.
	//
	Interval config.Key[Settings, time.Duration]
	// Batch selects features.maintenance.audit.batch. Set accepts int.
	//
	// Batch bounds the rows one statement or transaction removes; MaxBatches
	// bounds the batches of one run, so a backlog continues at the next run.
	//
	Batch config.Key[Settings, int]
	// MaxBatches selects features.maintenance.audit.max_batches. Set accepts int.
	MaxBatches config.Key[Settings, int]
	// Timeout selects features.maintenance.audit.timeout. Set accepts time.Duration.
	//
	// Timeout bounds one run.
	//
	Timeout config.Key[Settings, time.Duration]
	// Retention selects features.maintenance.audit.retention. Set accepts time.Duration.
	//
	// Retention keeps younger rows of stores pruned by age (outbox, job archive
	// and notification inbox).
	//
	Retention config.Key[Settings, time.Duration]
}

SettingsFeaturesMaintenanceAuditConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesMaintenanceConfigKeySet

type SettingsFeaturesMaintenanceConfigKeySet struct {
	// Enabled selects features.maintenance.enabled. Set accepts bool.
	Enabled  config.Key[Settings, bool]
	Defaults SettingsFeaturesMaintenanceDefaultsConfigKeySet
	//
	// Outbox removes published outbox rows completed before Retention; pending
	// and failed rows are never pruned.
	//
	Outbox SettingsFeaturesMaintenanceOutboxConfigKeySet
	//
	// Idempotency removes expired outcomes, but only while the store's own
	// pruner is disabled (features.idempotency.config.prune_interval = 0).
	//
	Idempotency SettingsFeaturesMaintenanceIdempotencyConfigKeySet
	//
	// Audit applies features.audit.config.retention_days to the configured
	// area; zero retention registers no audit task. MaxBatches does not apply:
	// one run removes every expired batch within its Timeout.
	//
	Audit SettingsFeaturesMaintenanceAuditConfigKeySet
	//
	// JobArchive removes archived failed jobs older than Retention.
	//
	JobArchive SettingsFeaturesMaintenanceJobArchiveConfigKeySet
	//
	// Notifications removes inbox records older than Retention. Unread records
	// are kept unless NotificationsUnread is set.
	//
	Notifications SettingsFeaturesMaintenanceNotificationsConfigKeySet
	// NotificationsUnread selects features.maintenance.notifications_unread. Set accepts bool.
	NotificationsUnread config.Key[Settings, bool]
	//
	// Sessions, Tokens, Models and Custom tune declared Pruning of each kind.
	//
	Sessions SettingsFeaturesMaintenanceSessionsConfigKeySet
	Tokens   SettingsFeaturesMaintenanceTokensConfigKeySet
	Models   SettingsFeaturesMaintenanceModelsConfigKeySet
	Custom   SettingsFeaturesMaintenanceCustomConfigKeySet
}

SettingsFeaturesMaintenanceConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesMaintenanceCustomConfigKeySet

type SettingsFeaturesMaintenanceCustomConfigKeySet struct {
	// Disabled selects features.maintenance.custom.disabled. Set accepts bool.
	//
	// Disabled turns this task off.
	//
	Disabled config.Key[Settings, bool]
	// Interval selects features.maintenance.custom.interval. Set accepts time.Duration.
	//
	// Interval separates runs. Each task keeps a stable offset within its
	// interval, so housekeeping does not pile onto the top of every hour.
	//
	Interval config.Key[Settings, time.Duration]
	// Batch selects features.maintenance.custom.batch. Set accepts int.
	//
	// Batch bounds the rows one statement or transaction removes; MaxBatches
	// bounds the batches of one run, so a backlog continues at the next run.
	//
	Batch config.Key[Settings, int]
	// MaxBatches selects features.maintenance.custom.max_batches. Set accepts int.
	MaxBatches config.Key[Settings, int]
	// Timeout selects features.maintenance.custom.timeout. Set accepts time.Duration.
	//
	// Timeout bounds one run.
	//
	Timeout config.Key[Settings, time.Duration]
	// Retention selects features.maintenance.custom.retention. Set accepts time.Duration.
	//
	// Retention keeps younger rows of stores pruned by age (outbox, job archive
	// and notification inbox).
	//
	Retention config.Key[Settings, time.Duration]
}

SettingsFeaturesMaintenanceCustomConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesMaintenanceDefaultsConfigKeySet

type SettingsFeaturesMaintenanceDefaultsConfigKeySet struct {
	// Disabled selects features.maintenance.defaults.disabled. Set accepts bool.
	//
	// Disabled turns this task off.
	//
	Disabled config.Key[Settings, bool]
	// Interval selects features.maintenance.defaults.interval. Set accepts time.Duration.
	//
	// Interval separates runs. Each task keeps a stable offset within its
	// interval, so housekeeping does not pile onto the top of every hour.
	//
	Interval config.Key[Settings, time.Duration]
	// Batch selects features.maintenance.defaults.batch. Set accepts int.
	//
	// Batch bounds the rows one statement or transaction removes; MaxBatches
	// bounds the batches of one run, so a backlog continues at the next run.
	//
	Batch config.Key[Settings, int]
	// MaxBatches selects features.maintenance.defaults.max_batches. Set accepts int.
	MaxBatches config.Key[Settings, int]
	// Timeout selects features.maintenance.defaults.timeout. Set accepts time.Duration.
	//
	// Timeout bounds one run.
	//
	Timeout config.Key[Settings, time.Duration]
	// Retention selects features.maintenance.defaults.retention. Set accepts time.Duration.
	//
	// Retention keeps younger rows of stores pruned by age (outbox, job archive
	// and notification inbox).
	//
	Retention config.Key[Settings, time.Duration]
}

SettingsFeaturesMaintenanceDefaultsConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesMaintenanceIdempotencyConfigKeySet

type SettingsFeaturesMaintenanceIdempotencyConfigKeySet struct {
	// Disabled selects features.maintenance.idempotency.disabled. Set accepts bool.
	//
	// Disabled turns this task off.
	//
	Disabled config.Key[Settings, bool]
	// Interval selects features.maintenance.idempotency.interval. Set accepts time.Duration.
	//
	// Interval separates runs. Each task keeps a stable offset within its
	// interval, so housekeeping does not pile onto the top of every hour.
	//
	Interval config.Key[Settings, time.Duration]
	// Batch selects features.maintenance.idempotency.batch. Set accepts int.
	//
	// Batch bounds the rows one statement or transaction removes; MaxBatches
	// bounds the batches of one run, so a backlog continues at the next run.
	//
	Batch config.Key[Settings, int]
	// MaxBatches selects features.maintenance.idempotency.max_batches. Set accepts int.
	MaxBatches config.Key[Settings, int]
	// Timeout selects features.maintenance.idempotency.timeout. Set accepts time.Duration.
	//
	// Timeout bounds one run.
	//
	Timeout config.Key[Settings, time.Duration]
	// Retention selects features.maintenance.idempotency.retention. Set accepts time.Duration.
	//
	// Retention keeps younger rows of stores pruned by age (outbox, job archive
	// and notification inbox).
	//
	Retention config.Key[Settings, time.Duration]
}

SettingsFeaturesMaintenanceIdempotencyConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesMaintenanceJobArchiveConfigKeySet

type SettingsFeaturesMaintenanceJobArchiveConfigKeySet struct {
	// Disabled selects features.maintenance.job_archive.disabled. Set accepts bool.
	//
	// Disabled turns this task off.
	//
	Disabled config.Key[Settings, bool]
	// Interval selects features.maintenance.job_archive.interval. Set accepts time.Duration.
	//
	// Interval separates runs. Each task keeps a stable offset within its
	// interval, so housekeeping does not pile onto the top of every hour.
	//
	Interval config.Key[Settings, time.Duration]
	// Batch selects features.maintenance.job_archive.batch. Set accepts int.
	//
	// Batch bounds the rows one statement or transaction removes; MaxBatches
	// bounds the batches of one run, so a backlog continues at the next run.
	//
	Batch config.Key[Settings, int]
	// MaxBatches selects features.maintenance.job_archive.max_batches. Set accepts int.
	MaxBatches config.Key[Settings, int]
	// Timeout selects features.maintenance.job_archive.timeout. Set accepts time.Duration.
	//
	// Timeout bounds one run.
	//
	Timeout config.Key[Settings, time.Duration]
	// Retention selects features.maintenance.job_archive.retention. Set accepts time.Duration.
	//
	// Retention keeps younger rows of stores pruned by age (outbox, job archive
	// and notification inbox).
	//
	Retention config.Key[Settings, time.Duration]
}

SettingsFeaturesMaintenanceJobArchiveConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesMaintenanceModelsConfigKeySet

type SettingsFeaturesMaintenanceModelsConfigKeySet struct {
	// Disabled selects features.maintenance.models.disabled. Set accepts bool.
	//
	// Disabled turns this task off.
	//
	Disabled config.Key[Settings, bool]
	// Interval selects features.maintenance.models.interval. Set accepts time.Duration.
	//
	// Interval separates runs. Each task keeps a stable offset within its
	// interval, so housekeeping does not pile onto the top of every hour.
	//
	Interval config.Key[Settings, time.Duration]
	// Batch selects features.maintenance.models.batch. Set accepts int.
	//
	// Batch bounds the rows one statement or transaction removes; MaxBatches
	// bounds the batches of one run, so a backlog continues at the next run.
	//
	Batch config.Key[Settings, int]
	// MaxBatches selects features.maintenance.models.max_batches. Set accepts int.
	MaxBatches config.Key[Settings, int]
	// Timeout selects features.maintenance.models.timeout. Set accepts time.Duration.
	//
	// Timeout bounds one run.
	//
	Timeout config.Key[Settings, time.Duration]
	// Retention selects features.maintenance.models.retention. Set accepts time.Duration.
	//
	// Retention keeps younger rows of stores pruned by age (outbox, job archive
	// and notification inbox).
	//
	Retention config.Key[Settings, time.Duration]
}

SettingsFeaturesMaintenanceModelsConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesMaintenanceNotificationsConfigKeySet

type SettingsFeaturesMaintenanceNotificationsConfigKeySet struct {
	// Disabled selects features.maintenance.notifications.disabled. Set accepts bool.
	//
	// Disabled turns this task off.
	//
	Disabled config.Key[Settings, bool]
	// Interval selects features.maintenance.notifications.interval. Set accepts time.Duration.
	//
	// Interval separates runs. Each task keeps a stable offset within its
	// interval, so housekeeping does not pile onto the top of every hour.
	//
	Interval config.Key[Settings, time.Duration]
	// Batch selects features.maintenance.notifications.batch. Set accepts int.
	//
	// Batch bounds the rows one statement or transaction removes; MaxBatches
	// bounds the batches of one run, so a backlog continues at the next run.
	//
	Batch config.Key[Settings, int]
	// MaxBatches selects features.maintenance.notifications.max_batches. Set accepts int.
	MaxBatches config.Key[Settings, int]
	// Timeout selects features.maintenance.notifications.timeout. Set accepts time.Duration.
	//
	// Timeout bounds one run.
	//
	Timeout config.Key[Settings, time.Duration]
	// Retention selects features.maintenance.notifications.retention. Set accepts time.Duration.
	//
	// Retention keeps younger rows of stores pruned by age (outbox, job archive
	// and notification inbox).
	//
	Retention config.Key[Settings, time.Duration]
}

SettingsFeaturesMaintenanceNotificationsConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesMaintenanceOutboxConfigKeySet

type SettingsFeaturesMaintenanceOutboxConfigKeySet struct {
	// Disabled selects features.maintenance.outbox.disabled. Set accepts bool.
	//
	// Disabled turns this task off.
	//
	Disabled config.Key[Settings, bool]
	// Interval selects features.maintenance.outbox.interval. Set accepts time.Duration.
	//
	// Interval separates runs. Each task keeps a stable offset within its
	// interval, so housekeeping does not pile onto the top of every hour.
	//
	Interval config.Key[Settings, time.Duration]
	// Batch selects features.maintenance.outbox.batch. Set accepts int.
	//
	// Batch bounds the rows one statement or transaction removes; MaxBatches
	// bounds the batches of one run, so a backlog continues at the next run.
	//
	Batch config.Key[Settings, int]
	// MaxBatches selects features.maintenance.outbox.max_batches. Set accepts int.
	MaxBatches config.Key[Settings, int]
	// Timeout selects features.maintenance.outbox.timeout. Set accepts time.Duration.
	//
	// Timeout bounds one run.
	//
	Timeout config.Key[Settings, time.Duration]
	// Retention selects features.maintenance.outbox.retention. Set accepts time.Duration.
	//
	// Retention keeps younger rows of stores pruned by age (outbox, job archive
	// and notification inbox).
	//
	Retention config.Key[Settings, time.Duration]
}

SettingsFeaturesMaintenanceOutboxConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesMaintenanceSessionsConfigKeySet

type SettingsFeaturesMaintenanceSessionsConfigKeySet struct {
	// Disabled selects features.maintenance.sessions.disabled. Set accepts bool.
	//
	// Disabled turns this task off.
	//
	Disabled config.Key[Settings, bool]
	// Interval selects features.maintenance.sessions.interval. Set accepts time.Duration.
	//
	// Interval separates runs. Each task keeps a stable offset within its
	// interval, so housekeeping does not pile onto the top of every hour.
	//
	Interval config.Key[Settings, time.Duration]
	// Batch selects features.maintenance.sessions.batch. Set accepts int.
	//
	// Batch bounds the rows one statement or transaction removes; MaxBatches
	// bounds the batches of one run, so a backlog continues at the next run.
	//
	Batch config.Key[Settings, int]
	// MaxBatches selects features.maintenance.sessions.max_batches. Set accepts int.
	MaxBatches config.Key[Settings, int]
	// Timeout selects features.maintenance.sessions.timeout. Set accepts time.Duration.
	//
	// Timeout bounds one run.
	//
	Timeout config.Key[Settings, time.Duration]
	// Retention selects features.maintenance.sessions.retention. Set accepts time.Duration.
	//
	// Retention keeps younger rows of stores pruned by age (outbox, job archive
	// and notification inbox).
	//
	Retention config.Key[Settings, time.Duration]
}

SettingsFeaturesMaintenanceSessionsConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesMaintenanceTokensConfigKeySet

type SettingsFeaturesMaintenanceTokensConfigKeySet struct {
	// Disabled selects features.maintenance.tokens.disabled. Set accepts bool.
	//
	// Disabled turns this task off.
	//
	Disabled config.Key[Settings, bool]
	// Interval selects features.maintenance.tokens.interval. Set accepts time.Duration.
	//
	// Interval separates runs. Each task keeps a stable offset within its
	// interval, so housekeeping does not pile onto the top of every hour.
	//
	Interval config.Key[Settings, time.Duration]
	// Batch selects features.maintenance.tokens.batch. Set accepts int.
	//
	// Batch bounds the rows one statement or transaction removes; MaxBatches
	// bounds the batches of one run, so a backlog continues at the next run.
	//
	Batch config.Key[Settings, int]
	// MaxBatches selects features.maintenance.tokens.max_batches. Set accepts int.
	MaxBatches config.Key[Settings, int]
	// Timeout selects features.maintenance.tokens.timeout. Set accepts time.Duration.
	//
	// Timeout bounds one run.
	//
	Timeout config.Key[Settings, time.Duration]
	// Retention selects features.maintenance.tokens.retention. Set accepts time.Duration.
	//
	// Retention keeps younger rows of stores pruned by age (outbox, job archive
	// and notification inbox).
	//
	Retention config.Key[Settings, time.Duration]
}

SettingsFeaturesMaintenanceTokensConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesNotificationsConfigKeySet

type SettingsFeaturesNotificationsConfigKeySet struct {
	// Enabled selects features.notifications.enabled. Set accepts bool.
	Enabled config.Key[Settings, bool]
	// Database selects features.notifications.database. Set accepts database.ConnectionName.
	Database config.Key[Settings, database.ConnectionName]
	// Schema selects features.notifications.schema. Set accepts string.
	Schema config.Key[Settings, string]
	// MaxActive selects features.notifications.max_active. Set accepts int.
	MaxActive config.Key[Settings, int]
	// Timeout selects features.notifications.timeout. Set accepts time.Duration.
	Timeout config.Key[Settings, time.Duration]
}

SettingsFeaturesNotificationsConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesObservabilityConfigKeySet

type SettingsFeaturesObservabilityConfigKeySet struct {
	// Enabled selects features.observability.enabled. Set accepts bool.
	Enabled config.Key[Settings, bool]
	// Maintenance selects features.observability.maintenance. Set accepts bool.
	Maintenance config.Key[Settings, bool]
	// MaxSeries selects features.observability.max_series. Set accepts int.
	MaxSeries config.Key[Settings, int]
	// MaxRecent selects features.observability.max_recent. Set accepts int.
	MaxRecent config.Key[Settings, int]
	// MaxActive selects features.observability.max_active. Set accepts int.
	MaxActive config.Key[Settings, int]
	// ErrorQueue selects features.observability.error_queue. Set accepts int.
	ErrorQueue config.Key[Settings, int]
	// ReporterConcurrency selects features.observability.reporter_concurrency. Set accepts int.
	ReporterConcurrency config.Key[Settings, int]
	// ReporterTimeout selects features.observability.reporter_timeout. Set accepts time.Duration.
	ReporterTimeout config.Key[Settings, time.Duration]
	// SampleTraces selects features.observability.sample_traces. Set accepts bool.
	SampleTraces config.Key[Settings, bool]
	// TraceSampleRatio selects features.observability.trace_sample_ratio. Set accepts float64.
	//
	// TraceSampleRatio selects the sampled fraction of traces; zero means 1.
	//
	TraceSampleRatio config.Key[Settings, float64]
	// TraceQueue selects features.observability.trace_queue. Set accepts int.
	TraceQueue config.Key[Settings, int]
	// TraceConcurrency selects features.observability.trace_concurrency. Set accepts int.
	TraceConcurrency config.Key[Settings, int]
	// TraceBatchSize selects features.observability.trace_batch_size. Set accepts int.
	TraceBatchSize config.Key[Settings, int]
	// TraceTimeout selects features.observability.trace_timeout. Set accepts time.Duration.
	TraceTimeout config.Key[Settings, time.Duration]
	ErrorLog     SettingsFeaturesObservabilityErrorLogConfigKeySet
}

SettingsFeaturesObservabilityConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesObservabilityErrorLogConfigKeySet

type SettingsFeaturesObservabilityErrorLogConfigKeySet struct {
	// Enabled selects features.observability.error_log.enabled. Set accepts bool.
	Enabled config.Key[Settings, bool]
	// Window selects features.observability.error_log.window. Set accepts time.Duration.
	Window config.Key[Settings, time.Duration]
	// MaxFingerprints selects features.observability.error_log.max_fingerprints. Set accepts int.
	MaxFingerprints config.Key[Settings, int]
	// DontReportFaults selects features.observability.error_log.dont_report_faults. Set accepts []foundryfault.Code.
	DontReportFaults config.Key[Settings, []foundryfault.Code]
	// DontReportStatuses selects features.observability.error_log.dont_report_statuses. Set accepts []int.
	DontReportStatuses config.Key[Settings, []int]
}

SettingsFeaturesObservabilityErrorLogConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesOutboxConfigKeySet

type SettingsFeaturesOutboxConfigKeySet struct {
	// Enabled selects features.outbox.enabled. Set accepts bool.
	Enabled config.Key[Settings, bool]
	// Database selects features.outbox.database. Set accepts database.ConnectionName.
	Database config.Key[Settings, database.ConnectionName]
	// Schema selects features.outbox.schema. Set accepts string.
	Schema config.Key[Settings, string]
	// Jobs selects features.outbox.jobs. Set accepts map[jobs.ConnectionName]outbox.Destination.
	Jobs config.Key[Settings, map[jobs.ConnectionName]outbox.Destination]
	// Events selects features.outbox.events. Set accepts map[outbox.Destination]jobs.ConnectionName.
	//
	// Events maps declared EventOutbox destinations to durable job connections.
	// Empty connection selects the default. Each connection uses its default
	// queue and jobs.DefaultPolicy for the framework event delivery job.
	//
	Events config.Key[Settings, map[outbox.Destination]jobs.ConnectionName]
	// Kernels selects features.outbox.kernels. Set accepts []foundation.KernelKind.
	Kernels config.Key[Settings, []foundation.KernelKind]
	// MaxAttempts selects features.outbox.max_attempts. Set accepts uint32.
	MaxAttempts config.Key[Settings, uint32]
	// RetryDelay selects features.outbox.retry_delay. Set accepts time.Duration.
	RetryDelay config.Key[Settings, time.Duration]
	// OperationTimeout selects features.outbox.operation_timeout. Set accepts time.Duration.
	OperationTimeout config.Key[Settings, time.Duration]
	// PollInterval selects features.outbox.poll_interval. Set accepts time.Duration.
	PollInterval config.Key[Settings, time.Duration]
	// MaxRetryDelay selects features.outbox.max_retry_delay. Set accepts time.Duration.
	MaxRetryDelay config.Key[Settings, time.Duration]
	// Jitter selects features.outbox.jitter. Set accepts time.Duration.
	Jitter config.Key[Settings, time.Duration]
	// MaxPollInterval selects features.outbox.max_poll_interval. Set accepts time.Duration.
	MaxPollInterval config.Key[Settings, time.Duration]
	// MaxInFlight selects features.outbox.max_in_flight. Set accepts int.
	MaxInFlight config.Key[Settings, int]
}

SettingsFeaturesOutboxConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesReportsConfigConfigKeySet

type SettingsFeaturesReportsConfigConfigKeySet struct {
	// TimeZone selects features.reports.config.time_zone. Set accepts temporal.ZoneName.
	//
	// TimeZone is the default export presentation zone. Empty means UTC for a
	// direct manager, or inherits the application timezone during assembly.
	//
	TimeZone config.Key[Settings, temporal.ZoneName]
	// Schema selects features.reports.config.schema. Set accepts string.
	Schema config.Key[Settings, string]
	// MaxActive selects features.reports.config.max_active. Set accepts int.
	MaxActive config.Key[Settings, int]
	// Timeout selects features.reports.config.timeout. Set accepts time.Duration.
	Timeout config.Key[Settings, time.Duration]
	// MaxPageSize selects features.reports.config.max_page_size. Set accepts int.
	MaxPageSize config.Key[Settings, int]
	// MaxOffset selects features.reports.config.max_offset. Set accepts int.
	MaxOffset config.Key[Settings, int]
	// MaxRowBytes selects features.reports.config.max_row_bytes. Set accepts int.
	MaxRowBytes config.Key[Settings, int]
	// MaxPageBytes selects features.reports.config.max_page_bytes. Set accepts int.
	MaxPageBytes config.Key[Settings, int]
	// MaxExports selects features.reports.config.max_exports. Set accepts int.
	//
	// MaxExports bounds concurrent export generation (query, formatting and
	// file writing). A slot is released once the artifact is complete.
	//
	MaxExports config.Key[Settings, int]
	// MaxArtifacts selects features.reports.config.max_artifacts. Set accepts int.
	//
	// MaxArtifacts bounds completed artifacts still open for delivery, and so
	// the private temporary files held on disk. It is at least MaxExports.
	//
	MaxArtifacts config.Key[Settings, int]
	// ExportTimeout selects features.reports.config.export_timeout. Set accepts time.Duration.
	ExportTimeout config.Key[Settings, time.Duration]
	// MaxExportRows selects features.reports.config.max_export_rows. Set accepts int.
	MaxExportRows config.Key[Settings, int]
	// MaxExportBytes selects features.reports.config.max_export_bytes. Set accepts int64.
	MaxExportBytes config.Key[Settings, int64]
	// MaxXMLBytes selects features.reports.config.max_xml_bytes. Set accepts int64.
	MaxXMLBytes config.Key[Settings, int64]
	// MaxCellBytes selects features.reports.config.max_cell_bytes. Set accepts int.
	MaxCellBytes config.Key[Settings, int]
	// TempDir selects features.reports.config.temp_dir. Set accepts string.
	TempDir config.Key[Settings, string]
}

SettingsFeaturesReportsConfigConfigKeySet exposes compiler-checked configuration overrides.

type SettingsFeaturesReportsConfigKeySet

type SettingsFeaturesReportsConfigKeySet struct {
	// Enabled selects features.reports.enabled. Set accepts bool.
	Enabled config.Key[Settings, bool]
	// Database selects features.reports.database. Set accepts database.ConnectionName.
	Database config.Key[Settings, database.ConnectionName]
	Config   SettingsFeaturesReportsConfigConfigKeySet
}

SettingsFeaturesReportsConfigKeySet exposes compiler-checked configuration overrides.

type SettingsHTTPConfigKeySet

type SettingsHTTPConfigKeySet struct {
	StatementDetector SettingsHTTPStatementDetectorConfigKeySet
	// Enabled selects http.enabled. Set accepts bool.
	Enabled config.Key[Settings, bool]
	Server  SettingsHTTPServerConfigKeySet
	// SecurityHeaders selects http.security_headers. Set accepts bool.
	SecurityHeaders config.Key[Settings, bool]
	Probes          SettingsHTTPProbesConfigKeySet
}

SettingsHTTPConfigKeySet exposes compiler-checked configuration overrides.

type SettingsHTTPProbesConfigKeySet

type SettingsHTTPProbesConfigKeySet struct {
	// Liveness selects http.probes.liveness. Set accepts bool.
	Liveness config.Key[Settings, bool]
	// LivenessPath selects http.probes.liveness_path. Set accepts string.
	LivenessPath config.Key[Settings, string]
	// Readiness selects http.probes.readiness. Set accepts bool.
	Readiness config.Key[Settings, bool]
	// ReadinessPath selects http.probes.readiness_path. Set accepts string.
	ReadinessPath config.Key[Settings, string]
	// ReadinessCache selects http.probes.readiness_cache. Set accepts time.Duration.
	//
	// ReadinessCache is how long public readiness reuses one dependency check
	// (100ms to one minute); lifecycle and maintenance state are read live.
	//
	ReadinessCache config.Key[Settings, time.Duration]
}

SettingsHTTPProbesConfigKeySet exposes compiler-checked configuration overrides.

type SettingsHTTPServerConfigKeySet

type SettingsHTTPServerConfigKeySet struct {
	// Address selects http.server.address. Set accepts string.
	//
	// Address is a TCP host:port. Port zero allocates a port reported by Ready.
	//
	Address config.Key[Settings, string]
	// ReadHeaderTimeout selects http.server.read_header_timeout. Set accepts time.Duration.
	//
	// ReadHeaderTimeout bounds socket time spent reading request headers.
	//
	ReadHeaderTimeout config.Key[Settings, time.Duration]
	// ReadTimeout selects http.server.read_timeout. Set accepts time.Duration.
	//
	// ReadTimeout bounds reading the full request, including its body. It does
	// not terminate handler computations or replace their context deadlines.
	//
	ReadTimeout config.Key[Settings, time.Duration]
	// WriteTimeout selects http.server.write_timeout. Set accepts time.Duration.
	//
	// WriteTimeout bounds response socket writes, including streaming writes.
	// It does not terminate a handler that ignores write errors/cancellation.
	//
	WriteTimeout config.Key[Settings, time.Duration]
	// IdleTimeout selects http.server.idle_timeout. Set accepts time.Duration.
	//
	// IdleTimeout bounds waiting for another request on a keep-alive connection.
	//
	IdleTimeout config.Key[Settings, time.Duration]
	// RequestTimeout selects http.server.request_timeout. Set accepts time.Duration.
	//
	// RequestTimeout bounds the request context after admission. Cooperative
	// handlers and database calls observe its cancellation. Ownership lasts
	// until actual handler exit; raw handlers own their response behavior.
	// A matched route declared with WithTimeout replaces it for that route.
	//
	RequestTimeout config.Key[Settings, time.Duration]
	// ShutdownTimeout selects http.server.shutdown_timeout. Set accepts time.Duration.
	//
	// ShutdownTimeout allows admitted handlers to finish before cancellation and
	// connection closure. Dependency ownership still lasts until actual exit.
	//
	ShutdownTimeout config.Key[Settings, time.Duration]
	// MaxHeaderBytes selects http.server.max_header_bytes. Set accepts int.
	//
	// MaxHeaderBytes configures the native net/http request-header limit.
	//
	MaxHeaderBytes config.Key[Settings, int]
	// MaxBodyBytes selects http.server.max_body_bytes. Set accepts int64.
	//
	// MaxBodyBytes is a positive default ceiling for known and streamed bodies.
	// Increasing it does not preallocate a buffer; raw handlers own their reads.
	// A matched route declared with WithBodyLimit replaces it for that route only.
	//
	MaxBodyBytes config.Key[Settings, int64]
	// MaxConcurrentRequests selects http.server.max_concurrent_requests. Set accepts int.
	//
	// MaxConcurrentRequests bounds handlers that have actually entered the
	// server. Zero uses DefaultServerConfig's limit. A request waits briefly for
	// a slot in arrival order (at most min(RequestTimeout, 5s)); exhaustion then
	// returns 503 with Retry-After. Cancelled handlers retain their slot until
	// they really return.
	//
	MaxConcurrentRequests config.Key[Settings, int]
	// MaxConnections selects http.server.max_connections. Set accepts int.
	//
	// MaxConnections bounds accepted TCP connections, including connections
	// still reading headers and hijacked connections until their owner closes
	// them. Zero uses the default. Extra peers wait in the OS listen backlog.
	//
	MaxConnections config.Key[Settings, int]
	// TrustTraceContext selects http.server.trust_trace_context. Set accepts bool.
	//
	// TrustTraceContext accepts valid W3C trace headers as correlation metadata.
	// It grants no identity or sampling authority. False starts a fresh trace
	// for every request; invalid or duplicate parents also start a fresh trace.
	//
	TrustTraceContext config.Key[Settings, bool]
	// MaintenanceReadPaths selects http.server.maintenance_read_paths. Set accepts []string.
	//
	// MaintenanceReadPaths permits GET/HEAD on at most 16 exact static paths
	// while paused or draining. Use URLs derived from protected diagnostics
	// routes. This bypasses only maintenance admission: normal route auth,
	// policies, request limits and actual server shutdown still apply.
	//
	MaintenanceReadPaths config.Key[Settings, []string]
	// AccessLog selects http.server.access_log. Set accepts bool.
	//
	// AccessLog emits one metadata-only completion event to the server logger.
	//
	AccessLog config.Key[Settings, bool]
}

SettingsHTTPServerConfigKeySet exposes compiler-checked configuration overrides.

type SettingsHTTPStatementDetectorConfigKeySet

type SettingsHTTPStatementDetectorConfigKeySet struct {
	// Enabled selects http.statement_detector.enabled. Set accepts bool.
	Enabled config.Key[Settings, bool]
	// AllowNonDevelopment selects http.statement_detector.allow_non_development. Set accepts bool.
	AllowNonDevelopment config.Key[Settings, bool]
	Limits              SettingsHTTPStatementDetectorLimitsConfigKeySet
}

SettingsHTTPStatementDetectorConfigKeySet exposes compiler-checked configuration overrides.

type SettingsHTTPStatementDetectorLimitsConfigKeySet

type SettingsHTTPStatementDetectorLimitsConfigKeySet struct {
	// Threshold selects http.statement_detector.limits.threshold. Set accepts int.
	Threshold config.Key[Settings, int]
	// MaxShapes selects http.statement_detector.limits.max_shapes. Set accepts int.
	MaxShapes config.Key[Settings, int]
}

SettingsHTTPStatementDetectorLimitsConfigKeySet exposes compiler-checked configuration overrides.

type SettingsImageConfigConfigKeySet

type SettingsImageConfigConfigKeySet struct {
	// Backend selects image.config.backend. Set accepts imaging.Backend.
	Backend config.Key[Settings, imaging.Backend]
	Limits  SettingsImageConfigLimitsConfigKeySet
	// MaxActive selects image.config.max_active. Set accepts int.
	MaxActive config.Key[Settings, int]
	// Timeout selects image.config.timeout. Set accepts time.Duration.
	Timeout config.Key[Settings, time.Duration]
}

SettingsImageConfigConfigKeySet exposes compiler-checked configuration overrides.

type SettingsImageConfigKeySet

type SettingsImageConfigKeySet struct {
	// Enabled selects image.enabled. Set accepts bool.
	Enabled config.Key[Settings, bool]
	Config  SettingsImageConfigConfigKeySet
}

SettingsImageConfigKeySet exposes compiler-checked configuration overrides.

type SettingsImageConfigLimitsConfigKeySet

type SettingsImageConfigLimitsConfigKeySet struct {
	// InputBytes selects image.config.limits.input_bytes. Set accepts int64.
	InputBytes config.Key[Settings, int64]
	// OutputBytes selects image.config.limits.output_bytes. Set accepts int64.
	OutputBytes config.Key[Settings, int64]
	// Width selects image.config.limits.width. Set accepts int.
	Width config.Key[Settings, int]
	// Height selects image.config.limits.height. Set accepts int.
	Height config.Key[Settings, int]
	// Pixels selects image.config.limits.pixels. Set accepts int64.
	Pixels config.Key[Settings, int64]
	// Frames selects image.config.limits.frames. Set accepts int.
	Frames config.Key[Settings, int]
	// WorkingBytes selects image.config.limits.working_bytes. Set accepts int64.
	WorkingBytes config.Key[Settings, int64]
}

SettingsImageConfigLimitsConfigKeySet exposes compiler-checked configuration overrides.

type SettingsLogConfigKeySet

type SettingsLogConfigKeySet struct {
	// Default selects log.default. Set accepts logging.ChannelName.
	Default config.Key[Settings, logging.ChannelName]
	// Channels selects log.channels. Set accepts LogChannels.
	Channels config.Key[Settings, LogChannels]
}

SettingsLogConfigKeySet exposes compiler-checked configuration overrides.

type SettingsMaintenanceConfigKeySet

type SettingsMaintenanceConfigKeySet struct {
	// Store selects maintenance.store. Set accepts cache.StoreName.
	Store config.Key[Settings, cache.StoreName]
	// PollInterval selects maintenance.poll_interval. Set accepts time.Duration.
	PollInterval config.Key[Settings, time.Duration]
	// Exempt selects maintenance.exempt. Set accepts []maintenance.Rule.
	Exempt config.Key[Settings, []maintenance.Rule]
	// Allow selects maintenance.allow. Set accepts []netip.Prefix.
	Allow config.Key[Settings, []netip.Prefix]
	// BypassTTL selects maintenance.bypass_ttl. Set accepts time.Duration.
	BypassTTL config.Key[Settings, time.Duration]
}

SettingsMaintenanceConfigKeySet exposes compiler-checked configuration overrides.

type SettingsRealtimeConfigConfigKeySet

type SettingsRealtimeConfigConfigKeySet struct {
	// MaxPresenceScopes selects realtime.config.max_presence_scopes. Set accepts int.
	MaxPresenceScopes config.Key[Settings, int]
	// MaxConnections selects realtime.config.max_connections. Set accepts int.
	MaxConnections config.Key[Settings, int]
	// MaxSubscriptions selects realtime.config.max_subscriptions. Set accepts int.
	MaxSubscriptions config.Key[Settings, int]
	// MaxFrameBytes selects realtime.config.max_frame_bytes. Set accepts int.
	MaxFrameBytes config.Key[Settings, int]
	// InboundQueue selects realtime.config.inbound_queue. Set accepts int.
	//
	// InboundQueue bounds frames read but not yet processed. Generated clients
	// limit their in-flight operations to it; overflowing it closes the socket.
	//
	InboundQueue config.Key[Settings, int]
	// OutboundQueue selects realtime.config.outbound_queue. Set accepts int.
	//
	// OutboundQueue bounds queued frames per connection. MaxQueuedBytes bounds
	// their actual bytes, including inbound frames and pending-admission
	// buffers; MaxTotalQueuedBytes bounds all connections together. Exceeding
	// either disconnects the slow connection instead of blocking publishers.
	//
	OutboundQueue config.Key[Settings, int]
	// MaxQueuedBytes selects realtime.config.max_queued_bytes. Set accepts int.
	MaxQueuedBytes config.Key[Settings, int]
	// MaxTotalQueuedBytes selects realtime.config.max_total_queued_bytes. Set accepts int64.
	MaxTotalQueuedBytes config.Key[Settings, int64]
	// MaxOperations selects realtime.config.max_operations. Set accepts int.
	//
	// MaxOperations bounds concurrent trusted publication, presence and
	// disconnect operations. Callers wait briefly, then receive fault.Overloaded.
	//
	MaxOperations config.Key[Settings, int]
	// MaxPresenceMembers selects realtime.config.max_presence_members. Set accepts int.
	MaxPresenceMembers config.Key[Settings, int]
	// MaxMemberBytes selects realtime.config.max_member_bytes. Set accepts int.
	MaxMemberBytes config.Key[Settings, int]
	// OperationTimeout selects realtime.config.operation_timeout. Set accepts time.Duration.
	OperationTimeout config.Key[Settings, time.Duration]
	// WriteTimeout selects realtime.config.write_timeout. Set accepts time.Duration.
	WriteTimeout config.Key[Settings, time.Duration]
	// HeartbeatInterval selects realtime.config.heartbeat_interval. Set accepts time.Duration.
	HeartbeatInterval config.Key[Settings, time.Duration]
	// PongTimeout selects realtime.config.pong_timeout. Set accepts time.Duration.
	PongTimeout config.Key[Settings, time.Duration]
	// AuthRefreshInterval selects realtime.config.auth_refresh_interval. Set accepts time.Duration.
	AuthRefreshInterval config.Key[Settings, time.Duration]
	// DrainTimeout selects realtime.config.drain_timeout. Set accepts time.Duration.
	DrainTimeout config.Key[Settings, time.Duration]
	// MaxConnectionsPerIP selects realtime.config.max_connections_per_ip. Set accepts int.
	MaxConnectionsPerIP config.Key[Settings, int]
	// MaxConnectionsPerSubject selects realtime.config.max_connections_per_subject. Set accepts int.
	MaxConnectionsPerSubject config.Key[Settings, int]
	// DeduplicationEntries selects realtime.config.deduplication_entries. Set accepts int.
	DeduplicationEntries config.Key[Settings, int]
	MessageRate          SettingsRealtimeConfigMessageRateConfigKeySet
	Payload              SettingsRealtimeConfigPayloadConfigKeySet
	// AdditionalOrigins selects realtime.config.additional_origins. Set accepts []http.Origin.
	//
	// AdditionalOrigins are exact HTTP(S) origins, never wildcard patterns.
	// Same-origin is accepted after trusted-proxy handling. Originless clients
	// must be explicitly allowed; serialized opaque/null origins never are.
	//
	AdditionalOrigins config.Key[Settings, []http.Origin]
	// AllowOriginless selects realtime.config.allow_originless. Set accepts bool.
	AllowOriginless config.Key[Settings, bool]
}

SettingsRealtimeConfigConfigKeySet exposes compiler-checked configuration overrides.

type SettingsRealtimeConfigKeySet

type SettingsRealtimeConfigKeySet struct {
	// Enabled selects realtime.enabled. Set accepts bool.
	Enabled config.Key[Settings, bool]
	// Shared selects realtime.shared. Set accepts bool.
	//
	// Shared serves upgrades at Path on the application HTTP listener instead
	// of a dedicated listener and WebSocket kernel; running foundation.HTTP then
	// serves both. HTTP request/connection limits must accommodate sockets.
	//
	Shared config.Key[Settings, bool]
	// Publisher selects realtime.publisher. Set accepts bool.
	//
	// Publisher constructs a managed cross-process publisher for processes
	// that run no hub, such as workers. It requires a cluster connection and
	// the same channel declarations as the socket servers.
	//
	Publisher config.Key[Settings, bool]
	// Connection selects realtime.connection. Set accepts websocket.ConnectionName.
	Connection config.Key[Settings, websocket.ConnectionName]
	Config     SettingsRealtimeConfigConfigKeySet
	HTTP       SettingsRealtimeHTTPConfigKeySet
	// Path selects realtime.path. Set accepts string.
	Path config.Key[Settings, string]
}

SettingsRealtimeConfigKeySet exposes compiler-checked configuration overrides.

type SettingsRealtimeConfigMessageRateConfigKeySet

type SettingsRealtimeConfigMessageRateConfigKeySet struct {
	// Requests selects realtime.config.message_rate.requests. Set accepts uint32.
	Requests config.Key[Settings, uint32]
	// Window selects realtime.config.message_rate.window. Set accepts time.Duration.
	Window config.Key[Settings, time.Duration]
}

SettingsRealtimeConfigMessageRateConfigKeySet exposes compiler-checked configuration overrides.

type SettingsRealtimeConfigPayloadConfigKeySet

type SettingsRealtimeConfigPayloadConfigKeySet struct {
	// Bytes selects realtime.config.payload.bytes. Set accepts int.
	Bytes config.Key[Settings, int]
	// Depth selects realtime.config.payload.depth. Set accepts int.
	Depth config.Key[Settings, int]
	// Nodes selects realtime.config.payload.nodes. Set accepts int.
	Nodes config.Key[Settings, int]
	// Steps selects realtime.config.payload.steps. Set accepts int.
	Steps config.Key[Settings, int]
	// Issues selects realtime.config.payload.issues. Set accepts int.
	Issues config.Key[Settings, int]
}

SettingsRealtimeConfigPayloadConfigKeySet exposes compiler-checked configuration overrides.

type SettingsRealtimeHTTPConfigKeySet

type SettingsRealtimeHTTPConfigKeySet struct {
	// Address selects realtime.http.address. Set accepts string.
	//
	// Address is a TCP host:port. Port zero allocates a port reported by Ready.
	//
	Address config.Key[Settings, string]
	// ReadHeaderTimeout selects realtime.http.read_header_timeout. Set accepts time.Duration.
	//
	// ReadHeaderTimeout bounds socket time spent reading request headers.
	//
	ReadHeaderTimeout config.Key[Settings, time.Duration]
	// ReadTimeout selects realtime.http.read_timeout. Set accepts time.Duration.
	//
	// ReadTimeout bounds reading the full request, including its body. It does
	// not terminate handler computations or replace their context deadlines.
	//
	ReadTimeout config.Key[Settings, time.Duration]
	// WriteTimeout selects realtime.http.write_timeout. Set accepts time.Duration.
	//
	// WriteTimeout bounds response socket writes, including streaming writes.
	// It does not terminate a handler that ignores write errors/cancellation.
	//
	WriteTimeout config.Key[Settings, time.Duration]
	// IdleTimeout selects realtime.http.idle_timeout. Set accepts time.Duration.
	//
	// IdleTimeout bounds waiting for another request on a keep-alive connection.
	//
	IdleTimeout config.Key[Settings, time.Duration]
	// RequestTimeout selects realtime.http.request_timeout. Set accepts time.Duration.
	//
	// RequestTimeout bounds the request context after admission. Cooperative
	// handlers and database calls observe its cancellation. Ownership lasts
	// until actual handler exit; raw handlers own their response behavior.
	// A matched route declared with WithTimeout replaces it for that route.
	//
	RequestTimeout config.Key[Settings, time.Duration]
	// ShutdownTimeout selects realtime.http.shutdown_timeout. Set accepts time.Duration.
	//
	// ShutdownTimeout allows admitted handlers to finish before cancellation and
	// connection closure. Dependency ownership still lasts until actual exit.
	//
	ShutdownTimeout config.Key[Settings, time.Duration]
	// MaxHeaderBytes selects realtime.http.max_header_bytes. Set accepts int.
	//
	// MaxHeaderBytes configures the native net/http request-header limit.
	//
	MaxHeaderBytes config.Key[Settings, int]
	// MaxBodyBytes selects realtime.http.max_body_bytes. Set accepts int64.
	//
	// MaxBodyBytes is a positive default ceiling for known and streamed bodies.
	// Increasing it does not preallocate a buffer; raw handlers own their reads.
	// A matched route declared with WithBodyLimit replaces it for that route only.
	//
	MaxBodyBytes config.Key[Settings, int64]
	// MaxConcurrentRequests selects realtime.http.max_concurrent_requests. Set accepts int.
	//
	// MaxConcurrentRequests bounds handlers that have actually entered the
	// server. Zero uses DefaultServerConfig's limit. A request waits briefly for
	// a slot in arrival order (at most min(RequestTimeout, 5s)); exhaustion then
	// returns 503 with Retry-After. Cancelled handlers retain their slot until
	// they really return.
	//
	MaxConcurrentRequests config.Key[Settings, int]
	// MaxConnections selects realtime.http.max_connections. Set accepts int.
	//
	// MaxConnections bounds accepted TCP connections, including connections
	// still reading headers and hijacked connections until their owner closes
	// them. Zero uses the default. Extra peers wait in the OS listen backlog.
	//
	MaxConnections config.Key[Settings, int]
	// TrustTraceContext selects realtime.http.trust_trace_context. Set accepts bool.
	//
	// TrustTraceContext accepts valid W3C trace headers as correlation metadata.
	// It grants no identity or sampling authority. False starts a fresh trace
	// for every request; invalid or duplicate parents also start a fresh trace.
	//
	TrustTraceContext config.Key[Settings, bool]
	// MaintenanceReadPaths selects realtime.http.maintenance_read_paths. Set accepts []string.
	//
	// MaintenanceReadPaths permits GET/HEAD on at most 16 exact static paths
	// while paused or draining. Use URLs derived from protected diagnostics
	// routes. This bypasses only maintenance admission: normal route auth,
	// policies, request limits and actual server shutdown still apply.
	//
	MaintenanceReadPaths config.Key[Settings, []string]
	// AccessLog selects realtime.http.access_log. Set accepts bool.
	//
	// AccessLog emits one metadata-only completion event to the server logger.
	//
	AccessLog config.Key[Settings, bool]
}

SettingsRealtimeHTTPConfigKeySet exposes compiler-checked configuration overrides.

type SettingsSchedulerConfigKeySet

type SettingsSchedulerConfigKeySet struct {
	// Enabled selects scheduler.enabled. Set accepts bool.
	Enabled config.Key[Settings, bool]
	// Group selects scheduler.group. Set accepts schedule.Group.
	Group config.Key[Settings, schedule.Group]
	// Concurrency selects scheduler.concurrency. Set accepts int.
	Concurrency config.Key[Settings, int]
	// MaxHistory selects scheduler.max_history. Set accepts int.
	MaxHistory config.Key[Settings, int]
	// MaxPerTick selects scheduler.max_per_tick. Set accepts int.
	MaxPerTick config.Key[Settings, int]
	// PollInterval selects scheduler.poll_interval. Set accepts time.Duration.
	PollInterval config.Key[Settings, time.Duration]
	// LeadershipTTL selects scheduler.leadership_ttl. Set accepts time.Duration.
	LeadershipTTL config.Key[Settings, time.Duration]
	// Grace selects scheduler.grace. Set accepts time.Duration.
	Grace config.Key[Settings, time.Duration]
	// CapacityWait selects scheduler.capacity_wait. Set accepts time.Duration.
	CapacityWait config.Key[Settings, time.Duration]
	// DrainTimeout selects scheduler.drain_timeout. Set accepts time.Duration.
	DrainTimeout config.Key[Settings, time.Duration]
}

SettingsSchedulerConfigKeySet exposes compiler-checked configuration overrides.

type SettingsServicesCacheConfigKeySet

type SettingsServicesCacheConfigKeySet struct {
	// Default selects services.cache.default. Set accepts cache.StoreName.
	Default config.Key[Settings, cache.StoreName]
	// Stores selects services.cache.stores. Set accepts infrastructure.CacheStores.
	Stores config.Key[Settings, infrastructure.CacheStores]
}

SettingsServicesCacheConfigKeySet exposes compiler-checked configuration overrides.

type SettingsServicesConfigKeySet

SettingsServicesConfigKeySet exposes compiler-checked configuration overrides.

type SettingsServicesCoordinationConfigConfigKeySet

type SettingsServicesCoordinationConfigConfigKeySet struct {
	Namespace SettingsServicesCoordinationConfigNamespaceConfigKeySet
	// MaxActive selects services.coordination.config.max_active. Set accepts int.
	MaxActive config.Key[Settings, int]
	// MaxDeclarations selects services.coordination.config.max_declarations. Set accepts int.
	MaxDeclarations config.Key[Settings, int]
	// MaxKeyBytes selects services.coordination.config.max_key_bytes. Set accepts int.
	MaxKeyBytes config.Key[Settings, int]
	// OperationTimeout selects services.coordination.config.operation_timeout. Set accepts time.Duration.
	OperationTimeout config.Key[Settings, time.Duration]
	// MaxWait selects services.coordination.config.max_wait. Set accepts time.Duration.
	MaxWait config.Key[Settings, time.Duration]
	// PollInterval selects services.coordination.config.poll_interval. Set accepts time.Duration.
	PollInterval config.Key[Settings, time.Duration]
}

SettingsServicesCoordinationConfigConfigKeySet exposes compiler-checked configuration overrides.

type SettingsServicesCoordinationConfigKeySet

type SettingsServicesCoordinationConfigKeySet struct {
	// Enabled selects services.coordination.enabled. Set accepts bool.
	Enabled config.Key[Settings, bool]
	// Driver selects services.coordination.driver. Set accepts infrastructure.CoordinationDriver.
	Driver config.Key[Settings, infrastructure.CoordinationDriver]
	// Redis selects services.coordination.redis. Set accepts redis.ConnectionName.
	Redis  config.Key[Settings, redis.ConnectionName]
	Config SettingsServicesCoordinationConfigConfigKeySet
	// MaxEntries selects services.coordination.max_entries. Set accepts int.
	MaxEntries config.Key[Settings, int]
}

SettingsServicesCoordinationConfigKeySet exposes compiler-checked configuration overrides.

type SettingsServicesCoordinationConfigNamespaceConfigKeySet

type SettingsServicesCoordinationConfigNamespaceConfigKeySet struct {
	// Application selects services.coordination.config.namespace.application. Set accepts string.
	Application config.Key[Settings, string]
	// Environment selects services.coordination.config.namespace.environment. Set accepts string.
	Environment config.Key[Settings, string]
}

SettingsServicesCoordinationConfigNamespaceConfigKeySet exposes compiler-checked configuration overrides.

type SettingsServicesDatabaseConfigKeySet

type SettingsServicesDatabaseConfigKeySet struct {
	// Default selects services.database.default. Set accepts database.ConnectionName.
	Default config.Key[Settings, database.ConnectionName]
	// MaxConnections selects services.database.max_connections. Set accepts int.
	MaxConnections config.Key[Settings, int]
	// Connections selects services.database.connections. Set accepts infrastructure.DatabaseConnections.
	Connections config.Key[Settings, infrastructure.DatabaseConnections]
}

SettingsServicesDatabaseConfigKeySet exposes compiler-checked configuration overrides.

type SettingsServicesHTTPClientsConfigKeySet

type SettingsServicesHTTPClientsConfigKeySet struct {
	// Default selects services.http_clients.default. Set accepts httpclient.Name.
	Default config.Key[Settings, httpclient.Name]
	// Clients selects services.http_clients.clients. Set accepts infrastructure.HTTPClients.
	Clients config.Key[Settings, infrastructure.HTTPClients]
}

SettingsServicesHTTPClientsConfigKeySet exposes compiler-checked configuration overrides.

type SettingsServicesJobsConfigKeySet

type SettingsServicesJobsConfigKeySet struct {
	// Default selects services.jobs.default. Set accepts jobs.ConnectionName.
	Default config.Key[Settings, jobs.ConnectionName]
	// Connections selects services.jobs.connections. Set accepts infrastructure.JobConnections.
	Connections config.Key[Settings, infrastructure.JobConnections]
}

SettingsServicesJobsConfigKeySet exposes compiler-checked configuration overrides.

type SettingsServicesMailConfigKeySet

type SettingsServicesMailConfigKeySet struct {
	// Default selects services.mail.default. Set accepts email.MailerName.
	Default config.Key[Settings, email.MailerName]
	// Mailers selects services.mail.mailers. Set accepts infrastructure.Mailers.
	Mailers config.Key[Settings, infrastructure.Mailers]
}

SettingsServicesMailConfigKeySet exposes compiler-checked configuration overrides.

type SettingsServicesNamespaceConfigKeySet

type SettingsServicesNamespaceConfigKeySet struct {
	// Application selects services.namespace.application. Set accepts string.
	Application config.Key[Settings, string]
	// Environment selects services.namespace.environment. Set accepts string.
	Environment config.Key[Settings, string]
}

SettingsServicesNamespaceConfigKeySet exposes compiler-checked configuration overrides.

type SettingsServicesPubSubConfigKeySet

type SettingsServicesPubSubConfigKeySet struct {
	// Default selects services.pub_sub.default. Set accepts pubsub.ConnectionName.
	Default config.Key[Settings, pubsub.ConnectionName]
	// Connections selects services.pub_sub.connections. Set accepts infrastructure.Brokers.
	Connections config.Key[Settings, infrastructure.Brokers]
}

SettingsServicesPubSubConfigKeySet exposes compiler-checked configuration overrides.

type SettingsServicesRealtimeConfigKeySet

type SettingsServicesRealtimeConfigKeySet struct {
	// Default selects services.realtime.default. Set accepts websocket.ConnectionName.
	Default config.Key[Settings, websocket.ConnectionName]
	// Connections selects services.realtime.connections. Set accepts infrastructure.RealtimeConnections.
	Connections config.Key[Settings, infrastructure.RealtimeConnections]
}

SettingsServicesRealtimeConfigKeySet exposes compiler-checked configuration overrides.

type SettingsServicesRedisConfigKeySet

type SettingsServicesRedisConfigKeySet struct {
	// Default selects services.redis.default. Set accepts redis.ConnectionName.
	Default config.Key[Settings, redis.ConnectionName]
	// MaxConnections selects services.redis.max_connections. Set accepts int.
	MaxConnections config.Key[Settings, int]
	// Connections selects services.redis.connections. Set accepts infrastructure.RedisConnections.
	Connections config.Key[Settings, infrastructure.RedisConnections]
}

SettingsServicesRedisConfigKeySet exposes compiler-checked configuration overrides.

type SettingsServicesStorageConfigKeySet

type SettingsServicesStorageConfigKeySet struct {
	// Default selects services.storage.default. Set accepts storage.DiskID.
	Default config.Key[Settings, storage.DiskID]
	// Disks selects services.storage.disks. Set accepts infrastructure.Disks.
	Disks config.Key[Settings, infrastructure.Disks]
}

SettingsServicesStorageConfigKeySet exposes compiler-checked configuration overrides.

type SettingsWorkerArchiveConfigKeySet

type SettingsWorkerArchiveConfigKeySet struct {
	// Enabled selects worker.archive.enabled. Set accepts bool.
	Enabled config.Key[Settings, bool]
	// Database selects worker.archive.database. Set accepts database.ConnectionName.
	Database config.Key[Settings, database.ConnectionName]
	// Schema selects worker.archive.schema. Set accepts string.
	Schema config.Key[Settings, string]
}

SettingsWorkerArchiveConfigKeySet exposes compiler-checked configuration overrides.

type SettingsWorkerConfigConfigKeySet

type SettingsWorkerConfigConfigKeySet struct {
	// FailureLog selects worker.config.failure_log. Set accepts bool.
	FailureLog config.Key[Settings, bool]
	// RetryUnregistered selects worker.config.retry_unregistered. Set accepts bool.
	RetryUnregistered config.Key[Settings, bool]
	Namespace         SettingsWorkerConfigNamespaceConfigKeySet
	// Queues selects worker.config.queues. Set accepts []jobs.Subscription.
	Queues config.Key[Settings, []jobs.Subscription]
	// Concurrency selects worker.config.concurrency. Set accepts int.
	Concurrency config.Key[Settings, int]
	// LeaseDuration selects worker.config.lease_duration. Set accepts time.Duration.
	LeaseDuration config.Key[Settings, time.Duration]
	// HeartbeatInterval selects worker.config.heartbeat_interval. Set accepts time.Duration.
	HeartbeatInterval config.Key[Settings, time.Duration]
	// OperationTimeout selects worker.config.operation_timeout. Set accepts time.Duration.
	OperationTimeout config.Key[Settings, time.Duration]
	// PollInterval selects worker.config.poll_interval. Set accepts time.Duration.
	PollInterval config.Key[Settings, time.Duration]
	// MaxPollInterval selects worker.config.max_poll_interval. Set accepts time.Duration.
	MaxPollInterval config.Key[Settings, time.Duration]
	// DrainTimeout selects worker.config.drain_timeout. Set accepts time.Duration.
	DrainTimeout config.Key[Settings, time.Duration]
	// FailureBackoff selects worker.config.failure_backoff. Set accepts time.Duration.
	FailureBackoff config.Key[Settings, time.Duration]
}

SettingsWorkerConfigConfigKeySet exposes compiler-checked configuration overrides.

type SettingsWorkerConfigKeySet

type SettingsWorkerConfigKeySet struct {
	// Enabled selects worker.enabled. Set accepts bool.
	Enabled config.Key[Settings, bool]
	// Connection selects worker.connection. Set accepts jobs.ConnectionName.
	Connection config.Key[Settings, jobs.ConnectionName]
	Config     SettingsWorkerConfigConfigKeySet
	Archive    SettingsWorkerArchiveConfigKeySet
}

SettingsWorkerConfigKeySet exposes compiler-checked configuration overrides.

type SettingsWorkerConfigNamespaceConfigKeySet

type SettingsWorkerConfigNamespaceConfigKeySet struct {
	// Application selects worker.config.namespace.application. Set accepts string.
	Application config.Key[Settings, string]
	// Environment selects worker.config.namespace.environment. Set accepts string.
	Environment config.Key[Settings, string]
}

SettingsWorkerConfigNamespaceConfigKeySet exposes compiler-checked configuration overrides.

type StatementDetectorSettings

type StatementDetectorSettings struct {
	Enabled             bool
	AllowNonDevelopment bool
	Limits              database.StatementDetectorConfig
}

StatementDetectorSettings enables request-scoped N+1 warnings. Disabled installs nothing. Outside the "development" namespace, AllowNonDevelopment is required. Example: settings.HTTP.StatementDetector.Enabled = true.

type StoreSettings

type StoreSettings struct {
	Enabled   bool
	Database  database.ConnectionName
	Schema    string
	MaxActive int
	Timeout   time.Duration
}

StoreSettings addresses one existing PostgreSQL authority. Runtime callbacks and application time are supplied by the owning application, not deployment files.

func DefaultExtensionSettings

func DefaultExtensionSettings() StoreSettings

DefaultExtensionSettings returns default extension store settings.

func DefaultNotificationSettings

func DefaultNotificationSettings() StoreSettings

DefaultNotificationSettings returns default notification store settings.

type TokenGuard

type TokenGuard[M model.Identifiable, K any] struct {
	Tokens         *token.Tokens[M, K]
	Authentication *http.Authentication
	Binding        http.GuardBinding[M]
}

TokenGuard groups typed token operations, HTTP authentication, and their guard binding.

func NewTokenGuard

func NewTokenGuard[M model.Identifiable, K any](s Services, name auth.GuardName, provider auth.Provider[M, K], source auth.CredentialName, allowed auth.AccessScopes[M], opts ...token.Option) (TokenGuard[M, K], error)

NewTokenGuard binds a token guard to the configured token store; options such as token.WithLifetimes apply to this guard only.

type TokenSettings

type TokenSettings struct {
	Enabled  bool
	Database database.ConnectionName
	Schema   string
	Config   token.Config
}

TokenSettings configures the token store and its database schema.

type WorkerSettings

type WorkerSettings struct {
	Enabled    bool
	Connection jobs.ConnectionName
	Config     jobs.WorkerConfig
	Archive    JobArchiveSettings
}

WorkerSettings configures the worker connection, runtime, and archive.

func DefaultWorkerSettings

func DefaultWorkerSettings() WorkerSettings

DefaultWorkerSettings returns default worker settings with an archive in the public schema.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL