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"`
}
+9
View File
@@ -0,0 +1,9 @@
package config
const (
confdir = "/home/ziggi/Projects/mstore/etc/mstore"
rundir = "/home/ziggi/Projects/mstore/tmp/run"
logdir = "/home/ziggi/Projects/mstore/tmp/log"
datadir = "/home/ziggi/Projects/mstore/tmp/data"
version = "0.1.0"
)
+9
View File
@@ -0,0 +1,9 @@
package config
const (
confdir = "@srv_confdir@"
rundir = "@srv_rundir@"
logdir = "@srv_logdir@"
datadir = "@srv_datadir@"
version = "@PACKAGE_VERSION@"
)