platform

package
v1.0.0-alpha.24 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2026 License: AGPL-3.0 Imports: 7 Imported by: 0

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.

Types

type ProjectCreator

type ProjectCreator interface {
	CreateWithID(ctx context.Context, id, name string, previewOrigins []string, seedDefaults bool) (*domain.Project, error)
}

ProjectCreator is the slice of service.ProjectService the bootstrap needs.

Jump to

Keyboard shortcuts

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