First batch

This commit is contained in:
pb
2024-07-16 10:56:36 +02:00
parent 5ba33d3131
commit 034a81cedb
19 changed files with 540 additions and 30 deletions

26
conf.go Normal file
View File

@@ -0,0 +1,26 @@
package oclib
import "sync"
// ===================================================
// This class has to be updated everytime
// a new configuration variable is defined
// in a componant that imports oc-lib
// ===================================================
type Config struct {
MongoURL string
DCNAME string
DBPOINT string
}
var instance *Config
var once sync.Once
func GetConfig() *Config {
once.Do(func() {
instance = &Config{}
})
return instance
}