config

package
v0.1.3-alpha Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2026 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// General settings
	Mode        string `toml:"mode"`         // interactive, strict, log
	MinSeverity string `toml:"min_severity"` // low, medium, high, critical
	Offline     bool   `toml:"offline"`

	// Auto-scan settings
	AutoScan struct {
		Enabled    bool     `toml:"enabled"`
		Ecosystems []string `toml:"ecosystems"` // node, python, rust, go, ruby
	} `toml:"auto_scan"`

	// Docker settings
	Docker struct {
		Enabled bool   `toml:"enabled"`
		Image   string `toml:"image"`
		Timeout int    `toml:"timeout"` // seconds
	} `toml:"docker"`

	// ClamAV settings
	ClamAV struct {
		Enabled bool   `toml:"enabled"`
		Socket  string `toml:"socket"`
	} `toml:"clamav"`

	// YARA settings
	YARA struct {
		Enabled     bool     `toml:"enabled"`
		RulesPath   string   `toml:"rules_path"`
		CustomRules []string `toml:"custom_rules"`
	} `toml:"yara"`

	// Cache settings
	Cache struct {
		Enabled bool `toml:"enabled"`
		TTL     int  `toml:"ttl"` // hours
	} `toml:"cache"`

	// Output settings
	Output struct {
		Format    string `toml:"format"` // table, json, minimal
		ShowClean bool   `toml:"show_clean"`
		Verbose   bool   `toml:"verbose"`
	} `toml:"output"`
}

Config represents SecChain configuration

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager handles configuration operations

func NewManager

func NewManager() (*Manager, error)

NewManager creates a new configuration manager

func (*Manager) Get

func (m *Manager) Get() *Config

Get returns the current configuration

func (*Manager) Reset

func (m *Manager) Reset() error

Reset resets configuration to defaults

func (*Manager) Set

func (m *Manager) Set(key, value string) error

Set updates a configuration value

func (*Manager) Show

func (m *Manager) Show() map[string]interface{}

Show displays the current configuration

func (*Manager) Validate

func (m *Manager) Validate() error

Validate validates the current configuration

Jump to

Keyboard shortcuts

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