Documentation
¶
Index ¶
- func FormatSearchSummary(summary SearchSummary) string
- func Index(files []SourceFile, opts Options) (Result, []Diagnostic, error)
- type Call
- type Candidate
- type Diagnostic
- type DiagnosticLevel
- type Edge
- type EdgeType
- type Language
- type Options
- type Reference
- type RelevantFile
- type Result
- type SearchSummary
- type SourceFile
- type Span
- type Symbol
- type SymbolKind
- type SymbolRelationship
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatSearchSummary ¶
func FormatSearchSummary(summary SearchSummary) string
FormatSearchSummary renders a SearchSummary in a plain-text format suitable for CLI output.
func Index ¶
func Index(files []SourceFile, opts Options) (Result, []Diagnostic, error)
Index parses caller-provided files and returns a storage-agnostic symbol graph.
Types ¶
type Call ¶
type Call struct {
CallerID string
CalleeID string
ContextID string
Location Span
Candidates []Candidate
IsAmbiguous bool
}
Call captures one callable invocation site.
type Diagnostic ¶
type Diagnostic struct {
Level DiagnosticLevel
Code string
Message string
Path string
Line int
}
Diagnostic is a non-fatal file or analysis issue.
type DiagnosticLevel ¶
type DiagnosticLevel string
DiagnosticLevel classifies diagnostics emitted during indexing.
const ( DiagnosticLevelError DiagnosticLevel = "error" DiagnosticLevelWarning DiagnosticLevel = "warning" )
type Options ¶
type Options struct {
LanguageOverrides map[string]Language
DefaultContextID string
IncludeTests bool
IncludeGenerated bool
}
Options controls index behavior.
type Reference ¶
type Reference struct {
FromID string
ToID string
ContextID string
Location Span
Candidates []Candidate
IsAmbiguous bool
}
Reference captures one symbol usage site.
type RelevantFile ¶
RelevantFile describes one file in a search summary.
type SearchSummary ¶
type SearchSummary struct {
Query string
RelevantFiles []RelevantFile
Relationships []SymbolRelationship
}
SearchSummary captures a compact, human-readable view of relevant files and symbol relationships.
func BuildSearchSummary ¶
func BuildSearchSummary(query string, files []SourceFile, index Result) (SearchSummary, error)
BuildSearchSummary builds a report-friendly summary for query-driven symbol exploration.
type SourceFile ¶
SourceFile is one caller-provided source unit.
type Symbol ¶
type Symbol struct {
ID string
StableKey string
Language Language
Kind SymbolKind
LanguageSpecificKind string
Name string
FQN string
Signature string
ContainerFQN string
ContextID string
Declarations []Span
}
Symbol is a canonical symbol record.
type SymbolKind ¶
type SymbolKind string
SymbolKind is a canonical cross-language kind.
const ( SymbolKindPackage SymbolKind = "package" SymbolKindNamespace SymbolKind = "namespace" SymbolKindType SymbolKind = "type" SymbolKindFunction SymbolKind = "function" SymbolKindMethod SymbolKind = "method" SymbolKindProperty SymbolKind = "property" SymbolKindEvent SymbolKind = "event" SymbolKindIndexer SymbolKind = "indexer" SymbolKindField SymbolKind = "field" )
type SymbolRelationship ¶
SymbolRelationship captures one directed relationship between symbols.