wikiindex

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

@index wikiindex builds the browser-facing docs tree without depending on community postprocessing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder struct {
	DB          *gorm.DB
	OutDir      string
	IndexDir    string
	Namespace   string
	ProjectDesc string
	Exclude     []string
}

Builder writes the wiki-index.json compatibility snapshot for ccg-server's browser UI. @intent derive a package/file/symbol presentation tree directly from graph nodes.

func (*Builder) Build

func (b *Builder) Build(ctx context.Context) (int, int, error)

Build creates the wiki-index.json compatibility snapshot and returns package and file counts. @intent generate a UI-oriented tree independent of community detection and PageIndex retrieval. @sideEffect reads graph tables and writes wiki-index.json.

func (*Builder) BuildSubtree

func (b *Builder) BuildSubtree(ctx context.Context, nodeID string, depth int) (*ragindex.TreeNode, error)

BuildSubtree creates one Wiki tree node plus a bounded set of descendants directly from DB rows. @intent support GitHub-style lazy Wiki navigation without synthesizing the full tree for every folder expansion. @ensures depth > 0 limits descendants relative to the selected node; depth <= 0 preserves full-tree compatibility.

func (*Builder) BuildTree

func (b *Builder) BuildTree(ctx context.Context) (*ragindex.TreeNode, int, int, error)

BuildTree creates the browser-facing package/file/symbol Wiki tree without writing wiki-index.json. @intent let runtime callers synthesize the same Wiki tree directly from DB rows when the JSON index has not been generated. @ensures successful calls return deterministic folder/package/file/symbol ordering matching Build output.

Jump to

Keyboard shortcuts

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