config

package
v0.0.0-...-3fdd853 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2022 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OverrideViaENV

func OverrideViaENV(c *Configuration)

OverrideViaENV overrides configuration settings with environment variables, if they are set.

Uses a defined lookup table to identify and get environment variables to override.

func Save

func Save(c *Configuration) error

Save the Configuration in its current state into the stored file path

Types

type Certificate

type Certificate struct {
	DefaultKeyFile  string // Path to the default location of the private Key
	DefaultCertFile string // Path to the default location of the private Cert
}

type Configuration

type Configuration struct {
	Context            string
	Certificate        Certificate
	Connection         Connection
	ScannerPreferences ScannerPreferences
	Preferences        Preferences
	Feedservice        Feedservice
	Director           Director
	// contains filtered or unexported fields
}

func New

func New(path string, module string) (*Configuration, error)

Looks for the configuration file and returns a filled Configuration struct

type Connection

type Connection struct {
	Server        string // The server to connect to
	QOS           byte   // Setting the default QOS for most cases it should be 1
	CleanStart    bool   // When set to true the broker will not store session information
	SessionExpiry uint64 // How long a session will be stored; when 0 and CleanStart false it will be one day
	Timeout       int64
	Username      string // Username for authentication
	Password      string // Password used with Username for authentication
}

type Director

type Director struct {
	Id          string // The Id (a uuid) of this director
	StoragePath string // The path to store the json into
	KeyFile     string // The path to the private RSA key used to crypt json
	VTSensor    string // Sensor used to send get vt messages
}

type Feedservice

type Feedservice struct {
	RedisDbAddress string
}

type Preferences

type Preferences struct {
	LogLevel string // Loglevel (Debug, Info ...)
	LogFile  string // Path to logfile
}

type ScannerPreferences

type ScannerPreferences struct {
	ScanInfoStoreTime   int64  // Time (h) before a scan is considere forgotten
	MaxScan             int64  // Maxi number of parallel scans
	MaxQueuedScans      int64  // Maxi number of scans that can be queued
	Niceness            int64  // Niceness of the openvas Process
	MinFreeMemScanQueue uint64 // Min Memory necessary for a Scan to start

}

Jump to

Keyboard shortcuts

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