Documentation
¶
Index ¶
- type AffectedFile
- type Arch
- type CallResolver
- type ChangeKind
- type Changes
- type CoChange
- type CoChangesResult
- type ContentHit
- type ContentSearchOpts
- type ContentSearchResult
- type CoverageIssue
- type DepsResult
- type Edge
- type EdgeKind
- type Engine
- func (e *Engine) Architecture(ctx context.Context) (Arch, error)
- func (e *Engine) CoChanges(ctx context.Context, file string, limit int) (CoChangesResult, error)
- func (e *Engine) DeadCode(ctx context.Context, limit int) ([]*Node, error)
- func (e *Engine) Deps(ctx context.Context, target string, depth int) (DepsResult, error)
- func (e *Engine) DetectChanges(ctx context.Context, since string) (Changes, error)
- func (e *Engine) EdgeStats() map[Provenance]int
- func (e *Engine) Hierarchy(ctx context.Context, name, file string) (HierarchyResult, error)
- func (e *Engine) Index(ctx context.Context) (Status, error)
- func (e *Engine) IsStale(ctx context.Context) bool
- func (e *Engine) Search(ctx context.Context, opts SearchOpts) ([]*Node, error)
- func (e *Engine) SearchContent(ctx context.Context, opts ContentSearchOpts) (ContentSearchResult, error)
- func (e *Engine) SearchPage(ctx context.Context, opts SearchOpts) (SearchResult, error)
- func (e *Engine) Similar(ctx context.Context, name, file string, limit int) (SimilarResult, error)
- func (e *Engine) Snippet(ctx context.Context, name, file string) (Snippet, error)
- func (e *Engine) Status() Status
- func (e *Engine) StatusOrLoad() Status
- func (e *Engine) Tests(ctx context.Context, name, file string) (TestsResult, error)
- func (e *Engine) Trace(ctx context.Context, from, to, file string, callers bool, maxDepth int) (TraceResult, error)
- type Graph
- type HierarchyResult
- type Hotspot
- type Impact
- type Import
- type Kind
- type LangStat
- type ModuleDep
- type ModuleStat
- type Node
- type Option
- type Path
- type Provenance
- type RawContentHit
- type SearchOpts
- type SearchResult
- type Similar
- type SimilarResult
- type Snippet
- type Status
- type TestsResult
- type TraceResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AffectedFile ¶
type AffectedFile struct {
File string `json:"file"`
Kind ChangeKind `json:"kind"`
Nodes []*Node `json:"nodes"`
}
type Arch ¶
type Arch struct {
Languages []LangStat `json:"languages"`
TotalFiles int `json:"total_files"`
TotalNodes int `json:"total_nodes"`
TotalEdges int `json:"total_edges"`
Layers []ModuleStat `json:"layers"`
Modules []ModuleStat `json:"modules"`
ModuleDeps []ModuleDep `json:"module_deps"`
EntryPoints []*Node `json:"entry_points"`
Hotspots []Hotspot `json:"hotspots"`
}
type CallResolver ¶
type ChangeKind ¶
type ChangeKind string
const ( ChangeAdded ChangeKind = "added" ChangeModified ChangeKind = "modified" ChangeDeleted ChangeKind = "deleted" )
type Changes ¶
type Changes struct {
Files []AffectedFile `json:"files"`
Impact []Impact `json:"impact,omitempty"`
}
type CoChangesResult ¶
type ContentHit ¶ added in v0.12.7
type ContentSearchOpts ¶ added in v0.12.7
type ContentSearchResult ¶ added in v0.12.7
type ContentSearchResult struct {
Hits []ContentHit `json:"hits"`
Raw []RawContentHit `json:"raw,omitempty"`
TotalLineHits int `json:"total_line_hits"`
TotalResults int `json:"total_results"`
TotalRawResults int `json:"total_raw_results"`
Offset int `json:"offset"`
HasMore bool `json:"has_more"`
RawHasMore bool `json:"raw_has_more"`
}
type CoverageIssue ¶ added in v0.12.7
CoverageIssue records a source file that discovery found but the structural index could not fully process. Content search still scans these files and returns their hits as raw matches.
type DepsResult ¶
type Edge ¶
type Edge struct {
From string `json:"from"`
To string `json:"to"`
Kind EdgeKind `json:"kind"`
Via Provenance `json:"via,omitempty"`
}
type Engine ¶
type Engine struct {
// contains filtered or unexported fields
}
func (*Engine) DetectChanges ¶
func (*Engine) EdgeStats ¶
func (e *Engine) EdgeStats() map[Provenance]int
func (*Engine) IsStale ¶ added in v0.12.7
IsStale reports whether the cached graph's discovered source-file set or any file's size/mtime differs from the workspace. A false result when no graph exists means "not indexed", not "fresh".
func (*Engine) SearchContent ¶ added in v0.12.7
func (e *Engine) SearchContent(ctx context.Context, opts ContentSearchOpts) (ContentSearchResult, error)
SearchContent scans the graph's discovered source-file set, maps each matching line to the tightest containing definition, and deduplicates the result by definition. Matches outside graph coverage remain in Raw.
func (*Engine) SearchPage ¶ added in v0.12.7
func (e *Engine) SearchPage(ctx context.Context, opts SearchOpts) (SearchResult, error)
func (*Engine) StatusOrLoad ¶
type HierarchyResult ¶
type ModuleStat ¶
type Option ¶
type Option func(*Engine)
func WithResolver ¶
func WithResolver(r CallResolver) Option
type Path ¶
type Path struct {
Nodes []*Node
Via []Provenance
}
type Provenance ¶
type Provenance string
const ( ViaName Provenance = "name" ViaLSP Provenance = "lsp" ViaAmbiguous Provenance = "ambiguous" )
type RawContentHit ¶ added in v0.12.7
type SearchOpts ¶
type SearchResult ¶ added in v0.12.7
type SimilarResult ¶
type TestsResult ¶
type TraceResult ¶
Click to show internal directories.
Click to hide internal directories.