Combine New/Setup functions
This commit is contained in:
committed by
=Michael Hohn
parent
f611f02d1c
commit
cd0647836e
@@ -32,13 +32,7 @@ func (s *StorageContainer) FindAvailableDBs(analysisReposRequested []common.Owne
|
||||
return notFoundRepos, analysisRepos
|
||||
}
|
||||
|
||||
func (s *StorageContainer) Setup(v *Visibles) {
|
||||
// TODO XX: set up qldb_db
|
||||
s.modules = v
|
||||
|
||||
}
|
||||
|
||||
func NewQLDBStore(startingID int) (*StorageContainer, error) {
|
||||
func NewQLDBStore(startingID int, v *Visibles) (*StorageContainer, error) {
|
||||
// TODO drop the startingID
|
||||
db, err := ConnectDB(DBSpec{
|
||||
Host: "postgres",
|
||||
@@ -61,10 +55,13 @@ func NewQLDBStore(startingID int) (*StorageContainer, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// TODO XX: set up qldb_db
|
||||
s.modules = v
|
||||
|
||||
return &s, nil
|
||||
}
|
||||
|
||||
func NewServerStore(startingID int) (*StorageContainer, error) {
|
||||
func NewServerStore(startingID int, v *Visibles) (*StorageContainer, error) {
|
||||
db, err := ConnectDB(DBSpec{
|
||||
Host: "postgres",
|
||||
Port: 5432,
|
||||
@@ -85,6 +82,9 @@ func NewServerStore(startingID int) (*StorageContainer, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// TODO XX: set up qldb_db
|
||||
s.modules = v
|
||||
|
||||
return &s, nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user