Documentation
¶
Overview ¶
Package storagelock refuses to boot the canonical Hanzo cloud orchestrator against Postgres.
The Go cloud binary (HIP-0106) is an orchestrator that mounts every Hanzo subsystem (iam, base, kms, commerce, ai, ...) into one process. It has no storage of its own — every subsystem owns its own per-(org, user) SQLite via hanzoai/base (HIP-0302).
Storage is per-(org, user) SQLite, always — there is no Postgres mode to fall back to. The lockdown makes that non-negotiable: if a manifest ever carries a Postgres pin (a `DATABASE_URL` / `driverName=postgres` knob), the binary refuses to boot rather than silently run on the wrong backend.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrPostgresForbidden = errors.New("cloud: Postgres is not a supported storage backend (use per-tenant SQLite via hanzoai/base)")
ErrPostgresForbidden is returned when an env var pins cloud at PG.
Functions ¶
func CheckEnv ¶
CheckEnv returns nil when the environment is clean, or a wrapped ErrPostgresForbidden enumerating every violation. cloud's main wires this and fails fast on any non-nil return.
func IsPostgres ¶
IsPostgres reports whether the value parses as a Postgres DSN.
Types ¶
type Violation ¶
Violation captures one offending (var, value) pair.
func Violations ¶
Violations enumerates every offending env var found in the supplied lookup function. The lookup is parameterised so tests can drive it without mutating os.Environ.
For driverName specifically, only "postgres" / "postgresql" values are violations; any other value (e.g. "sqlite") names the intended backend and is benign.