Clarify configuration evidence providers
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user