From 484734ab36b06a9e6d35348e357312d99522302c Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Wed, 23 Dec 2020 12:01:05 +0100 Subject: Implemented the configuration file format --- config/app.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 config/app.go (limited to 'config/app.go') diff --git a/config/app.go b/config/app.go new file mode 100644 index 0000000..541699c --- /dev/null +++ b/config/app.go @@ -0,0 +1,17 @@ +package config + +// App struct contains the configuration for this application +type App struct { + // WorkingDirectory is the program working directory where the user data, save files and scores are stored + WorkingDirectory string `yaml:"WorkingDirectory"` + // MaxUsers is the maximum amount of registered users to allow + MaxUsers int `yaml:"MaxUsers"` + // AllowRegistration allows registration of new users + AllowRegistration bool `yaml:"AllowRegistration"` + // MaxNickLen Maximum length for a nickname + MaxNickLen int `yaml:"MaxNickLen"` + // MenuMaxIdleTime is the maximum number of seconds a user can be idle on the menu before the program exits + MenuMaxIdleTime int `yaml:"MenuMaxIdleTime"` + // PostLoginCommands is the list of commands to execute upon login, like creating save directories for games + PostLoginCommands []string `yaml:"PostLoginCommands"` +} -- cgit v1.2.3