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