Documentation
¶
Index ¶
Constants ¶
const ( // DefinitionFile is the filename for package metadata DefinitionFile = "package.yaml" TypeModule = "Module" TypeApplication = "Application" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Definition ¶
type Definition struct {
APIVersion string `yaml:"apiVersion" json:"apiVersion"`
Type string `yaml:"type" json:"type"`
Name string `yaml:"name" json:"name"`
Descriptions Descriptions `yaml:"descriptions,omitempty" json:"descriptions,omitempty"`
Requirements Requirements `yaml:"requirements,omitempty" json:"requirements,omitempty"`
}
Definition represents common package metadata loaded from package.yaml.
func LoadDefinitionByDir ¶
func LoadDefinitionByDir(dir string) (Definition, error)
LoadDefinitionByDir reads and parses the package definition file from the given directory.
type Descriptions ¶
type Descriptions struct {
Ru string `json:"ru,omitempty" yaml:"ru,omitempty"`
En string `json:"en,omitempty" yaml:"en,omitempty"`
}
Descriptions holds localized description text for the package.
type ModuleDependency ¶ added in v0.33.4
type ModuleDependency struct {
Name string `yaml:"name" json:"name"`
Constraint string `yaml:"constraint,omitempty" json:"constraint,omitempty"`
}
ModuleDependency is a named module dependency with an optional semver constraint.
type ModuleGroup ¶ added in v0.33.4
type ModuleGroup struct {
Name string `yaml:"name" json:"name"`
Description string `yaml:"description,omitempty" json:"description,omitempty"`
Modules []ModuleDependency `yaml:"modules" json:"modules"`
}
ModuleGroup is a named group of module dependencies, shared by the AnyOf and NoneOf buckets. Name is required and identifies the group in diagnostics.
type ModulesRequirements ¶ added in v0.33.4
type ModulesRequirements struct {
Mandatory []ModuleDependency `yaml:"mandatory,omitempty" json:"mandatory,omitempty"`
Conditional []ModuleDependency `yaml:"conditional,omitempty" json:"conditional,omitempty"`
AnyOf []ModuleGroup `yaml:"anyOf,omitempty" json:"anyOf,omitempty"`
NoneOf []ModuleGroup `yaml:"noneOf,omitempty" json:"noneOf,omitempty"`
}
ModulesRequirements groups module dependencies by how they gate the package:
- Mandatory: the module must be enabled;
- Conditional: enforced only when the module is enabled;
- AnyOf: at least one member of each group must be enabled;
- NoneOf: no member of any group may be enabled.
type Remote ¶
type Remote struct {
Repository string `json:"repository" yaml:"repository"`
DockerConfig string `json:"dockercfg" yaml:"dockercfg"`
}
Remote describes the OCI registry a package is published to. It is embedded into the runtime context surfaced to templates so manifests can reference the registry and its credentials.
type Requirements ¶ added in v0.33.4
type Requirements struct {
Kubernetes VersionConstraint `yaml:"kubernetes,omitempty" json:"kubernetes,omitempty"`
Deckhouse VersionConstraint `yaml:"deckhouse,omitempty" json:"deckhouse,omitempty"`
Modules ModulesRequirements `yaml:"modules,omitempty" json:"modules,omitempty"`
}
Requirements are the platform and module dependencies the package declares. It mirrors the contract deckhouse-controller enforces when the package is installed; the plugin only checks that it is well-formed, since no cluster exists at build time.
type VersionConstraint ¶ added in v0.33.4
type VersionConstraint struct {
Constraint string `yaml:"constraint,omitempty" json:"constraint,omitempty"`
}
VersionConstraint wraps a semver constraint expression. Empty means "no constraint".
Directories
¶
| Path | Synopsis |
|---|---|
|
schema/defaults
Package defaults synthesizes an example value map from an OpenAPI schema.
|
Package defaults synthesizes an example value map from an OpenAPI schema. |
|
schema/reggen
Package reggen produces example strings that match a Perl-flavored regular expression.
|
Package reggen produces example strings that match a Perl-flavored regular expression. |