config

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AbuseIPConfig

type AbuseIPConfig struct {
	APIKey string `yaml:"api_key"`
}

type Configuration

type Configuration struct {
	Notifications NotificationConfig `yaml:"notifications"`
	Unifi         []UnifiConfig      `yaml:"unifi"`
	AbuseIP       AbuseIPConfig      `yaml:"abuseip"`
	RateLimit     RateLimitConfig    `yaml:"ratelimit,omitempty"`
	Database      DatabaseConfig     `yaml:"database,omitempty"`
	Payload       PayloadConfig      `yaml:"payload,omitempty"`
	Dashboard     DashboardConfig    `yaml:"dashboard,omitempty"`
	ExcludedIPs   []string           `yaml:"excluded_ips,omitempty"`
}

func LoadConfiguration

func LoadConfiguration(path string) (*Configuration, error)

type DashboardConfig

type DashboardConfig struct {
	Enabled bool   `yaml:"enabled"`
	Port    string `yaml:"port"`
}

type DatabaseConfig

type DatabaseConfig struct {
	Path string `yaml:"path"`
}

type NotificationConfig

type NotificationConfig struct {
	TelegramNotification []TelegramNotificationConfig `yaml:"telegram"`
}

type PayloadConfig

type PayloadConfig struct {
	Enabled   bool   `yaml:"enabled"`
	MaxSize   int    `yaml:"max_size"`
	Directory string `yaml:"directory"`
}

type RateLimitConfig

type RateLimitConfig struct {
	RequestsPerMinute int  `yaml:"requests_per_minute"`
	Enabled           bool `yaml:"enabled"`
}

type TelegramNotificationConfig

type TelegramNotificationConfig struct {
	ChatId   string `yaml:"chat_id"`
	Token    string `yaml:"token"`
	Template string `yaml:"template,omitempty"`
}

type UnifiConfig

type UnifiConfig struct {
	URL      string `yaml:"url"`
	Username string `yaml:"username"`
	Password string `yaml:"password"`
}

Jump to

Keyboard shortcuts

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