working commit

This commit is contained in:
2026-01-26 18:36:30 +02:00
parent 15e4e893b1
commit 6db319088e
19 changed files with 621 additions and 95 deletions
+14 -6
View File
@@ -1,7 +1,17 @@
package config
type Config struct {
Service Service `json:"service" yaml:"service"`
Service Service `json:"service" yaml:"service"`
Database Database `json:"database" yaml:"database"`
}
type Service struct {
Address string `json:"address" yaml:"address"`
Port int64 `json:"port" yaml:"port"`
}
type Database struct {
Basepath string `json:"basepath" yaml:"basepath"`
}
func NewConfig() (*Config, error) {
@@ -11,10 +21,8 @@ func NewConfig() (*Config, error) {
Address: "0.0.0.0",
Port: 1025,
},
Database: Database{
Basepath: datadir,
},
}, err
}
type Service struct {
Address string `json:"address" yaml:"address"`
Port int64 `json:"port" yaml:"port"`
}