Documentation
¶
Overview ¶
@index Cross-namespace reference sync: materializes @see ccg:// annotation tags into cross_refs rows.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnnotationRef ¶
AnnotationRef pairs one ccg:// @see tag value with the node that declared it. @intent carry the minimal source facts needed to materialize a cross-namespace reference.
type Service ¶
Service rebuilds cross-namespace reference state after a namespace ingest. @intent keep cross_refs derived state consistent with annotations and both namespaces' current nodes.
func New ¶
New constructs a cross-ref sync service. @intent bind the sync policy to one persistence port instance.
func (*Service) SyncNamespace ¶
SyncNamespace rebuilds outbound cross refs of the context namespace and re-resolves inbound ones. @intent run after a build/update commit so cross-namespace links reflect the namespace's new node identity. @domainRule outbound rows are fully replaced from current @see tags; malformed refs are skipped (lint owns reporting). @domainRule inbound rows are re-resolved because a replace-style build regenerates the target node ids. @sideEffect deletes, inserts, and updates cross_refs rows.
type Store ¶
type Store interface {
ListAnnotationCCGRefs(ctx context.Context, namespace string) ([]AnnotationRef, error)
ResolveCCGRef(ctx context.Context, ref reference.Ref) (uint, bool, error)
ReplaceCrossRefsFrom(ctx context.Context, fromNamespace string, refs []graph.CrossRef) error
ListInboundCrossRefs(ctx context.Context, toNamespace string) ([]graph.CrossRef, error)
UpdateCrossRefResolution(ctx context.Context, id uint, resolvedNodeID *uint, status graph.CrossRefStatus) error
}
Store exposes the persistence operations cross-ref sync needs. @intent keep the sync policy independent from GORM by owning a minimal consumer-side port.