Clarify configuration evidence providers

This commit is contained in:
2026-11-07 15:47:17 +00:00
parent ac113291fc
commit 52f1d99994
7 changed files with 36 additions and 45 deletions

View File

@@ -63,7 +63,9 @@ type ComparisonRequest[I any] struct {
Right ComparisonSide[I]
}
// EffectiveWriter writes a configuration's native effective representation.
// EffectiveWriter writes one safe YAML document for conversion by
// commandkit.DecodeYAMLReport. Its formatting, comments, and framing are not
// passed through to the resulting report.
type EffectiveWriter interface {
WriteEffective(io.Writer) error
}
@@ -73,14 +75,12 @@ type SourceReader interface {
Sources() []configkit.SourceInfo
}
// ExplanationReader reads and writes a configuration's native path explanation.
// ExplanationReader acquires a configuration's native path explanation.
type ExplanationReader interface {
Explain(configkit.Path) (configkit.Explanation, bool)
WriteExplanation(io.Writer, configkit.Path) error
}
// View exposes native configuration facets without reconstructing their
// reports.
// View exposes native configuration evidence used to build reports.
type View struct {
Effective EffectiveWriter
Sources SourceReader