generated from coulomb/repo-seed
Add CLI and service skeleton
This commit is contained in:
@@ -154,6 +154,12 @@ func (e *Engine) Explain(decisionID string) (Explanation, error) {
|
||||
return Explanation{}, fmt.Errorf("decision %q not found", decisionID)
|
||||
}
|
||||
|
||||
return ExplainEnvelope(decision), nil
|
||||
}
|
||||
|
||||
// ExplainEnvelope returns the same explanation shape for an already-loaded
|
||||
// decision envelope.
|
||||
func ExplainEnvelope(decision api.DecisionEnvelope) Explanation {
|
||||
return Explanation{
|
||||
DecisionID: decision.ID,
|
||||
Effect: decision.Effect,
|
||||
@@ -166,7 +172,7 @@ func (e *Engine) Explain(decisionID string) (Explanation, error) {
|
||||
MatchedRule: decision.MatchedRule,
|
||||
Diagnostics: decision.Diagnostics,
|
||||
Caring: decision.Caring,
|
||||
}, nil
|
||||
}
|
||||
}
|
||||
|
||||
type registryFacts struct {
|
||||
|
||||
Reference in New Issue
Block a user