Documentation
¶
Overview ¶
Package edition resolves the KOMBIFY_EDITION boot-config and exposes the provider/auth/billing wiring decisions it implies (ENTITLEMENTS-ARCHITECTURE.md §14, ENTITLEMENTS-ARCHITECTURE §7). It is dependency-free so every repo — SaaS and self-host — can import it.
Invariant (PRODUCT-SEGMENTATION): selfhost-oss has NO runtime gating — flags come from the build-time release manifest (static provider), and there are no Auth0/Stripe/FGA calls. The helpers below encode that invariant so call sites cannot accidentally violate it.
Index ¶
Constants ¶
const EnvVar = "KOMBIFY_EDITION"
EnvVar is the boot-config environment variable name.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Edition ¶
type Edition string
Edition is the deployment mode.
func Resolve ¶
func Resolve() Edition
Resolve reads KOMBIFY_EDITION from the environment. An unset or unrecognized value normalises to SelfhostOSS — the fail-safe that disables gating rather than risking an accidental lockout. SaaS deployments must set it explicitly; use ResolveStrict to enforce that.
func ResolveStrict ¶
ResolveStrict is like Resolve but reports whether the value was explicitly and validly set. Use in SaaS bootstraps to fail fast on misconfiguration.
func (Edition) FlagProvider ¶
FlagProvider returns the OpenFeature provider name this edition selects: "static" (selfhost-oss), "flagship-preview" (preview), or "flagship" (SaaS).
func (Edition) GatingEnabled ¶
GatingEnabled reports whether runtime feature-gating applies. False for selfhost-oss (all features on).
func (Edition) UsesStripe ¶
UsesStripe reports whether Stripe billing/entitlements are wired.