Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Resolve ¶
func Resolve(st RefResolver) error
func ResolveWorkspace ¶ added in v0.2.0
func ResolveWorkspace(projects []ProjectRef) error
ResolveWorkspace performs a second-pass cross-project wikilink resolution after all per-project Resolve() calls have completed. It handles [project/doc-name] formatted wikilinks that could not be resolved within a single project. Because edges.target has a FOREIGN KEY constraint that references nodes in the same DB, cross-project edges use the same self-edge-with-metadata pattern as links_external: Source == Target == ref.FromNodeID, with {"cross_project": true, "target_project": "...", "target_node_id": "..."} stored in Metadata.
Types ¶
type ProjectRef ¶ added in v0.2.0
ProjectRef is a lightweight project descriptor used by ResolveWorkspace to avoid a circular import between resolver and workspace packages.
type RefResolver ¶ added in v0.3.2
type RefResolver interface {
GetAllDocumentNodes() ([]store.Node, error)
GetUnresolvedRefs() ([]store.UnresolvedRef, error)
InsertEdges(edges []store.Edge) error
InsertUnresolvedRefs(refs []store.UnresolvedRef) error
DeleteAllUnresolvedRefs() error
GetNodeByID(id string) (*store.Node, error)
}
RefResolver is the narrow slice of *store.Store that the reference resolver actually needs. It decouples resolver from the 125-method *store.Store god type: callers pass a concrete *store.Store (which auto-satisfies this subset), but the resolver only depends on these six methods. This shrinks the blast radius of store API changes on the resolver and documents the true dependency surface.