config

package
v0.0.0-...-dfaed72 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2022 License: BSD-2-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Duration  time.Duration     `yaml:"duration" default:"168h" `
	LogFile   []LogFile         `yaml:"log_file"`
	Env       map[string]string `yaml:"env"`
	Filter    Filter            `yaml:"filter"`
	Whitelist []net.IPNet       `yaml:"whitelist"`
}

func Load

func Load() Config

type Filter

type Filter struct {
	IPTables *IPTables `yaml:"iptables,omitempty"`
	IPSet    *IPSet    `yaml:"ipset,omitempty"`
}

type IPSet

type IPSet struct {
	Set string `yaml:"set"`
}

type IPTables

type IPTables struct {
	Chain string `yaml:"chain"`
}

type LogFile

type LogFile struct {
	FileName string        `yaml:"file_name"`
	Rule     []Rule        `yaml:"rule"`
	Duration time.Duration `yaml:"duration"`
}

type Rule

type Rule struct {
	Name     string        `yaml:"name"`
	Re       []string      `yaml:"re"`
	Duration time.Duration `yaml:"duration"`
}

Jump to

Keyboard shortcuts

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