config

package
v2.8.9 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2026 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package config provides configuration management utilities for the 3x-ui panel, including version information, logging levels, database paths, and environment variable handling.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBinFolderPath

func GetBinFolderPath() string

GetBinFolderPath returns the path to the binary folder, defaulting to "bin" if not set via XUI_BIN_FOLDER.

func GetDBFolderPath

func GetDBFolderPath() string

GetDBFolderPath returns the path to the database folder based on environment variables or platform defaults.

func GetDBPath

func GetDBPath() string

GetDBPath returns the full path to the database file.

func GetLogFolder

func GetLogFolder() string

GetLogFolder returns the path to the log folder based on environment variables or platform defaults.

func GetName

func GetName() string

GetName returns the name of the 3x-ui application.

func GetVersion

func GetVersion() string

GetVersion returns the version string of the 3x-ui application.

func IsDebug

func IsDebug() bool

IsDebug returns true if debug mode is enabled via the XUI_DEBUG environment variable.

Types

type LogLevel

type LogLevel string

LogLevel represents the logging level for the application.

const (
	Debug   LogLevel = "debug"
	Info    LogLevel = "info"
	Notice  LogLevel = "notice"
	Warning LogLevel = "warning"
	Error   LogLevel = "error"
)

Logging level constants

func GetLogLevel

func GetLogLevel() LogLevel

GetLogLevel returns the current logging level based on environment variables or defaults to Info.

Jump to

Keyboard shortcuts

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