index

package
v2.6.1 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Export

func Export(vaultRoot string, outputPath string) error

Export exports the index to JSON with deterministic ordering

Types

type Builder

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

Builder handles full scan indexing of a vault

func NewBuilder

func NewBuilder(vaultRoot string, cfg *config.Config) *Builder

NewBuilder creates a new index builder

func (*Builder) Rebuild

func (b *Builder) Rebuild() error

Rebuild performs a full atomic rebuild of the index It creates a temporary database, populates it, then atomically replaces the existing index

type EdgeExport

type EdgeExport struct {
	FromID    string  `json:"from_id"`
	ToID      *string `json:"to_id,omitempty"` // nil for unresolved links
	EdgeType  string  `json:"edge_type"`
	RawTarget string  `json:"raw_target"` // JSON string of RawTarget
	Span      string  `json:"span"`       // JSON string of Span
}

EdgeExport represents an edge in the export

type ExportData

type ExportData struct {
	Version string       `json:"version"`
	Nodes   []NodeExport `json:"nodes"`
	Edges   []EdgeExport `json:"edges"`
	Tags    []TagExport  `json:"tags"`
}

ExportData represents the complete index export structure

type NodeExport

type NodeExport struct {
	ID      string `json:"id"`
	Type    string `json:"type"`
	Key     string `json:"key"`
	Title   string `json:"title"`
	State   string `json:"state"`
	Created string `json:"created"`
	Updated string `json:"updated"`
	Path    string `json:"path"`
}

NodeExport represents a node in the export

type TagExport

type TagExport struct {
	NodeID string `json:"node_id"`
	Tag    string `json:"tag"`
}

TagExport represents a tag in the export

Jump to

Keyboard shortcuts

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