config

package
v1.0.0-alpha Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2017 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var VERSION = "undefined"

Functions

This section is empty.

Types

type BeaconCfg

type BeaconCfg struct {
	DefaultConnectionThresh int    `yaml:"DefaultConnectionThresh"`
	BeaconTable             string `yaml:"BeaconTable"`
}

type BlacklistedCfg

type BlacklistedCfg struct {
	ThreadCount       int    `yaml:"ThreadCount"`
	ChannelSize       int    `yaml:"ChannelSize"`
	BlacklistTable    string `yaml:"BlackListTable"`
	BlacklistDatabase string `yaml:"Database"`
}

type BroCfg

type BroCfg struct {
	LogPath         string            `yaml:"LogPath"`
	DBPrefix        string            `yaml:"DBPrefix"`
	MetaDB          string            `yaml:"MetaDB"`
	DirectoryMap    map[string]string `yaml:"DirectoryMap"`
	DefaultDatabase string            `yaml:"DefaultDatabase"`
	UseDates        bool              `yaml:"UseDates"`
}

type CrossrefCfg

type CrossrefCfg struct {
	InternalTable   string  `yaml:"InternalTable"`
	ExternalTable   string  `yaml:"ExternalTable"`
	BeaconThreshold float64 `yaml:"BeaconThreshold"`
}

type SafeBrowsingCfg

type SafeBrowsingCfg struct {
	APIKey   string `yaml:"APIKey"`
	Database string `yaml:"Database"`
}

type ScanningCfg

type ScanningCfg struct {
	ScanThreshold int    `yaml:"ScanThreshold"`
	ScanTable     string `yaml:"ScanTable"`
}

type StructureCfg

type StructureCfg struct {
	ConnTable       string `yaml:"ConnectionTable"`
	HttpTable       string `yaml:"HttpTable"`
	DnsTable        string `yaml:"DnsTable"`
	UniqueConnTable string `yaml:"UniqueConnectionTable"`
	HostTable       string `yaml:"HostTable"`
}

type SystemConfig

type SystemConfig struct {
	LogType           string          `yaml:"LogType"`
	GNUNetcatPath     string          `yaml:"GNUNetcatPath"`
	BatchSize         int             `yaml:"BatchSize"`
	DatabaseHost      string          `yaml:"DatabaseHost"`
	LogLevel          int             `yaml:"LogLevel"`
	Prefetch          float64         `yaml:"Prefetch"`
	Whitelist         []string        `yaml:"WhiteList"`
	ImportWhitelist   bool            `yaml:"ImportWhitelist"`
	BlacklistedConfig BlacklistedCfg  `yaml:"BlackListed"`
	CrossrefConfig    CrossrefCfg     `yaml:"Crossref"`
	ScanningConfig    ScanningCfg     `yaml:"Scanning"`
	StructureConfig   StructureCfg    `yaml:"Structure"`
	BeaconConfig      BeaconCfg       `yaml:"Beacon"`
	UrlsConfig        UrlsCfg         `yaml:"Urls"`
	UserAgentConfig   UserAgentCfg    `yaml:"UserAgent"`
	BroConfig         BroCfg          `yaml:"Bro"`
	SafeBrowsing      SafeBrowsingCfg `yaml:"SafeBrowsing"`
	Version           string
}

func GetConfig

func GetConfig(cfgPath string) (*SystemConfig, bool)

GetConfig retrieves a configuration in order of precedence

type UrlsCfg

type UrlsCfg struct {
	UrlsTable      string `yaml:"UrlsTable"`
	HostnamesTable string `yaml:"HostnamesTable"`
}

type UserAgentCfg

type UserAgentCfg struct {
	UserAgentTable string `yaml:"UserAgentTable"`
}

Jump to

Keyboard shortcuts

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