config

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2024 License: Apache-2.0 Imports: 2 Imported by: 4

Documentation

Index

Constants

View Source
const (
	CompiledRuleFileName = "compiled"
	TempDirName          = "tmp"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	LogLevel                  string       `mapstructure:"log_level"`
	EnableJSONLog             bool         `mapstructure:"enable_json_log"`
	RuleSources               []RuleSource `mapstructure:"rule_sources"`
	YaracPath                 string       `mapstructure:"yarac_path"`
	RuleUpdateSchedule        string       `mapstructure:"rule_update_schedule"`
	ServerAddress             string       `mapstructure:"server_address"`
	HealthCheckAddressAddress string       `mapstructure:"health_check_address"`
	CacheDir                  string       `mapstructure:"cache_dir"`
}

func LoadConfig

func LoadConfig(cfgFile string) *Config

type RuleSource

type RuleSource struct {
	Name         string `mapstructure:"name"`
	URL          string `mapstructure:"url"`
	ExcludeRegex string `mapstructure:"exclude_regex"`
}

Jump to

Keyboard shortcuts

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