Add database driver and config module
Signed-off-by: Asai Neko <sugar@sne.moe>
This commit is contained in:
20
config/types.go
Normal file
20
config/types.go
Normal 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"`
|
||||
}
|
||||
Reference in New Issue
Block a user