Help us shape the future of Go! Take the 2026 Go Developer Survey

edition

package
v0.55.8 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

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

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

const (
	SaaSStandalone Edition = "saas-standalone"
	SaaSEmbedded   Edition = "saas-embedded"
	SelfhostOSS    Edition = "selfhost-oss"
	Preview        Edition = "preview"
)

func Normalize

func Normalize(raw string) Edition

Normalize maps a raw string to a known Edition, defaulting to SelfhostOSS.

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

func ResolveStrict() (Edition, bool)

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

func (e Edition) FlagProvider() string

FlagProvider returns the OpenFeature provider name this edition selects: "static" (selfhost-oss), "flagship-preview" (preview), or "flagship" (SaaS).

func (Edition) GatingEnabled

func (e Edition) GatingEnabled() bool

GatingEnabled reports whether runtime feature-gating applies. False for selfhost-oss (all features on).

func (Edition) IsSaaS

func (e Edition) IsSaaS() bool

IsSaaS reports whether this is a hosted SaaS edition.

func (Edition) UsesAuth0

func (e Edition) UsesAuth0() bool

UsesAuth0 reports whether Auth0 identity is wired.

func (Edition) UsesFGA

func (e Edition) UsesFGA() bool

UsesFGA reports whether FGA authorization is enforced.

func (Edition) UsesStripe

func (e Edition) UsesStripe() bool

UsesStripe reports whether Stripe billing/entitlements are wired.

Jump to

Keyboard shortcuts

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