Documentation
¶
Overview ¶
Package run is the orchestration layer behind `driftsync check` and `driftsync sync`: it reads a validated config, extracts the code-side spec, canonicalizes both sides, diffs them, and (for sync) proposes, enriches, and applies the fix. The low-level packages (diff, patch, applier, enrich) stay unaware of the config file.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
Config *config.Config
// Enricher fills descriptions for brand-new fields in sync mode. Nil skips
// the step entirely (descriptions stay blank). Ignored by Check.
Enricher enrich.Enricher
// Stderr receives the extraction command's stdout+stderr chatter, so the
// rendered report on the real stdout stays clean. Defaults to os.Stderr.
Stderr io.Writer
}
Options drives a run. The CLI fills it in; tests construct it directly.
type Result ¶
type Result struct {
Report *diff.Report
RenderedReport string // per Config.Report (text | md | json)
Patches []patch.Patch
Applied int
Failed []applier.Failure
Corrected []byte // sync only: the rewritten published spec
// ExitCode is the process exit code check should use, per Config.FailOn.
// Always 0 for Sync (the PR is the gate).
ExitCode int
}
Result is what a run produced.
Click to show internal directories.
Click to hide internal directories.