edition

package
v1.77.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Edition

type Edition struct {
	Name    string
	Bundle  string
	Version string
}

func Parse

func Parse(version string) (*Edition, error)

func (*Edition) IsAvailable added in v1.77.0

func (e *Edition) IsAvailable(license Licensing) bool

IsAvailable reports whether the package is available in this edition. The edition's own entry wins, then the defaultEdition entry; with neither present the package is treated as available, so it is banned only when its licensing explicitly marks it unavailable.

func (*Edition) IsEnabled added in v1.77.0

func (e *Edition) IsEnabled(license Licensing) bool

IsEnabled reports whether the active bundle (e.Bundle) enables the package in this edition. The edition's own entry wins when present — its bundle list is authoritative even when empty — and the defaultEdition entry is consulted only when the edition has no entry of its own (mirrors IsAvailable's resolution).

type EditionLicense added in v1.77.0

type EditionLicense struct {
	Available        bool
	EnabledInBundles []string
}

EditionLicense is a single edition's license: whether the package ships in that edition and which bundles enable it by default.

type Licensing added in v1.77.0

type Licensing struct {
	// Editions maps an edition name to its license. The special key
	// defaultEdition supplies the fallback used when an edition has no entry.
	Editions map[string]EditionLicense
}

Licensing is a package's per-edition availability and bundle membership. The edition gate and the bundle floor resolve their decisions against it via Edition's IsAvailable/IsEnabled helpers, so the edition-vs-defaultEdition resolution lives here as the single source of truth.

Jump to

Keyboard shortcuts

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