Documentation
¶
Overview ¶
Package datalog holds check rules authored as datalog queries (via query.RuleFromQuery, WS3-038) rather than as Go or Spec. They register through check.RegisterSource, namespaced under the "dl" source, and live in their own package because a query-backed rule imports both check and query, and check must never import query. A binary that wants these rules blank-imports this package (cmd/agni does); they then appear in DefaultCatalog for both `agni check` and serve, like any other registered source.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DocRules ¶
DocRules returns the datalog source's documented rules for the docsite catalog generator (tools/catalogdocs). It is the same slice the source registers; callers must not mutate the returned rules.
func Queries ¶
func Queries() []query.FindingQuery
Queries returns the datalog rule DECLARATIONS this package holds, registered and twin alike. It is the rule-definition contract's view of the package (WS3-103). RuleFromQuery yields a check.Rule whose Eval closure has no wire form, so a round-trip has to start from the declaration rather than the compiled rule. Callers must not mutate the returned values.
func RuleDocImageHandler ¶ added in v0.6.9
RuleDocImageHandler serves this package's card diagrams, under docs/images/, read-only (agni issue 75). It follows builtin.RuleDocImageHandler's contract. It serves .svg and .png only and answers 404 for anything else, the markdown included. It is mounted under a prefix (e.g. "images/power-pin-mistyped.svg") and sets an explicit SVG content-type.
Types ¶
This section is empty.