utils

package
v0.0.0-...-6840375 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AssignedMemory float32

Functions

func DoPost

func DoPost(url, contentType string, body io.Reader) ([]byte, error)

func Download

func Download(url, file string) error

func FreeMemory

func FreeMemory() uint64

func ReadCSV

func ReadCSV(url string) [][]string

func ReadYaml

func ReadYaml(url string, result interface{})

func Status

func Status()

func TotalMemory

func TotalMemory() uint64

func UsedByEngineMemory

func UsedByEngineMemory() uint64

Types

type Config

type Config struct {
	RulesFolder   string `yaml:"rulesFolder"`
	GeoIPFolder   string `yaml:"geoipFolder"`
	Elasticsearch string `yaml:"elasticsearch"`
	PostgreSQL    struct {
		Server   string `yaml:"server"`
		Port     string `yaml:"port"`
		User     string `yaml:"user"`
		Password string `yaml:"password"`
		Database string `yaml:"database"`
	} `yaml:"postgresql"`
	ErrorLevel            string `yaml:"errorLevel"`
	UseCache              string `yaml:"useCache"`
	UseSystemRules        string `yaml:"useSystemRules"`
	AppendCompletedAlerts string `yaml:"appendCompletedAlerts"`
}

func GetConfig

func GetConfig() Config

Jump to

Keyboard shortcuts

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