Documentation ¶
Overview ¶
Package creator contains functions for creating Jackal packages.
Package creator contains functions for creating Jackal packages.
Package creator contains functions for creating Jackal packages.
Package creator contains functions for creating Jackal packages.
Package creator contains functions for creating Jackal packages.
Package creator contains functions for creating Jackal packages.
Package creator contains functions for creating Jackal packages.
Index ¶
- func ComposeComponents(pkg types.JackalPackage, flavor string) (types.JackalPackage, []string, error)
- func FillActiveTemplate(pkg types.JackalPackage, setVariables map[string]string) (types.JackalPackage, []string, error)
- func ReloadComponentTemplate(component *types.JackalComponent) error
- func ReloadComponentTemplatesInPackage(jackalPackage *types.JackalPackage) error
- type Creator
- type PackageCreator
- func (pc *PackageCreator) Assemble(dst *layout.PackagePaths, components []types.JackalComponent, arch string) error
- func (pc *PackageCreator) LoadPackageDefinition(dst *layout.PackagePaths) (pkg types.JackalPackage, warnings []string, err error)
- func (pc *PackageCreator) Output(dst *layout.PackagePaths, pkg *types.JackalPackage) (err error)
- type SkeletonCreator
- func (sc *SkeletonCreator) Assemble(dst *layout.PackagePaths, components []types.JackalComponent, _ string) error
- func (sc *SkeletonCreator) LoadPackageDefinition(dst *layout.PackagePaths) (pkg types.JackalPackage, warnings []string, err error)
- func (sc *SkeletonCreator) Output(dst *layout.PackagePaths, pkg *types.JackalPackage) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComposeComponents ¶
func ComposeComponents(pkg types.JackalPackage, flavor string) (types.JackalPackage, []string, error)
ComposeComponents composes components and their dependencies into a single Jackal package using an import chain.
func FillActiveTemplate ¶
func FillActiveTemplate(pkg types.JackalPackage, setVariables map[string]string) (types.JackalPackage, []string, error)
FillActiveTemplate merges user-specified variables into the configuration templates of a jackal.yaml.
func ReloadComponentTemplate ¶
func ReloadComponentTemplate(component *types.JackalComponent) error
ReloadComponentTemplate appends ###JACKAL_COMPONENT_NAME### for the component, assigns value, and reloads Any instance of ###JACKAL_COMPONENT_NAME### within a component will be replaced with that components name
func ReloadComponentTemplatesInPackage ¶
func ReloadComponentTemplatesInPackage(jackalPackage *types.JackalPackage) error
ReloadComponentTemplatesInPackage appends ###JACKAL_COMPONENT_NAME### for each component, assigns value, and reloads
Types ¶
type Creator ¶
type Creator interface { LoadPackageDefinition(dst *layout.PackagePaths) (pkg types.JackalPackage, warnings []string, err error) Assemble(dst *layout.PackagePaths, components []types.JackalComponent, arch string) error Output(dst *layout.PackagePaths, pkg *types.JackalPackage) error }
Creator is an interface for creating Jackal packages.
type PackageCreator ¶
type PackageCreator struct {
// contains filtered or unexported fields
}
PackageCreator provides methods for creating normal (not skeleton) Jackal packages.
func NewPackageCreator ¶
func NewPackageCreator(createOpts types.JackalCreateOptions, cfg *types.PackagerConfig, cwd string) *PackageCreator
NewPackageCreator returns a new PackageCreator.
func (*PackageCreator) Assemble ¶
func (pc *PackageCreator) Assemble(dst *layout.PackagePaths, components []types.JackalComponent, arch string) error
Assemble assembles all of the package assets into Jackal's tmp directory layout.
func (*PackageCreator) LoadPackageDefinition ¶
func (pc *PackageCreator) LoadPackageDefinition(dst *layout.PackagePaths) (pkg types.JackalPackage, warnings []string, err error)
LoadPackageDefinition loads and configures a jackal.yaml file during package create.
func (*PackageCreator) Output ¶
func (pc *PackageCreator) Output(dst *layout.PackagePaths, pkg *types.JackalPackage) (err error)
Output does the following:
- archives components
- generates checksums for all package files
- writes the loaded jackal.yaml to disk
- signs the package
- writes the Jackal package as a tarball to a local directory, or an OCI registry based on the --output flag
type SkeletonCreator ¶
type SkeletonCreator struct {
// contains filtered or unexported fields
}
SkeletonCreator provides methods for creating skeleton Jackal packages.
func NewSkeletonCreator ¶
func NewSkeletonCreator(createOpts types.JackalCreateOptions, publishOpts types.JackalPublishOptions) *SkeletonCreator
NewSkeletonCreator returns a new SkeletonCreator.
func (*SkeletonCreator) Assemble ¶
func (sc *SkeletonCreator) Assemble(dst *layout.PackagePaths, components []types.JackalComponent, _ string) error
Assemble updates all components of the loaded Jackal package with necessary modifications for package assembly.
It processes each component to ensure correct structure and resource locations.
func (*SkeletonCreator) LoadPackageDefinition ¶
func (sc *SkeletonCreator) LoadPackageDefinition(dst *layout.PackagePaths) (pkg types.JackalPackage, warnings []string, err error)
LoadPackageDefinition loads and configure a jackal.yaml file when creating and publishing a skeleton package.
func (*SkeletonCreator) Output ¶
func (sc *SkeletonCreator) Output(dst *layout.PackagePaths, pkg *types.JackalPackage) (err error)
Output does the following:
- archives components
- generates checksums for all package files
- writes the loaded jackal.yaml to disk
- signs the package