Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnalysisResult ¶
type AnalysisResult struct {
ProjectID ID `json:"project_id"`
Nodes []Node `json:"nodes"`
Relationships []Relationship `json:"relationships"`
TotalFiles int `json:"total_files"`
TotalPackages int `json:"total_packages"`
TotalFunctions int `json:"total_functions"`
TotalStructs int `json:"total_structs"`
AnalyzedAt time.Time `json:"analyzed_at"`
Duration time.Duration `json:"duration"`
}
AnalysisResult represents the result of analyzing a codebase
type Error ¶
type Error struct {
Err error `json:"error"`
Code ErrorCode `json:"code"`
Metadata map[string]any `json:"metadata,omitempty"`
}
Error represents a structured error with code and metadata
type ErrorCode ¶
type ErrorCode string
ErrorCode represents a unique error code
const ( // Parser errors ErrorCodeParseFailure ErrorCode = "PARSE_FAILURE" ErrorCodeInvalidSyntax ErrorCode = "INVALID_SYNTAX" ErrorCodeFileNotFound ErrorCode = "FILE_NOT_FOUND" ErrorCodeDirectoryNotFound ErrorCode = "DIRECTORY_NOT_FOUND" // Graph errors ErrorCodeGraphConnection ErrorCode = "GRAPH_CONNECTION_FAILED" ErrorCodeGraphQuery ErrorCode = "GRAPH_QUERY_FAILED" ErrorCodeGraphWrite ErrorCode = "GRAPH_WRITE_FAILED" ErrorCodeGraphTransaction ErrorCode = "GRAPH_TRANSACTION_FAILED" // Configuration errors ErrorCodeConfigNotFound ErrorCode = "CONFIG_NOT_FOUND" ErrorCodeConfigInvalid ErrorCode = "CONFIG_INVALID" ErrorCodeConfigWrite ErrorCode = "CONFIG_WRITE_FAILED" // Analysis errors ErrorCodeAnalysisFailed ErrorCode = "ANALYSIS_FAILED" ErrorCodeNoGoFiles ErrorCode = "NO_GO_FILES_FOUND" // Validation errors ErrorCodeValidationFailed ErrorCode = "VALIDATION_FAILED" ErrorCodeInvalidInput ErrorCode = "INVALID_INPUT" )
type Node ¶
type Node struct {
ID ID `json:"id"`
Type NodeType `json:"type"`
Name string `json:"name"`
Path string `json:"path,omitempty"`
Properties map[string]any `json:"properties,omitempty"`
CreatedAt time.Time `json:"created_at"`
}
Node represents a node in the code graph
type NodeType ¶
type NodeType string
NodeType represents the type of a node in the graph
const ( NodeTypePackage NodeType = "Package" NodeTypeFile NodeType = "File" NodeTypeFunction NodeType = "Function" NodeTypeStruct NodeType = "Struct" NodeTypeInterface NodeType = "Interface" NodeTypeMethod NodeType = "Method" NodeTypeImport NodeType = "Import" NodeTypeConstant NodeType = "Constant" NodeTypeVariable NodeType = "Variable" )
type Project ¶
type Project struct {
ID ID `json:"id"`
Name string `json:"name"`
RootPath string `json:"root_path"`
Neo4jURI string `json:"neo4j_uri"`
Neo4jUser string `json:"neo4j_user"`
ConfigPath string `json:"config_path"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
Project represents a project configuration
type RelationType ¶
type RelationType string
RelationType represents the type of relationship between nodes
const ( RelationContains RelationType = "CONTAINS" RelationDefines RelationType = "DEFINES" RelationCalls RelationType = "CALLS" RelationImplements RelationType = "IMPLEMENTS" RelationEmbeds RelationType = "EMBEDS" RelationImports RelationType = "IMPORTS" RelationBelongsTo RelationType = "BELONGS_TO" RelationReferences RelationType = "REFERENCES" RelationDependsOn RelationType = "DEPENDS_ON" )
type Relationship ¶
type Relationship struct {
ID ID `json:"id"`
Type RelationType `json:"type"`
FromNodeID ID `json:"from_node_id"`
ToNodeID ID `json:"to_node_id"`
Properties map[string]any `json:"properties,omitempty"`
CreatedAt time.Time `json:"created_at"`
}
Relationship represents a relationship between nodes
Click to show internal directories.
Click to hide internal directories.