cmdindex

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildIndexCmd

func BuildIndexCmd(deps IndexDeps) *cobra.Command

BuildIndexCmd creates the "index" command.

func BuildSearchCmd

func BuildSearchCmd(deps IndexDeps) *cobra.Command

BuildSearchCmd creates the "search" command.

func RunIndex

func RunIndex(ctx context.Context, out io.Writer, source string, full bool, deps IndexDeps) error

RunIndex loads instances, opens the store, and syncs.

func RunIndexStatus

func RunIndexStatus(ctx context.Context, out io.Writer, deps IndexDeps) error

RunIndexStatus shows index statistics.

func RunSearch

func RunSearch(ctx context.Context, out io.Writer, query string, limit int, source string, jsonOut, tableOut bool, deps IndexDeps) error

RunSearch opens the store and searches.

Types

type IndexDeps

type IndexDeps struct {
	LoadInstances       func(dir string) ([]tracker.Instance, error)
	LoadNotionInstances func(dir string) ([]index.NotionInstance, error)
	DBPath              func() string
	NewStore            func(dbPath string) (index.Store, error)
}

IndexDeps holds injectable dependencies for index commands.

func DefaultIndexDeps

func DefaultIndexDeps() IndexDeps

DefaultIndexDeps returns production dependencies.

Jump to

Keyboard shortcuts

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