Documentation
¶
Overview ¶
Package edition reports which product edition is running.
One binary, three editions (see plan/2papi-3-editions-strategy.md):
- oss — open-source build, default;
- cloud — 2papi Cloud hosted build (enables tenant/billing paths);
- ent — enterprise build (license key required).
Detection order:
- 2PAPI_EDITION env ("oss" | "cloud" | "ent") — wins always;
- signed license file ("2papi.license", Ed25519, see internal/license) whose payload edition is "cloud:" / "ent:";
- otherwise OSS.
Index ¶
Constants ¶
const ( OSS = "oss" Cloud = "cloud" ENT = "ent" // EnvVar overrides detection for tests and deployments. EnvVar = "2PAPI_EDITION" // LicenseFile is probed when the env var is unset. LicenseFile = "2papi.license" )
Variables ¶
This section is empty.
Functions ¶
func Active ¶
func Active() string
Active returns the current edition id (oss|cloud|ent). It never fails: anything unrecognized degrades to OSS so a stray env value can never accidentally unlock paid code paths.
func IsEnterprise ¶
func IsEnterprise() bool
IsEnterprise reports whether enterprise-licensed paths may run.
Types ¶
This section is empty.