config

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Save

func Save(cfg *Config, configPath string) error

Save saves the configuration to a file

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 DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns the default configuration

func Load

func Load(configPath string) (*Config, error)

Load loads configuration from a file

func (*Config) ToProject

func (c *Config) ToProject(configPath string) *core.Project

ToProject converts the config to a core.Project

func (*Config) Validate added in v0.0.3

func (c *Config) Validate() error

Validate ensures the configuration is valid

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL