csconfig

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2020 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CrowdSec

type CrowdSec struct {
	WorkingFolder   string    `yaml:"working_dir,omitempty"`
	DataFolder      string    `yaml:"data_dir,omitempty"`
	ConfigFolder    string    `yaml:"config_dir,omitempty"`
	AcquisitionFile string    `yaml:"acquis_path,omitempty"`
	SingleFile      string    //for forensic mode
	SingleFileLabel string    //for forensic mode
	PIDFolder       string    `yaml:"pid_dir,omitempty"`
	LogFolder       string    `yaml:"log_dir,omitempty"`
	LogMode         string    `yaml:"log_mode,omitempty"`    //like file, syslog or stdout ?
	LogLevel        log.Level `yaml:"log_level,omitempty"`   //trace,debug,info,warning,error
	Daemonize       bool      `yaml:"daemon,omitempty"`      //true -> go background
	Profiling       bool      `yaml:"profiling,omitempty"`   //true -> enable runtime profiling
	SQLiteFile      string    `yaml:"sqlite_path,omitempty"` //path to sqlite output
	APIMode         bool      `yaml:"apimode,omitempty"`     //true -> enable api push
	CsCliFolder     string    `yaml:"cscli_dir"`             //cscli folder
	Linter          bool
	Prometheus      bool
	HTTPListen      string `yaml:"http_listen,omitempty"`
	ValidatorMode   string /*if present points to a specific config (for tests)*/
	RestoreMode     string
	DumpBuckets     bool
	OutputConfig    *outputs.OutputFactory `yaml:"plugin"`
}

CrowdSec is the structure of the crowdsec configuration

func NewCrowdSecConfig

func NewCrowdSecConfig() *CrowdSec

NewCrowdSecConfig create a new crowdsec configuration with default configuration

func (*CrowdSec) GetCliConfig

func (c *CrowdSec) GetCliConfig(configFile *string) error

func (*CrowdSec) GetOPT

func (c *CrowdSec) GetOPT() error

GetOPT return flags parsed from command line

Jump to

Keyboard shortcuts

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