Documentation
¶
Index ¶
- Constants
- Variables
- func FindProjectRootAndConfigFile(fs opctx.FS, referenceDir string) (projectRootDir, configFilePath string, err error)
- type CheckConfig
- type ComponentBuildConfig
- type ComponentBuildFailureConfig
- type ComponentBuildHints
- type ComponentConfig
- type ComponentGroupConfig
- type ComponentOverlay
- type ComponentOverlayType
- type ComponentReference
- type ConfigFile
- type DistroDefinition
- type DistroReference
- type DistroVersionDefinition
- type ImageConfig
- type ImageCustomizerConfig
- type ImageDefinition
- type ImageDefinitionType
- type Origin
- type OriginType
- type PackageRepository
- type ProjectConfig
- type ProjectInfo
- type SourceFileReference
- type SpecSource
- type SpecSourceType
- type ToolsConfig
Constants ¶
const ( // HashTypeSHA256 represents the SHA-256 hash algorithm. HashTypeSHA256 = fileutils.HashTypeSHA256 // HashTypeSHA512 represents the SHA-512 hash algorithm. HashTypeSHA512 = fileutils.HashTypeSHA512 )
const DefaultConfigFileName string = "azldev.toml"
The default filename of an Azure Linux project configuration file.
const DefaultSchemaURI = "https://raw.githubusercontent.com/microsoft/azure-linux-dev-tools/refs/heads/main/schemas/azldev.schema.json"
Default schema URI for this config file. Useful for capable editors to provide Intellisense and validation.
Variables ¶
var ( // ErrDuplicateComponents is returned when duplicate conflicting component definitions are found. ErrDuplicateComponents = errors.New("duplicate component") // ErrDuplicateComponentGroups is returned when duplicate conflicting component group definitions are found. ErrDuplicateComponentGroups = errors.New("duplicate component group") // ErrDuplicateImages is returned when duplicate conflicting image definitions are found. ErrDuplicateImages = errors.New("duplicate image") )
var ErrConfigFileNotFound = errors.New("could not find config file: azldev.toml")
Error returned when the config file is not present.
Functions ¶
func FindProjectRootAndConfigFile ¶
func FindProjectRootAndConfigFile( fs opctx.FS, referenceDir string, ) (projectRootDir, configFilePath string, err error)
Starting at referenceDir, locates the containing project root directory and its configuration file. Returns ErrConfigFileNotFound if they could not be located.
Types ¶
type CheckConfig ¶
type CheckConfig struct {
// Skip indicates whether the %check section should be disabled for this component.
Skip bool `` /* 153-byte string literal not displayed */
// SkipReason provides a required justification when Skip is true.
SkipReason string `` /* 154-byte string literal not displayed */
}
CheckConfig encapsulates configuration for the %check section of a spec file.
func (*CheckConfig) Validate ¶
func (c *CheckConfig) Validate() error
Validate checks that required fields are set when Skip is true.
type ComponentBuildConfig ¶
type ComponentBuildConfig struct {
// Which features should be enabled via `with` options to the builder.
With []string `` /* 126-byte string literal not displayed */
// Which features should be disabled via `without` options to the builder.
Without []string `` /* 138-byte string literal not displayed */
// Macro definitions.
Defines map[string]string `` /* 140-byte string literal not displayed */
// Undefine macros that would otherwise be defined by the component configuration.
Undefines []string `` /* 154-byte string literal not displayed */
// Check section configuration.
Check CheckConfig `` /* 133-byte string literal not displayed */
// Failure configuration and policy for this component's build.
Failure ComponentBuildFailureConfig `` /* 178-byte string literal not displayed */
// Hints for how or when to build the component; must not be required for correctness of builds.
Hints ComponentBuildHints `` /* 148-byte string literal not displayed */
}
Encapsulates configuration for building a component. Configuration for how to acquire or prepare the sources for a component are out of scope.
func (*ComponentBuildConfig) Validate ¶
func (c *ComponentBuildConfig) Validate() error
Validate checks that the build configuration is valid.
type ComponentBuildFailureConfig ¶
type ComponentBuildFailureConfig struct {
// Expected indicates that this component is expected to fail building. This is intended to be used as a temporary
// marker for components that are expected to fail until they can be fixed.
Expected bool `` /* 159-byte string literal not displayed */
// ExpectedReason provides a required justification when Expected is true.
ExpectedReason string `` /* 195-byte string literal not displayed */
}
ComponentBuildFailureConfig encapsulates configuration and policy regarding a component's build failure.
type ComponentBuildHints ¶
type ComponentBuildHints struct {
// Expensive indicates that building this component is relatively expensive compared to the rest of the distro.
Expensive bool `` /* 207-byte string literal not displayed */
}
ComponentBuildHints encapsulates non-essential hints for how or when to build a component. These are not required for correctness of builds, but may be used by tools to provide guidance or optimizations.
type ComponentConfig ¶
type ComponentConfig struct {
// The component's name; not actually present in serialized files.
Name string `toml:"-" json:"name" table:",sortkey"`
// Reference to the source config file that this definition came from; not present
// in serialized files.
SourceConfigFile *ConfigFile `toml:"-" json:"-" table:"-"`
// Where to get its spec and adjacent files from.
Spec SpecSource `` /* 132-byte string literal not displayed */
// Overlays to apply to sources after they've been acquired. May mutate the spec as well as sources.
Overlays []ComponentOverlay `` /* 159-byte string literal not displayed */
// Configuration for building the component.
Build ComponentBuildConfig `` /* 147-byte string literal not displayed */
// Source file references for this component.
SourceFiles []SourceFileReference `` /* 156-byte string literal not displayed */
}
Defines a component.
func (*ComponentConfig) MergeUpdatesFrom ¶
func (c *ComponentConfig) MergeUpdatesFrom(other *ComponentConfig) error
Mutates the component config, updating it with overrides present in other.
func (*ComponentConfig) WithAbsolutePaths ¶
func (c *ComponentConfig) WithAbsolutePaths(referenceDir string) *ComponentConfig
Returns a copy of the component config with relative file paths converted to absolute file paths (relative to referenceDir, not the current working directory).
type ComponentGroupConfig ¶
type ComponentGroupConfig struct {
// A human-friendly description of this component group.
Description string `` /* 136-byte string literal not displayed */
// List of explicitly included components, identified by name.
Components []string `` /* 152-byte string literal not displayed */
// List of glob patterns specifying raw spec files that define components.
SpecPathPatterns []string `` /* 218-byte string literal not displayed */
// List of glob patterns specifying files to specifically ignore from spec selection.
ExcludedPathPatterns []string `` /* 210-byte string literal not displayed */
// Default configuration to apply to component members of this group.
DefaultComponentConfig ComponentConfig `` /* 218-byte string literal not displayed */
}
Defines a component group. Component groups are logical groupings of components (see ComponentConfig). A component group is useful because it allows for succinctly naming/identifying a curated set of components, say in a command line interface. Note that a component group does not uniquely "own" its components; a component may belong to multiple groups, and components need not belong to any group.
func (ComponentGroupConfig) WithAbsolutePaths ¶
func (g ComponentGroupConfig) WithAbsolutePaths(referenceDir string) ComponentGroupConfig
Returns a copy of the component group config with relative file paths converted to absolute file paths (relative to referenceDir, not the current working directory).
type ComponentOverlay ¶
type ComponentOverlay struct {
// The type of overlay to apply.
Type ComponentOverlayType `` /* 417-byte string literal not displayed */
// Human readable description of overlay; primarily present to document the need for the change.
Description string `` /* 138-byte string literal not displayed */
// For overlays that apply to non-spec files, indicates the filename. For overlays that can
// apply to multiple files, supports glob patterns (including globstar).
Filename string `` /* 186-byte string literal not displayed */
// For overlays that apply to specs, indicates the name of the section to which it applies.
SectionName string `` /* 147-byte string literal not displayed */
// For overlays that apply to specs, indicates the name of the sub-package to which it applies.
PackageName string `` /* 151-byte string literal not displayed */
// For overlays that apply to spec tags, indicates the name of the tag.
Tag string `` /* 144-byte string literal not displayed */
// For overlays that apply to values in specs, an exact string value to match.
Value string `toml:"value,omitempty" json:"value,omitempty" jsonschema:"title=Value,description=An exact string value to match in the spec"`
// For overlays that use a regular expression to match text in the spec, the regular expression to match.
Regex string `` /* 139-byte string literal not displayed */
// For overlays that replace text in a spec, the replacement text to use.
Replacement string `` /* 145-byte string literal not displayed */
// For overlays that reference lines of text, the lines of text to use.
Lines []string `toml:"lines,omitempty" json:"lines,omitempty" jsonschema:"title=Lines,description=The lines of text to use"`
// For overlays that require a source file as input, indicates a path to that file; relative paths are relative to
// the config file that defines the overlay.
Source string `` /* 238-byte string literal not displayed */
}
ComponentOverlay represents an overlay that may be applied to a component's spec and/or its sources.
func (*ComponentOverlay) ModifiesNonSpecFiles ¶
func (c *ComponentOverlay) ModifiesNonSpecFiles() bool
ModifiesNonSpecFiles returns true if the overlay modifies non-spec files. This includes hybrid overlays that modify both spec and source files (e.g., patch overlays), since those also require non-spec modifications.
func (*ComponentOverlay) ModifiesSpec ¶
func (c *ComponentOverlay) ModifiesSpec() bool
ModifiesSpec returns true if the overlay modifies a spec file. This includes hybrid overlays that modify both spec and source files (e.g., patch overlays), since those also require spec modifications.
func (*ComponentOverlay) Validate ¶
func (c *ComponentOverlay) Validate() error
Validate checks that required fields are set based on the overlay type. This catches configuration errors at load time rather than at apply time.
func (*ComponentOverlay) WithAbsolutePaths ¶
func (c *ComponentOverlay) WithAbsolutePaths(referenceDir string) (result *ComponentOverlay)
WithAbsolutePaths returns a copy of the overlay with config-relative file paths converted to absolute file paths (relative to referenceDir, not the current working directory). Note that paths that are intentionally relative to the destination component sources are left relative.
type ComponentOverlayType ¶
type ComponentOverlayType string
ComponentOverlayType is the type of a component overlay.
const ( // ComponentOverlayAddSpecTag is an overlay that adds a tag to the spec; fails if the tag already exists. ComponentOverlayAddSpecTag ComponentOverlayType = "spec-add-tag" // ComponentOverlayInsertSpecTag is an overlay that inserts a tag into the spec, placing it // after the last existing tag from the same family (e.g., Source9999 after the last Source* tag). // Falls back to after the last tag of any kind, then to appending at the section end. ComponentOverlayInsertSpecTag ComponentOverlayType = "spec-insert-tag" // ComponentOverlaySetSpecTag is an overlay that sets a tag to the spec. If the tag already exists, replaces // its existing value; otherwise, adds the tag. ComponentOverlaySetSpecTag ComponentOverlayType = "spec-set-tag" // ComponentOverlayUpdateSpecTag is an overlay that updates a tag in the spec; fails if the tag doesn't exist. ComponentOverlayUpdateSpecTag ComponentOverlayType = "spec-update-tag" // ComponentOverlayRemoveSpecTag is an overlay that removes a tag from the spec; fails if the tag doesn't exist. ComponentOverlayRemoveSpecTag ComponentOverlayType = "spec-remove-tag" // ComponentOverlayPrependSpecLines is an overlay that prepends lines to a section in a spec; fails if the section // doesn't exist. ComponentOverlayPrependSpecLines ComponentOverlayType = "spec-prepend-lines" // ComponentOverlayAppendSpecLines is an overlay that appends lines to a section in a spec; fails if the section // doesn't exist. ComponentOverlayAppendSpecLines ComponentOverlayType = "spec-append-lines" // ComponentOverlaySearchAndReplaceInSpec is an overlay that replaces text in a spec with other text. ComponentOverlaySearchAndReplaceInSpec ComponentOverlayType = "spec-search-replace" // ComponentOverlayAddPatch is an overlay that adds a patch file and registers it in the spec. // It copies the source file into the component sources and adds a PatchN tag (or appends to // %%patchlist if one exists). ComponentOverlayAddPatch ComponentOverlayType = "patch-add" // ComponentOverlayRemovePatch is an overlay that removes a patch file and its corresponding // PatchN tag and/or %%patchlist entry from the spec. ComponentOverlayRemovePatch ComponentOverlayType = "patch-remove" // ComponentOverlayPrependLinesToFile is an overlay that prepends lines to a non-spec file. ComponentOverlayPrependLinesToFile ComponentOverlayType = "file-prepend-lines" // ComponentOverlaySearchAndReplaceInFile is an overlay that replaces text in a non-spec file. ComponentOverlaySearchAndReplaceInFile ComponentOverlayType = "file-search-replace" // ComponentOverlayAddFile is an overlay that adds a non-spec file. ComponentOverlayAddFile ComponentOverlayType = "file-add" // ComponentOverlayRemoveFile is an overlay that removes a non-spec file. ComponentOverlayRemoveFile ComponentOverlayType = "file-remove" // ComponentOverlayRenameFile is an overlay that renames a non-spec file. ComponentOverlayRenameFile ComponentOverlayType = "file-rename" )
type ComponentReference ¶
type ComponentReference struct {
// Name of the component.
Name string
// Version of the component (optional).
Version *rpm.Version
}
ComponentReference encapsulates a reference to a source component.
type ConfigFile ¶
type ConfigFile struct {
// URI for the schema for this file format.
SchemaURI string `toml:"$schema,omitempty"`
// Basic project info.
Project *ProjectInfo `toml:"project,omitempty" jsonschema:"title=Project info,description=Basic properties for this project"`
// List of glob patterns specifying additional config files to load and deserialize.
Includes []string `` /* 155-byte string literal not displayed */
// Definitions of distros.
Distros map[string]DistroDefinition `toml:"distros,omitempty" jsonschema:"title=Distros,description=Definitions of distros to build for or consume from"`
// Definitions of component groups.
ComponentGroups map[string]ComponentGroupConfig `` /* 146-byte string literal not displayed */
// Definitions of components.
Components map[string]ComponentConfig `` /* 128-byte string literal not displayed */
// Definitions of images.
Images map[string]ImageConfig `toml:"images,omitempty" validate:"dive" jsonschema:"title=Images,description=Definitions of images for this project"`
// Configuration for tools used by azldev.
Tools *ToolsConfig `toml:"tools,omitempty" jsonschema:"title=Tools configuration,description=Configuration for tools used by azldev"`
// contains filtered or unexported fields
}
Encapsulates a serialized project config file; used for serialization/deserialization.
func (ConfigFile) Serialize ¶
func (f ConfigFile) Serialize(fs opctx.FS, filePath string) error
Serializes writes the config file to the specified path in appropriate format (TOML). If the given path already exists, it will be overwritten.
func (ConfigFile) ToBytes ¶
func (f ConfigFile) ToBytes() ([]byte, error)
ToBytes serializes the config file to a byte slice in TOML format.
func (ConfigFile) Validate ¶
func (f ConfigFile) Validate() error
Validates the format and internal consistency of the config file. Semantic errors are reported.
type DistroDefinition ¶
type DistroDefinition struct {
// Human-readable description of the distro.
Description string `` /* 127-byte string literal not displayed */
// Optionally provides a default version to use for this distro when one is not explicitly specified.
DefaultVersion string `` /* 143-byte string literal not displayed */
// The base URI of this distro's dist-git spec source repository.
DistGitBaseURI string `` /* 179-byte string literal not displayed */
// The base URI of this distro's lookaside cache for source archives.
LookasideBaseURI string `` /* 175-byte string literal not displayed */
// Published artifact information
PackageRepositories []PackageRepository `` /* 136-byte string literal not displayed */
// When true, source file downloads will not fall back to configured origins if the lookaside cache fails.
DisableOrigins bool `` /* 213-byte string literal not displayed */
// Versions: maps version => definition
Versions map[string]DistroVersionDefinition `` /* 129-byte string literal not displayed */
}
Defines a distro that components may be built for/against.
func (*DistroDefinition) MergeUpdatesFrom ¶
func (d *DistroDefinition) MergeUpdatesFrom(other *DistroDefinition) error
MergeUpdatesFrom mutates the distro definition, updating it with overrides present in other. Uses mergo.WithOverride without WithAppendSlice so that slice fields like [DistroDefinition.PackageRepositories] are replaced, not appended. This supports the primary use case of swapping between package sources via --config-file overrides.
For map fields like [DistroDefinition.Versions], mergo replaces the entire value for a matching key rather than doing a field-level merge within the value struct.
func (*DistroDefinition) WithAbsolutePaths ¶
func (d *DistroDefinition) WithAbsolutePaths(referenceDir string) DistroDefinition
Returns a copy of the distro definition with relative file paths converted to absolute file paths (relative to referenceDir, not the current working directory).
func (*DistroDefinition) WithResolvedConfigs ¶
func (d *DistroDefinition) WithResolvedConfigs() DistroDefinition
type DistroReference ¶
type DistroReference struct {
// Name of the referenced distro.
Name string `toml:"name" json:"name,omitempty" jsonschema:"required,title=Name,description=Name of the referenced distro"`
// Version of the referenced distro.
Version string `toml:"version,omitempty" json:"version,omitempty" jsonschema:"title=Version,description=Version of the referenced distro"`
// Snapshot date/time for source code if specified components will use source as it existed at this time.
Snapshot string `` /* 169-byte string literal not displayed */
}
Encapsulates a reference to a version of a distro.
func (*DistroReference) String ¶
func (r *DistroReference) String() string
Implements the [Stringer] interface for DistroReference.
type DistroVersionDefinition ¶
type DistroVersionDefinition struct {
// Human-readable description of this version
Description string `` /* 149-byte string literal not displayed */
// Formal `releasever` for this version.
ReleaseVer string `toml:"release-ver" json:"releaseVer,omitempty" jsonschema:"title=Release version,description=Formal releasever string"`
// Dist-git branch for this version (if applicable)
DistGitBranch string `` /* 161-byte string literal not displayed */
// Default config for components.
DefaultComponentConfig ComponentConfig `` /* 212-byte string literal not displayed */
// Path to mock configuration file for this project (if one exists).
MockConfigPath string `` /* 195-byte string literal not displayed */
MockConfigPathX86_64 string `` /* 202-byte string literal not displayed */
MockConfigPathAarch64 string `` /* 203-byte string literal not displayed */
}
Defines a specific version of a distro.
func (DistroVersionDefinition) WithAbsolutePaths ¶
func (v DistroVersionDefinition) WithAbsolutePaths(referenceDir string) DistroVersionDefinition
Returns a copy of the distro version definition with relative file paths converted to absolute file paths (relative to referenceDir, not the current working directory).
func (DistroVersionDefinition) WithResolvedConfigs ¶
func (v DistroVersionDefinition) WithResolvedConfigs() DistroVersionDefinition
type ImageConfig ¶
type ImageConfig struct {
// The image's name; not actually present in serialized TOML files.
Name string `toml:"-" json:"name" table:",sortkey"`
// Reference to the source config file that this definition came from; not present
// in serialized files.
SourceConfigFile *ConfigFile `toml:"-" json:"-" table:"-"`
// Description of the image.
Description string `toml:"description,omitempty" json:"description,omitempty" jsonschema:"title=Description,description=Description of the image"`
// Where to find its definition.
Definition ImageDefinition `` /* 152-byte string literal not displayed */
}
Defines an image.
func (*ImageConfig) MergeUpdatesFrom ¶
func (i *ImageConfig) MergeUpdatesFrom(other *ImageConfig) error
Mutates the image config, updating it with overrides present in other.
func (*ImageConfig) WithAbsolutePaths ¶
func (i *ImageConfig) WithAbsolutePaths(referenceDir string) *ImageConfig
Returns a copy of the image config with relative file paths converted to absolute file paths (relative to referenceDir, not the current working directory).
type ImageCustomizerConfig ¶
type ImageCustomizerConfig struct {
// Full tag name of the Image Customizer container.
ContainerTag string `` /* 152-byte string literal not displayed */
}
Encapsulates information about the tools used by the image customizer.
type ImageDefinition ¶
type ImageDefinition struct {
// DefinitionType indicates the type of image definition.
DefinitionType ImageDefinitionType `toml:"type,omitempty" json:"type,omitempty" jsonschema:"title=Type,description=Type of image definition"`
// Path points to the image definition file.
Path string `toml:"path,omitempty" json:"path,omitempty" jsonschema:"title=Path,description=Path to the image definition file"`
// Profile is an optional field that specifies the profile to use when building the image.
Profile string `` /* 161-byte string literal not displayed */
}
Defines where to find an image definition.
type ImageDefinitionType ¶
type ImageDefinitionType string
Type of image definition.
const ( // Default (unspecified) source. ImageDefinitionTypeUnspecified ImageDefinitionType = "" // kiwi-ng image definition. ImageDefinitionTypeKiwi ImageDefinitionType = "kiwi" )
type Origin ¶
type Origin struct {
// Type indicates how the source file should be acquired.
Type OriginType `toml:"type" json:"type" jsonschema:"required,enum=download,title=Origin type,description=Type of origin for this source file"`
// Uri to download the source file from if origin type is 'download'. Ignored for other origin types.
Uri string `` /* 184-byte string literal not displayed */
}
Origin describes where a source file comes from and how to retrieve it. When omitted from a source file reference, the file will be resolved via the lookaside cache.
type OriginType ¶
type OriginType string
OriginType indicates the type of origin for a source file.
const ( // OriginTypeURI indicates that the source file is fetched from a URI. OriginTypeURI OriginType = "download" )
type PackageRepository ¶
type PackageRepository struct {
BaseURI string `toml:"base-uri" json:"baseUri" jsonschema:"required,title=Base URI,description=Base URI for the repository"`
}
Defines how to access the published repository for a distro.
func (PackageRepository) WithAbsolutePaths ¶
func (r PackageRepository) WithAbsolutePaths(referenceDir string) PackageRepository
Returns a copy of the package repository definition with relative file paths converted to absolute file paths (relative to referenceDir, not the current working directory).
type ProjectConfig ¶
type ProjectConfig struct {
// Basic project info.
Project ProjectInfo `toml:"project,omitempty" json:"project,omitempty" jsonschema:"title=Project Info,description=Basic project information"`
// Definitions of component groups.
ComponentGroups map[string]ComponentGroupConfig `` /* 165-byte string literal not displayed */
// Definitions of components.
Components map[string]ComponentConfig `` /* 142-byte string literal not displayed */
// Definitions of images.
Images map[string]ImageConfig `` /* 126-byte string literal not displayed */
// Definitions of distros.
Distros map[string]DistroDefinition `` /* 133-byte string literal not displayed */
// Configuration for tools used by azldev.
Tools ToolsConfig `` /* 135-byte string literal not displayed */
// Root config file path; not serialized.
RootConfigFilePath string `toml:"-" json:"-"`
// Map from component names to groups they belong to; not serialized.
GroupsByComponent map[string][]string `toml:"-" json:"-"`
}
Encapsulates loaded project configuration.
func LoadProjectConfig ¶
func LoadProjectConfig( dryRunnable opctx.DryRunnable, fs opctx.FS, referenceDir string, disableDefaultConfig bool, tempDirPath string, extraConfigFilePaths []string, permissiveConfigParsing bool, ) (projectDir string, config *ProjectConfig, err error)
LoadProjectConfig takes a reference directory, searches for the project's configuration, and loads it with any appropriate default configurations appropriately incorporated. If needed, this function may make use of the provided temporary directory, with the expectation that the caller is responsible for cleaning it up -- but not until after it is done using the loaded configuration. The loaded configuration may implicitly depend on the contents of the temporary directory.
func NewProjectConfig ¶
func NewProjectConfig() ProjectConfig
Constructs a default (empty) project configuration.
func (*ProjectConfig) Validate ¶
func (cfg *ProjectConfig) Validate() error
Validates the configuration, returning an error if any semantic errors are found.
type ProjectInfo ¶
type ProjectInfo struct {
// Human-readable description of this project.
Description string `` /* 135-byte string literal not displayed */
// Path to log directory to use for this project.
LogDir string `` /* 132-byte string literal not displayed */
// Path to temp work directory to use for this project.
WorkDir string `` /* 145-byte string literal not displayed */
// Path to output directory to use for this project.
OutputDir string `` /* 143-byte string literal not displayed */
// Default-selected distro. May be overridden at runtime.
DefaultDistro DistroReference `` /* 142-byte string literal not displayed */
}
Basic information regarding a project.
func (*ProjectInfo) MergeUpdatesFrom ¶
func (p *ProjectInfo) MergeUpdatesFrom(other *ProjectInfo) error
Mutates the project info, updating it with overrides present in other.
func (*ProjectInfo) WithAbsolutePaths ¶
func (p *ProjectInfo) WithAbsolutePaths(referenceDir string) *ProjectInfo
Returns a copy of the project info with relative file paths converted to absolute file paths (relative to referenceDir, not the current working directory).
type SourceFileReference ¶
type SourceFileReference struct {
// Reference to the component to which the source file belongs.
Component ComponentReference `toml:"-" json:"-"`
// Name of the source file; must be non-empty.
Filename string `toml:"filename" json:"filename"`
// Hash of the source file, expressed as a hex string.
Hash string `toml:"hash,omitempty" json:"hash,omitempty"`
// Type of hash used by Hash (e.g., "sha256", "sha512").
HashType fileutils.HashType `toml:"hash-type,omitempty" json:"hashType,omitempty"`
// Origin for this source file. When omitted, the file is resolved via the lookaside cache.
Origin Origin `toml:"origin,omitempty" json:"origin,omitempty"`
}
SourceFileReference encapsulates a reference to a specific source file artifact.
type SpecSource ¶
type SpecSource struct {
// SourceType indicates the type of source for the spec.
SourceType SpecSourceType `` /* 186-byte string literal not displayed */
// Path indicates the path to the spec file; only relevant for local specs.
Path string `` /* 223-byte string literal not displayed */
// UpstreamDistro indicates the upstream distro providing the spec; only relevant for upstream specs.
UpstreamDistro DistroReference `` /* 163-byte string literal not displayed */
// UpstreamName indicates the name of the component in the upstream distro; only relevant for upstream specs.
UpstreamName string `` /* 230-byte string literal not displayed */
// UpstreamCommit pins the upstream spec to a specific git commit hash; only relevant for upstream specs.
// When set, this takes priority over the snapshot date-time on the distro reference.
UpstreamCommit string `` /* 339-byte string literal not displayed */
}
Provides source information for locating the spec for a component.
func (*SpecSource) String ¶
func (s *SpecSource) String() string
Implements the [Stringer] interface.
type SpecSourceType ¶
type SpecSourceType string
Type of source for a spec.
const ( // Default (unspecified) source. SpecSourceTypeUnspecified SpecSourceType = "" // Local source: the spec is present in the local filesystem. SpecSourceTypeLocal SpecSourceType = "local" // Upstream source: the spec is present in an upstream source (may not local). SpecSourceTypeUpstream SpecSourceType = "upstream" )
type ToolsConfig ¶
type ToolsConfig struct {
// Configuration for the Image Customizer tool.
ImageCustomizer ImageCustomizerConfig `` /* 176-byte string literal not displayed */
}
Encapsulates information about the tools used by azldev.
func (*ToolsConfig) MergeUpdatesFrom ¶
func (tc *ToolsConfig) MergeUpdatesFrom(other *ToolsConfig) error