Documentation
¶
Overview ¶
Package lore implements the lore CLI commands.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRootCmd ¶
NewRootCmd creates the root lore command with all subcommands.
Returns:
- *cobra.Command: configured lore command with registry flag and all subcommands
Types ¶
type BuildConfig ¶
type BuildConfig struct {
// ManifestPath is the path to a packages-manifest.yaml file.
// Mutually exclusive with Packages.
ManifestPath string
// Packages is a list of package names to install.
// Mutually exclusive with ManifestPath.
Packages []string
// Platform is the target platform (e.g., "Darwin", "Linux.Debian").
// If empty, auto-detected.
Platform string
// Features are optional feature flags to enable.
Features []string
// Settings are key-value configuration settings.
Settings map[string]string
// DryRun prevents actual installation when true.
DryRun bool
// RegistryClient provides access to the package lorepackage.
// If nil, a default client is created.
RegistryClient *lorepackage.Registry
// ActionRegistry provides access to execution actions.
// Must be set before calling Build.
ActionRegistry *op.ActionRegistry
}
BuildConfig holds configuration for building a package graph.
type BuildResult ¶
type BuildResult struct {
// Graph is the execution graph ready for the execution.
Graph *op.Graph
// Packages lists the resolved package names.
Packages []string
// Platform is the detected or specified platform.
Platform string
}
BuildResult contains the built execution graph and metadata for packages.
func Build ¶
func Build(cfg BuildConfig) (*BuildResult, error)
Build creates an execution graph from the given configuration.
Parameters:
- cfg: the build configuration (manifest path or package list, platform, options).
Returns:
- *BuildResult: the execution graph and metadata.
- error: non-nil if configuration is invalid or graph building fails.
func BuildFromManifest ¶
func BuildFromManifest(manifestPath, targetPlatform string) (*BuildResult, error)
BuildFromManifest creates an execution graph from a packages-manifest.yaml file.
Parameters:
- manifestPath: the path to the packages-manifest file.
- targetPlatform: the platform string (empty for auto-detect).
Returns:
- *BuildResult: the execution graph and metadata.
- error: non-nil if graph building fails.
func BuildFromPackages ¶
func BuildFromPackages(packages []string, targetPlatform string) (*BuildResult, error)
BuildFromPackages creates an execution graph from a list of package names.
Parameters:
- packages: the package names to resolve and install.
- targetPlatform: the platform string (empty for auto-detect).
Returns:
- *BuildResult: the execution graph and metadata.
- error: non-nil if graph building fails.
type Planner ¶
type Planner struct {
Platform string
ActionRegistry *op.ActionRegistry
RegistryClient *lorepackage.Registry
Features []string
Settings map[string]string
DryRun bool
}
Planner encapsulates package resolution for adding installation nodes and phases to an execution graph. Used by both lore.Build() and writ deploy.
func (*Planner) PlanByName ¶
PlanByName resolves explicit package names and adds installation nodes to the graph. Returns the resolved package names.
Parameters:
- graph: the execution graph to populate.
- packages: the package names to resolve and plan.
Returns:
- []string: the resolved package names.
- error: non-nil if any package resolution or node building fails.
func (*Planner) PlanPackages ¶
PlanPackages parses a packages-manifest file and adds installation nodes to the graph. Returns the resolved package names.
Parameters:
- graph: the execution graph to populate.
- manifestPath: the path to the packages-manifest file.
Returns:
- []string: the resolved package names.
- error: non-nil if manifest parsing or package resolution fails.