aboutsummaryrefslogtreecommitdiff
path: root/config/app.go
diff options
context:
space:
mode:
authorJulien Dessaux2020-12-23 12:01:05 +0100
committerJulien Dessaux2020-12-23 12:01:05 +0100
commit484734ab36b06a9e6d35348e357312d99522302c (patch)
treecb8e57bd56316b1a111ab7a3f13444344deeca2f /config/app.go
parentInitial import (diff)
downloadshell-game-launcher-484734ab36b06a9e6d35348e357312d99522302c.tar.gz
shell-game-launcher-484734ab36b06a9e6d35348e357312d99522302c.tar.bz2
shell-game-launcher-484734ab36b06a9e6d35348e357312d99522302c.zip
Implemented the configuration file format
Diffstat (limited to 'config/app.go')
-rw-r--r--config/app.go17
1 files changed, 17 insertions, 0 deletions
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"`
+}