Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureProjectID ¶ added in v0.0.7
EnsureProjectID returns the provided project ID if it's not empty, otherwise loads it from the config. This is useful for maintaining backward compatibility where project_id can be explicitly provided or auto-derived from the configuration file.
func FindConfigFile ¶ added in v0.0.7
FindConfigFile searches for a gograph configuration file starting from the given path and traversing up the directory tree. It looks for both "gograph.yaml" (new format) and ".gograph.yaml" (legacy format).
func GetProjectIDFromPath ¶ added in v0.0.7
GetProjectIDFromPath loads the configuration from the given path and returns the project ID. It searches for config files starting from the given path and traversing up the directory tree.
Types ¶
type AnalysisConfig ¶
type AnalysisConfig struct {
IgnoreDirs []string `mapstructure:"ignore_dirs"`
IgnoreFiles []string `mapstructure:"ignore_files"`
IncludeTests bool `mapstructure:"include_tests"`
IncludeVendor bool `mapstructure:"include_vendor"`
MaxConcurrency int `mapstructure:"max_concurrency"`
}
AnalysisConfig represents analysis configuration
type Config ¶
type Config struct {
Project ProjectConfig `mapstructure:"project"`
Neo4j Neo4jConfig `mapstructure:"neo4j"`
Analysis AnalysisConfig `mapstructure:"analysis"`
}
Config represents the application configuration
func LoadProjectConfig ¶ added in v0.0.7
LoadProjectConfig loads configuration from a project path by searching for config files
type Neo4jConfig ¶
type Neo4jConfig struct {
URI string `mapstructure:"uri"`
Username string `mapstructure:"username"`
Password string `mapstructure:"password"`
Database string `mapstructure:"database"`
}
Neo4jConfig represents Neo4j connection configuration
type ProjectConfig ¶
type ProjectConfig struct {
ID string `mapstructure:"id"`
Name string `mapstructure:"name"`
RootPath string `mapstructure:"root_path"`
}
ProjectConfig represents project-specific configuration