rough skeleton and basic user authentication
This commit is contained in:
24
db/main.go
Normal file
24
db/main.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package db
|
||||
|
||||
import (
|
||||
"zomo.dev/largehadroncollider/db/db_cold"
|
||||
"zomo.dev/largehadroncollider/db/db_hot"
|
||||
"zomo.dev/largehadroncollider/util"
|
||||
)
|
||||
|
||||
func InitDBConn(conf *util.Config) (*DBConn, error) {
|
||||
hot, err := db_hot.InitDBHotConn()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
cold, err := db_cold.InitDBColdConn()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &DBConn{ hot, cold }, nil
|
||||
}
|
||||
|
||||
type DBConn struct {
|
||||
hot db_hot.DBHotConn
|
||||
cold db_cold.DBColdConn
|
||||
}
|
||||
Reference in New Issue
Block a user