Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DefaultProd is the default mode. DefaultProd = false // DefaultHost is the default host to listen on. DefaultHost = "localhost" // DefaultPort is the default port to listen on. DefaultPort = "1812" // DefaultDatabaseFilePath is the default file path to the database definition file. DefaultDatabaseFilePath = "database.yaml" // DefaultVerbose is the default verbosity level. DefaultVerbose = VerboseLevelInfo // DefaultQuiet is the default quiet mode. DefaultQuiet = false )
Variables ¶
View Source
var ErrInvalidConfig = errors.New("invalid config")
ErrInvalidConfig is returned when the config is invalid.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Prod is a flag that indicates if the server is running in production mode. Prod bool // Debug defines whether or not the server should run in debug mode. Debug bool // Host is the host to listen on. Host string // Port is the port to listen on. Port string // DatabaseFilePath is the path to the database definition file. DatabaseFilePath string // RadiusSecret is the secret used to authenticate RADIUS requests. RadiusSecret string // Verbose defines the verbosity level. Verbose VerboseLevel `json:"verbose"` // Quiet defines whether or not the server should be quiet. Quiet bool // TelegramBotToken is the token used to authenticate with the Telegram bot API. TelegramBotToken string // TelegramChatIDs is a list of chat IDs that are allowed to interact with the bot. TelegramChatIDs []string }
type VerboseLevel ¶
type VerboseLevel int
const ( VerboseLevelQuiet VerboseLevel = iota - 1 VerboseLevelInfo VerboseLevelAccessLogs VerboseLevelDebug )
Click to show internal directories.
Click to hide internal directories.