Bladeren bron

database

- fix cycle bug
Alexey Kim 1 jaar geleden
bovenliggende
commit
ed64f4faf9
3 gewijzigde bestanden met toevoegingen van 12 en 16 verwijderingen
  1. 1 2
      config/config.go
  2. 11 0
      config/database.go
  3. 0 14
      database/interface/config.go

+ 1 - 2
config/config.go

@@ -2,7 +2,6 @@ package config
 
 import (
 	"fmt"
-	_interface "git.beejay.kim/Craft/Api/database/interface"
 	"time"
 )
 
@@ -10,7 +9,7 @@ type Configuration struct {
 	Timeout int    `yaml:"timeout"`
 	Issuer  string `yaml:"issuer"`
 
-	Database _interface.Databases `yaml:"database"`
+	Database Databases `yaml:"database"`
 }
 
 func (c Configuration) Invalidate() error {

+ 11 - 0
config/database.go

@@ -0,0 +1,11 @@
+package config
+
+import "git.beejay.kim/Craft/Api/database/clickhouse"
+
+type Databases struct {
+	Clickhouse *clickhouse.Config `json:"clickhouse" yaml:"clickhouse"`
+}
+
+func (db *Databases) Invalidate() error {
+	return Invalidate(db)
+}

+ 0 - 14
database/interface/config.go

@@ -1,14 +0,0 @@
-package _interface
-
-import (
-	"git.beejay.kim/Craft/Api/config"
-	"git.beejay.kim/Craft/Api/database/clickhouse"
-)
-
-type Databases struct {
-	Clickhouse *clickhouse.Config `json:"clickhouse" yaml:"clickhouse"`
-}
-
-func (db *Databases) Invalidate() error {
-	return config.Invalidate(db)
-}