Documentation
¶
Overview ¶
Package platform bootstraps deployment-level platform resources at server startup. Today that is the single, flag-gated platform project (#605): when explicitly enabled, the server idempotently ensures the well-known platform project (domain.PlatformProjectID) exists, seeded well enough to serve a registration and a sign-in. Disabled (the default) is a no-op, so no deployment gets a platform project created silently.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Ensure ¶
func Ensure(ctx context.Context, projects ProjectCreator, pool service.StatementPool, enabled bool) error
Ensure idempotently creates the platform project when enabled, with the defaults a project needs to be usable: encryption and signing keys, the default user schema, and the default login flow definitions. A bare project row would satisfy the foreign keys and nothing else, so a deployment that bootstrapped one could not actually serve the registration the platform plane exists for.
The row carries the well-known domain.PlatformProjectID; the server owns that id, so there is nothing for a caller to pass. Disabled (the default) is a no-op.