index

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2026 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneOrFetch

func CloneOrFetch(url, repoPath string) (*git.Repository, error)

CloneOrFetch clones a bare repo at repoPath, or fetches if it already exists. Returns the opened go-git Repository.

func IndexLocalRepo

func IndexLocalRepo(ctx context.Context, s *store.Store, localPath string, opts IndexOptions) error

IndexLocalRepo indexes a local git repository in-place (no clone). It indexes all committed history AND the current working tree, including uncommitted (dirty) files.

func IndexRepo

func IndexRepo(ctx context.Context, s *store.Store, url string, opts IndexOptions) error

IndexRepo indexes a git repository into the store.

func RepoDirFromURL

func RepoDirFromURL(url string) (string, error)

RepoDirFromURL derives a local directory name from a repo URL. "https://github.com/user/repo/" -> "github.com/user/repo.git"

func RepoNameFromURL

func RepoNameFromURL(url string) (string, error)

RepoNameFromURL derives a human-readable name from a URL. "https://github.com/user/repo" -> "github.com/user/repo"

Types

type BleveCodeDoc

type BleveCodeDoc struct {
	Content string `json:"content"`
}

BleveCodeDoc is the document indexed into the code Bleve index.

type BleveDiffDoc

type BleveDiffDoc struct {
	Content string `json:"content"`
}

BleveDiffDoc is the document indexed into the diff Bleve index.

type IndexOptions

type IndexOptions struct {
	MaxHistoryDepth int // 0 = unlimited
	Progress        ProgressFunc
	SkipDirs        map[string]bool // directories to skip in worktree indexing; nil = use defaultSkipDirs
}

IndexOptions configures the indexing process.

type ParseStats

type ParseStats struct {
	BlobsParsed      uint64
	SymbolsExtracted uint64
}

ParseStats holds statistics from the symbol parsing phase.

func ParseSymbols

func ParseSymbols(ctx context.Context, s *store.Store, progress ProgressFunc) (ParseStats, error)

ParseSymbols extracts symbols and references from all unparsed blobs with supported languages and inserts them into the symbols and symbol_refs tables.

type ProgressFunc

type ProgressFunc func(msg string)

ProgressFunc is called with status messages during indexing.

Jump to

Keyboard shortcuts

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