config

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2025 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version string

Functions

func LoadAll

func LoadAll(envFile string)

LoadAllConfigs set various configs

func LoadApp

func LoadApp()

loads App configuration

func LoadDBCfg

func LoadDBCfg()

LoadDBCfg loads DB configuration

Types

type App

type App struct {
	// general config
	LogLevel string

	// configuration for server
	URL    string // URL where user can access the web UI, don't put trailing slash
	Secret string // random 64-character hex string that give us 32 random bytes

	// fiber specific config
	Prefork     bool
	Host        string
	Port        int
	ProxyHeader string
	AllowOrigin string

	// configuration for prober (client)
	ServerEndpoint string
	APIKey         string
	AcceptTor      bool
	TorSOCKS       string
	AcceptI2P      bool
	I2PSOCKS       string
	IPv6Capable    bool
}

func AppCfg

func AppCfg() *App

type DB

type DB struct {
	Host     string
	Port     int
	Name     string
	User     string
	Password string
}

DB holds the DB configuration

func DBCfg

func DBCfg() *DB

DBCfg returns the default DB configuration

Jump to

Keyboard shortcuts

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