Documentation
¶
Overview ¶
@index Application graph-query policy for callers, imports, inheritance, summaries, and exact-name fallback.
Index ¶
- type CandidateMatch
- type FileSummary
- type PagedNodes
- type QueryOptions
- type Service
- func (s *Service) CalleesOf(ctx context.Context, nodeID uint) ([]graph.Node, error)
- func (s *Service) CalleesOfPage(ctx context.Context, nodeID uint, opts QueryOptions) (PagedNodes, error)
- func (s *Service) CalleesOfWithOptions(ctx context.Context, nodeID uint, opts QueryOptions) ([]graph.Node, error)
- func (s *Service) CallersOf(ctx context.Context, nodeID uint) ([]graph.Node, error)
- func (s *Service) CallersOfPage(ctx context.Context, nodeID uint, opts QueryOptions) (PagedNodes, error)
- func (s *Service) CallersOfWithOptions(ctx context.Context, nodeID uint, opts QueryOptions) ([]graph.Node, error)
- func (s *Service) ChildrenOf(ctx context.Context, nodeID uint) ([]graph.Node, error)
- func (s *Service) ChildrenOfPage(ctx context.Context, nodeID uint, opts QueryOptions) (PagedNodes, error)
- func (s *Service) FileSummaryOf(ctx context.Context, filePath string) (*FileSummary, error)
- func (s *Service) FindExactNameMatches(ctx context.Context, target string, limit int) ([]CandidateMatch, error)
- func (s *Service) ImportersOf(ctx context.Context, nodeID uint) ([]graph.Node, error)
- func (s *Service) ImportersOfPage(ctx context.Context, nodeID uint, opts QueryOptions) (PagedNodes, error)
- func (s *Service) ImportsOf(ctx context.Context, nodeID uint) ([]graph.Node, error)
- func (s *Service) ImportsOfPage(ctx context.Context, nodeID uint, opts QueryOptions) (PagedNodes, error)
- func (s *Service) InheritorsOf(ctx context.Context, nodeID uint) ([]graph.Node, error)
- func (s *Service) InheritorsOfPage(ctx context.Context, nodeID uint, opts QueryOptions) (PagedNodes, error)
- func (s *Service) TestsFor(ctx context.Context, nodeID uint) ([]graph.Node, error)
- func (s *Service) TestsForPage(ctx context.Context, nodeID uint, opts QueryOptions) (PagedNodes, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CandidateMatch ¶
type CandidateMatch struct {
QualifiedName string
Kind graph.NodeKind
FilePath string
StartLine int
}
CandidateMatch describes one exact short-name fallback candidate for query_graph. @intent provide compact, stable target suggestions when a short symbol name matches multiple nodes.
type FileSummary ¶
FileSummary aggregates node counts for one file. @intent summarize the kinds of graph nodes stored for a source file
type PagedNodes ¶
@intent carry paginated graph query rows together with the total match count for MCP responses.
type QueryOptions ¶
QueryOptions controls how predefined relationship lookups treat lower-confidence edges. @intent let callers choose between compatibility mode and strict call-edge analysis.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service serves predefined graph relationship queries. @intent provide reusable higher-level graph lookups for MCP queries
func New ¶
func New(repository analyzeapp.QueryRepository) *Service
New creates a predefined query service. @intent construct a service for common graph traversal queries
func (*Service) CalleesOf ¶
CalleesOf returns nodes called by the target node. @intent find downstream call dependencies of a function or method node @see query.Service.CallersOf
func (*Service) CalleesOfPage ¶
func (s *Service) CalleesOfPage(ctx context.Context, nodeID uint, opts QueryOptions) (PagedNodes, error)
CalleesOfPage returns callees with pagination metadata. @intent support paginated query_graph response pagination and cache metadata.
func (*Service) CalleesOfWithOptions ¶
func (s *Service) CalleesOfWithOptions(ctx context.Context, nodeID uint, opts QueryOptions) ([]graph.Node, error)
CalleesOfWithOptions returns nodes called by the target node with explicit fallback-call control. @intent support strict callee lookups that ignore fallback-derived edges when requested.
func (*Service) CallersOf ¶
CallersOf returns nodes that call the target node. @intent find upstream callers of a function or method node @see query.Service.CalleesOf
func (*Service) CallersOfPage ¶
func (s *Service) CallersOfPage(ctx context.Context, nodeID uint, opts QueryOptions) (PagedNodes, error)
CallersOfPage returns callers with pagination metadata. @intent support paginated query_graph response pagination and cache metadata.
func (*Service) CallersOfWithOptions ¶
func (s *Service) CallersOfWithOptions(ctx context.Context, nodeID uint, opts QueryOptions) ([]graph.Node, error)
CallersOfWithOptions returns nodes that call the target node with explicit fallback-call control. @intent support strict caller lookups that ignore fallback-derived edges when requested.
func (*Service) ChildrenOf ¶
ChildrenOf returns nodes contained by the target node. @intent enumerate structural children contained within a file or type node
func (*Service) ChildrenOfPage ¶
func (s *Service) ChildrenOfPage(ctx context.Context, nodeID uint, opts QueryOptions) (PagedNodes, error)
ChildrenOfPage returns child nodes with pagination metadata. @intent support paginated query_graph response pagination and cache metadata.
func (*Service) FileSummaryOf ¶
FileSummaryOf returns node counts grouped by kind for one file. @intent summarize how much graph structure exists within a specific file @param filePath repository-relative source file path to summarize @return per-kind node counts and total node count for the file
func (*Service) FindExactNameMatches ¶
func (s *Service) FindExactNameMatches(ctx context.Context, target string, limit int) ([]CandidateMatch, error)
FindExactNameMatches returns nodes whose short name exactly matches target. @intent support MCP fallback from short symbol names to fully qualified graph nodes.
func (*Service) ImportersOf ¶
ImportersOf returns nodes that import the target node. @intent reveal reverse import dependencies pointing at the target node
func (*Service) ImportersOfPage ¶
func (s *Service) ImportersOfPage(ctx context.Context, nodeID uint, opts QueryOptions) (PagedNodes, error)
ImportersOfPage returns importing nodes with pagination metadata. @intent support paginated query_graph response pagination and cache metadata.
func (*Service) ImportsOf ¶
ImportsOf returns nodes imported by the target node. @intent reveal outgoing import dependencies for a file or package node
func (*Service) ImportsOfPage ¶
func (s *Service) ImportsOfPage(ctx context.Context, nodeID uint, opts QueryOptions) (PagedNodes, error)
ImportsOfPage returns imported nodes with pagination metadata. @intent support paginated query_graph response pagination and cache metadata.
func (*Service) InheritorsOf ¶
InheritorsOf returns nodes inheriting from the target node. @intent find derived types that point to the target through inheritance edges
func (*Service) InheritorsOfPage ¶
func (s *Service) InheritorsOfPage(ctx context.Context, nodeID uint, opts QueryOptions) (PagedNodes, error)
InheritorsOfPage returns inheritors with pagination metadata. @intent support paginated query_graph response pagination and cache metadata.
func (*Service) TestsFor ¶
TestsFor returns tests that exercise the target node. @intent find test nodes linked to the target via tested_by edges
func (*Service) TestsForPage ¶
func (s *Service) TestsForPage(ctx context.Context, nodeID uint, opts QueryOptions) (PagedNodes, error)
TestsForPage returns tests with pagination metadata. @intent support paginated query_graph response pagination and cache metadata.