edition

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2026 License: Apache-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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:

  1. 2PAPI_EDITION env ("oss" | "cloud" | "ent") — wins always;
  2. signed license file ("2papi.license", Ed25519, see internal/license) whose payload edition is "cloud:" / "ent:";
  3. otherwise OSS.

Index

Constants

View Source
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 IsCloud

func IsCloud() bool

IsCloud reports whether cloud-only code paths may run.

func IsEnterprise

func IsEnterprise() bool

IsEnterprise reports whether enterprise-licensed paths may run.

func IsOSS

func IsOSS() bool

IsOSS reports whether this is the plain open-source edition.

Types

This section is empty.

Jump to

Keyboard shortcuts

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