wip
This commit is contained in:
parent
130dfb682a
commit
ca9dbcd1f2
@ -3,6 +3,7 @@ package storage
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"sync"
|
||||
|
||||
"git.espin.casa/albert/cml04-falcon-system/internal/types"
|
||||
"gorm.io/driver/postgres"
|
||||
@ -17,7 +18,8 @@ type Storager interface {
|
||||
}
|
||||
|
||||
type storage struct {
|
||||
db *gorm.DB
|
||||
db *gorm.DB
|
||||
mux sync.RWMutex
|
||||
}
|
||||
|
||||
type DBConfig struct {
|
||||
@ -88,6 +90,7 @@ func New(conf *DBConfig) (Storager, error) {
|
||||
}
|
||||
// done
|
||||
return &storage{
|
||||
db: db,
|
||||
db: db,
|
||||
mux: sync.RWMutex{},
|
||||
}, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user