wip: implementing db initialization

This commit is contained in:
Alexander Navarro 2024-11-13 19:55:02 +00:00
parent ffd3c2014e
commit d4857c48cf
Signed by untrusted user who does not match committer: anavarro
GPG key ID: 6426043E9FA3E3B5
10 changed files with 383 additions and 0 deletions

37
pkg/types.go Normal file
View file

@ -0,0 +1,37 @@
package synchronizator
import (
sql "database/sql"
"os"
)
type NodeType map[string]Node
type db struct {
Connection *sql.DB
logger *os.File
log_level LogLevel
drop_tables bool
node_types NodeType
}
type Options struct {
Logger *os.File
Log_level LogLevel
DANGEROUSLY_DROP_TABLES bool
}
type Relationship struct {
_class string
}
type LogLevel int
// Lower levels take precedence
//go:generate stringer -type=LogLevel
const (
ERROR LogLevel = iota
INFO
DEBUG
)