Add database driver and config module

Signed-off-by: Asai Neko <sugar@sne.moe>
This commit is contained in:
2025-12-19 17:38:51 +08:00
parent e2345a8d4a
commit dc128c0392
11 changed files with 196 additions and 7 deletions

20
config/types.go Normal file
View File

@@ -0,0 +1,20 @@
package config
type config struct {
Server server `yaml:"server"`
Database database `yaml:"database"`
}
type server struct {
Address string `yaml:"address"`
DebugMode bool `yaml:"debug_mode"`
FileLogger bool `yaml:"file_logger"`
}
type database struct {
Type string `yaml:"type"`
Host string `yaml:"host"`
Name string `yaml:"name"`
Username string `yaml:"username"`
Password string `yaml:"password"`
}