config

package
v0.0.0-...-f153f5b Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2024 License: Unlicense Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func InitLogger

func InitLogger(cfg *Config) error

Types

type Config

type Config struct {
	Server      string            `json:"server"`
	Logging     ConfigLogging     `json:"logging"`
	Notifiers   ConfigNotifiers   `json:"notifiers"`
	Middlewares ConfigMiddlewares `json:"middlewares"`
	Filters     ConfigFilters     `json:"filters"`
}

func LoadConfig

func LoadConfig() (*Config, error)

type ConfigFilters

type ConfigFilters struct {
	IPFilter ConfigFiltersIPFilter `json:"ipfilters"`
}

type ConfigFiltersIPFilter

type ConfigFiltersIPFilter struct {
	Enabled bool     `json:"enabled"`
	Cidrs   []string `json:"cidrs"`
}

type ConfigLogging

type ConfigLogging struct {
	Level string `json:"level"`
	File  string `json:"file"`
}

type ConfigMiddlewares

type ConfigMiddlewares struct {
	GeoIP ConfigMiddlewaresGeoIP `json:"geoip"`
}

type ConfigMiddlewaresGeoIP

type ConfigMiddlewaresGeoIP struct {
	Enabled bool `json:"enabled" default:"false"`
}

type ConfigNotifierDiscord

type ConfigNotifierDiscord struct {
	Webhook string `json:"webhook"`
}

type ConfigNotifierTelegram

type ConfigNotifierTelegram struct {
	ChatId string `json:"chatid"`
	Token  string `json:"token"`
}

type ConfigNotifiers

type ConfigNotifiers struct {
	Discord  []ConfigNotifierDiscord  `json:"discord"`
	Telegram []ConfigNotifierTelegram `json:"telegram"`
}

type UserData

type UserData struct {
	Server   string
	Username string
	Service  string
	Rhost    string
}

Jump to

Keyboard shortcuts

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