config

package
v0.0.0-...-07b4fab Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(file string) error

Types

type Abuseipdb

type Abuseipdb struct {
	Enabled  bool          `yaml:"enabled"`
	Key      string        `yaml:"key"`
	Interval time.Duration `yaml:"interval"`
}

func (Abuseipdb) Validate

func (a Abuseipdb) Validate() error

type Config

type Config struct {
	Log       Log       `yaml:"log"`
	Ssh       Ssh       `yaml:"ssh"`
	Http      Http      `yaml:"http"`
	Ftp       Ftp       `yaml:"ftp"`
	Database  Database  `yaml:"database"`
	Dashboard Dashboard `yaml:"dashboard"`
	Abuseipdb Abuseipdb `yaml:"abuseipdb"`
}

func Load

func Load(file string, generate bool) (*Config, error)

func (*Config) Validate

func (c *Config) Validate() error

type Dashboard

type Dashboard struct {
	Enabled  bool   `yaml:"enabled"`
	Username string `yaml:"username"`
	Password string `yaml:"password"`
}

func (Dashboard) Validate

func (d Dashboard) Validate() error

type Database

type Database struct {
	Driver string `yaml:"driver"`
	Dsn    string `yaml:"dsn"`
}

func (Database) Validate

func (d Database) Validate() error

type Ftp

type Ftp struct {
	Enabled bool   `yaml:"enabled"`
	Address string `yaml:"address"`
}

func (Ftp) Validate

func (f Ftp) Validate() error

type Http

type Http struct {
	Enabled bool   `yaml:"enabled"`
	Address string `yaml:"address"`
}

func (Http) Validate

func (h Http) Validate() error

type Log

type Log struct {
	Level string `yaml:"level"`
}

func (Log) Validate

func (l Log) Validate() error

type Ssh

type Ssh struct {
	Address string        `yaml:"address"`
	Delay   time.Duration `yaml:"delay"`
	KeySeed string        `yaml:"key_seed"`
}

func (Ssh) Validate

func (s Ssh) Validate() error

Jump to

Keyboard shortcuts

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