Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
IgnoreDirs []string
IgnoreFiles []string
IncludeTests bool
IncludeVendor bool
MaxConcurrency int
}
Config represents parser configuration
type ConstantInfo ¶
ConstantInfo represents a constant declaration
type FileInfo ¶
type FileInfo struct {
Path string
Package string
Imports []ImportInfo
Functions []FunctionInfo
Structs []StructInfo
Interfaces []InterfaceInfo
Constants []ConstantInfo
Variables []VariableInfo
Dependencies []string
}
FileInfo represents parsed information from a Go file
type FunctionCall ¶
FunctionCall represents a function call within a function
type FunctionInfo ¶
type FunctionInfo struct {
Name string
Receiver string
Signature string
Parameters []Parameter
Returns []string
Body string
LineStart int
LineEnd int
IsExported bool
Calls []FunctionCall
}
FunctionInfo represents a function or method
type ImportInfo ¶
ImportInfo represents an import statement
type InterfaceInfo ¶
type InterfaceInfo struct {
Name string
Methods []MethodInfo
Embeds []string
LineStart int
LineEnd int
IsExported bool
}
InterfaceInfo represents an interface type
type MethodInfo ¶
MethodInfo represents an interface method
type ParseResult ¶
type ParseResult struct {
ProjectPath string // Root path of the project
Files []*FileInfo // All parsed files
ParseTime int64 // Time taken to parse in milliseconds
}
ParseResult contains the results of parsing a project
type Parser ¶
type Parser interface {
ParseFile(ctx context.Context, filePath string) (*FileInfo, error)
ParseDirectory(ctx context.Context, dirPath string) ([]*FileInfo, error)
ParseProject(ctx context.Context, projectPath string, config *Config) (*ParseResult, error)
}
Parser defines the interface for parsing Go source code
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service implements the Parser interface
func (*Service) ParseDirectory ¶
ParseDirectory parses all Go files in a directory
func (*Service) ParseProject ¶
func (s *Service) ParseProject(ctx context.Context, projectPath string, config *Config) (*ParseResult, error)
ParseProject parses an entire Go project
type StructInfo ¶
type StructInfo struct {
Name string
Fields []FieldInfo
Methods []FunctionInfo
Embeds []string
LineStart int
LineEnd int
IsExported bool
}
StructInfo represents a struct type
type VariableInfo ¶
VariableInfo represents a variable declaration