Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GenerateOptions ¶
type GenerateOptions struct {
Mode MigrationMode
OutputRoot string
Apply bool
}
type GenerateResult ¶
type GenerateResult struct {
OutputRoot string `json:"output_root"`
GeneratedCommands int `json:"generated_commands"`
GeneratedFiles []string `json:"generated_files,omitempty"`
}
func Generate ¶
func Generate(plan Plan, opts GenerateOptions) (GenerateResult, error)
type MigrationMode ¶
type MigrationMode string
const ( ModeSafe MigrationMode = "safe" ModeInPlace MigrationMode = "in-place" )
type MigrationStrategy ¶
type MigrationStrategy string
const ( StrategyAuto MigrationStrategy = "auto" StrategyWrapper MigrationStrategy = "wrapper" StrategyManual MigrationStrategy = "manual" )
type Plan ¶
type Plan struct {
SchemaVersion string `json:"schema_version"`
RepoRoot string `json:"repo_root"`
Source string `json:"source"`
GeneratedAt time.Time `json:"generated_at"`
Scripts []ScriptPlan `json:"scripts"`
Summary PlanSummary `json:"summary"`
}
func BuildPlan ¶
func BuildPlan(scan ScanResult) Plan
type PlanSummary ¶
type Report ¶
type Report struct {
SchemaVersion string `json:"schema_version"`
RepoRoot string `json:"repo_root"`
Source string `json:"source"`
Summary PlanSummary `json:"summary"`
Scripts []ScriptPlan `json:"scripts"`
}
type ScanResult ¶
type ScanResult struct {
RepoRoot string `json:"repo_root"`
Source string `json:"source"`
Scanned int `json:"scanned"`
Scripts []ScriptInfo `json:"scripts"`
}
func ScanScripts ¶
func ScanScripts(repoRoot, source string) (ScanResult, error)
type ScriptInfo ¶
type ScriptInfo struct {
Name string `json:"name"`
Path string `json:"path"`
Shell ShellType `json:"shell"`
Executable bool `json:"executable"`
UsesArgs bool `json:"uses_args"`
UsesEnv bool `json:"uses_env"`
ExternalDeps []string `json:"external_deps,omitempty"`
RiskSignals []string `json:"risk_signals,omitempty"`
SizeBytes int `json:"size_bytes"`
}
type ScriptPlan ¶
type ScriptPlan struct {
Script ScriptInfo `json:"script"`
Strategy MigrationStrategy `json:"strategy"`
Reasons []string `json:"reasons,omitempty"`
Score float64 `json:"score"`
}
Click to show internal directories.
Click to hide internal directories.