chore: reorganizing code
Signed-off-by: SoXX <soxx@fenpa.ws>
This commit is contained in:
parent
0d5274eb27
commit
c1df01d113
@ -1,8 +1,9 @@
|
|||||||
package database
|
package graph
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"git.dragse.it/anthrove/otter-space-sdk/internal/graph"
|
"git.dragse.it/anthrove/otter-space-sdk/internal/graph"
|
||||||
|
"git.dragse.it/anthrove/otter-space-sdk/pkg/database"
|
||||||
|
|
||||||
"git.dragse.it/anthrove/otter-space-sdk/pkg/models"
|
"git.dragse.it/anthrove/otter-space-sdk/pkg/models"
|
||||||
"github.com/neo4j/neo4j-go-driver/v5/neo4j"
|
"github.com/neo4j/neo4j-go-driver/v5/neo4j"
|
||||||
@ -14,7 +15,7 @@ type graphConnection struct {
|
|||||||
graphDebug bool
|
graphDebug bool
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewGraphConnection(graphDebug bool) OtterSpace {
|
func NewGraphConnection(graphDebug bool) database.OtterSpace {
|
||||||
return &graphConnection{
|
return &graphConnection{
|
||||||
driver: nil,
|
driver: nil,
|
||||||
graphDebug: graphDebug,
|
graphDebug: graphDebug,
|
@ -1,8 +1,9 @@
|
|||||||
package database
|
package postgres
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"git.dragse.it/anthrove/otter-space-sdk/pkg/database"
|
||||||
"git.dragse.it/anthrove/otter-space-sdk/pkg/models"
|
"git.dragse.it/anthrove/otter-space-sdk/pkg/models"
|
||||||
"gorm.io/driver/postgres"
|
"gorm.io/driver/postgres"
|
||||||
"gorm.io/gorm"
|
"gorm.io/gorm"
|
||||||
@ -12,7 +13,7 @@ type postgresqlConnection struct {
|
|||||||
db *gorm.DB
|
db *gorm.DB
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewPostgresqlConnection() OtterSpace {
|
func NewPostgresqlConnection() database.OtterSpace {
|
||||||
return &postgresqlConnection{
|
return &postgresqlConnection{
|
||||||
db: nil,
|
db: nil,
|
||||||
}
|
}
|
Reference in New Issue
Block a user