types

package
v1.77.2 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 10 Imported by: ? 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

Index

Constants

View Source
const (
	DefinitionFile = "module.yaml"

	ExperimentalModuleStage = "Experimental"
	DeprecatedModuleStage   = "Deprecated"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Definition

type Definition struct {
	Name           string   `json:"name" yaml:"name"`
	Critical       bool     `json:"critical,omitempty" yaml:"critical,omitempty"`
	Weight         uint32   `json:"weight,omitempty" yaml:"weight,omitempty"`
	Tags           []string `json:"tags,omitempty" yaml:"tags,omitempty"`
	Subsystems     []string `json:"subsystems,omitempty" yaml:"subsystems,omitempty"`
	Namespace      string   `json:"namespace,omitempty" yaml:"namespace,omitempty"`
	Stage          string   `json:"stage,omitempty" yaml:"stage,omitempty"`
	ExclusiveGroup string   `json:"exclusiveGroup,omitempty" yaml:"exclusiveGroup,omitempty"`

	Descriptions  *ModuleDescriptions          `json:"descriptions,omitempty" yaml:"descriptions,omitempty"`
	Requirements  *v1alpha1.ModuleRequirements `json:"requirements,omitempty" yaml:"requirements,omitempty"`
	Accessibility *ModuleAccessibility         `json:"accessibility,omitempty" yaml:"accessibility,omitempty"`

	DisableOptions *v1alpha1.ModuleDisableOptions `json:"disable,omitempty" yaml:"disable,omitempty"`
	Path           string                         `json:"-" yaml:"-"`

	// Update holds version transition hints that allow skipping step-by-step upgrades.
	// Example:
	// update:
	//   versions:
	//     - from: 1.67
	//       to: 1.75
	//     - from: 1.20
	//       to: 2.0
	Update *ModuleUpdate `json:"update,omitempty" yaml:"update,omitempty"`
}

Definition of module.yaml file struct

func (*Definition) Annotations added in v1.69.0

func (d *Definition) Annotations() map[string]string

func (*Definition) IsDeprecated added in v1.73.0

func (d *Definition) IsDeprecated() bool

func (*Definition) IsExperimental added in v1.72.0

func (d *Definition) IsExperimental() bool

func (*Definition) Labels added in v1.69.0

func (d *Definition) Labels() map[string]string

func (*Definition) Validate

func (d *Definition) Validate(values addonutils.Values, logger *log.Logger) error

type Module

type Module struct {
	// contains filtered or unexported fields
}

func NewModule

func NewModule(def *Definition, static addonutils.Values, config, values []byte, logger *log.Logger) (*Module, error)

func (*Module) GetBasicModule

func (m *Module) GetBasicModule() *addonmodules.BasicModule

func (*Module) GetConfirmationDisableReason

func (m *Module) GetConfirmationDisableReason() (string, bool)

func (*Module) GetModuleDefinition added in v1.72.0

func (m *Module) GetModuleDefinition() *Definition

func (*Module) GetModuleExclusiveGroup added in v1.70.0

func (m *Module) GetModuleExclusiveGroup() *string

type ModuleAccessibility added in v1.72.0

type ModuleAccessibility struct {
	Editions map[string]ModuleEdition `json:"editions" yaml:"editions"`
}

func (*ModuleAccessibility) IsAvailable added in v1.72.0

func (a *ModuleAccessibility) IsAvailable(editionName string) bool

IsAvailable checks if the module available in the specific edition

func (*ModuleAccessibility) IsEnabled added in v1.72.0

func (a *ModuleAccessibility) IsEnabled(editionName, bundleName string) bool

IsEnabled checks if the module enabled in the specific edition and bundle

func (*ModuleAccessibility) ToV1Alpha1 added in v1.72.0

type ModuleDescriptions added in v1.69.0

type ModuleDescriptions struct {
	Ru string `json:"ru,omitempty" yaml:"ru,omitempty"`
	En string `json:"en,omitempty" yaml:"en,omitempty"`
}

type ModuleEdition added in v1.72.0

type ModuleEdition struct {
	Available        bool     `json:"available" yaml:"available"`
	EnabledInBundles []string `json:"enabledInBundles" yaml:"enabledInBundles"`
}

type ModuleUpdate added in v1.72.0

type ModuleUpdate struct {
	Versions []ModuleUpdateVersion `json:"versions,omitempty" yaml:"versions,omitempty"`
}

ModuleUpdate describes allowed version transitions for a target release version.

func (*ModuleUpdate) ToV1Alpha1 added in v1.72.0

func (a *ModuleUpdate) ToV1Alpha1() *v1alpha1.UpdateSpec

type ModuleUpdateVersion added in v1.72.0

type ModuleUpdateVersion struct {
	From string `json:"from" yaml:"from"`
	To   string `json:"to" yaml:"to"`
}

ModuleUpdateVersion represents a constraint range. "from" and "to" support major.minor or major.minor.patch. "to" should point to the target release version defined by this module.yaml.

Jump to

Keyboard shortcuts

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