datalog

package
v0.11.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 8 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

func DocRules() []*check.Rule

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

func RuleDocImageHandler() http.Handler

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL