Added the Database struct
This commit is contained in:
parent
4ddf4f56f9
commit
1567237f5c
13
main.go
13
main.go
|
@ -1,6 +1,7 @@
|
|||
package library
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"github.com/go-chi/chi/v5"
|
||||
"github.com/google/uuid"
|
||||
"io/fs"
|
||||
|
@ -37,3 +38,15 @@ type ServiceInitializationInformation struct {
|
|||
Configuration map[string]interface{}
|
||||
ResourceDir fs.FS
|
||||
}
|
||||
|
||||
type DBType int
|
||||
|
||||
const (
|
||||
Sqlite DBType = 0
|
||||
Postgres DBType = 1
|
||||
)
|
||||
|
||||
type Database struct {
|
||||
DB *sql.DB
|
||||
DBType DBType
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue