Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Module ¶
type Module struct {
// Dir is the directory containing the module's loom.yaml.
Dir string
// Config is the parsed loom.yaml.
Config *config.LoomFile
// Params are the resolved parameters for this module.
Params map[string]string
// Logger is the structured logger.
Logger *slog.Logger
}
Module represents a loaded and resolved loom module.
func (*Module) NewExecutionContext ¶
func (m *Module) NewExecutionContext(targetDir string, opts RunOptions) *action.ExecutionContext
NewExecutionContext creates an ExecutionContext for this module.
type RunOptions ¶ added in v0.1.2
type RunOptions struct {
DryRun bool
LocalRun bool
ShowDiff bool
// DiffWriter is the destination for diff output. Defaults to os.Stdout.
DiffWriter io.Writer
// TargetPath is the base directory for --local-run mode.
// Each module with a target spec clones into a numbered subdirectory.
TargetPath string
// GitAuthor is the default git author name for commitPush operations
// when not specified in loom.yaml.
GitAuthor string
// GitEmail is the default git author email for commitPush operations
// when not specified in loom.yaml.
GitEmail string
// contains filtered or unexported fields
}
RunOptions holds runtime flags for module execution.
func (*RunOptions) NextLocalDir ¶ added in v0.1.3
func (o *RunOptions) NextLocalDir(name string) string
NextLocalDir returns the next numbered subdirectory under TargetPath for a module with the given name, e.g. "00-parent-module".