export

package
v0.0.1-alpha Latest Latest
Warning

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

Go to latest
Published: May 28, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const SchemaVersion = "projectlens-graph/v2"

SchemaVersion bumps when the document shape changes. v2 added per-edge `provenance` and `confidence_class` fields (additive — v1 readers ignore them).

Variables

View Source
var AllowedEdgeTypes = []string{
	"calls", "implements", "imports",
	"reads_table", "writes_table",
	"co_changes",
	"knowledge_about",
}

AllowedEdgeTypes is the canonical raw-edge_type vocabulary the exporter and the --edges flag both consult. Adding a new edge_type to the indexer requires extending this list in the same change.

Functions

func IsValidEdgeType

func IsValidEdgeType(t string) bool

Types

type GraphExporter

type GraphExporter struct {
	// contains filtered or unexported fields
}

GraphExporter streams nodes + edges from Postgres directly to an io.Writer.

func NewGraphExporter

func NewGraphExporter(db *storage.DB, insp indexstate.Inspector) *GraphExporter

func (*GraphExporter) Export

func (g *GraphExporter) Export(ctx context.Context, w io.Writer, opts Options) error

Export writes a complete graph JSON envelope to w.

type Options

type Options struct {
	Edges           []string // nil or {"all"} means all
	IncludeEvidence bool
}

Jump to

Keyboard shortcuts

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