Comment, list all saves, set port, set hash

This commit is contained in:
Aurélie Delhaie
2022-05-24 23:49:47 +02:00
parent e3c2068ae9
commit 87957cb2d5
6 changed files with 100 additions and 74 deletions

View File

@@ -8,6 +8,7 @@ import (
)
type Configuration struct {
Server ServerConfiguration `yaml:"server"`
Database DatabaseConfiguration `yaml:"database"`
Features FeaturesConfiguration `yaml:"features"`
Path PathConfiguration `yaml:"path"`
@@ -18,6 +19,10 @@ type PathConfiguration struct {
Storage string `yaml:"storage"`
}
type ServerConfiguration struct {
Port int `yaml:"port"`
}
type DatabaseConfiguration struct {
Host string `yaml:"host"`
Port int `yaml:"port"`
@@ -55,3 +60,7 @@ func Features() *FeaturesConfiguration {
func Path() *PathConfiguration {
return &currentConfig.Path
}
func Server() *ServerConfiguration {
return &currentConfig.Server
}