implement basic db module

This commit is contained in:
Elijah Duffy
2025-05-30 16:28:24 -07:00
parent 08d96ca00f
commit a22843f130
5 changed files with 403 additions and 1 deletions

13
config.go Normal file
View File

@@ -0,0 +1,13 @@
package dbx
// DBConfig defines the expected structure for database configuration. Includes
// tags for validation and maps to
type DBConfig struct {
User string `validate:"required"`
Password string `validate:"required"`
Path string `validate:"hostname_port,required"`
Name string `validate:"required"`
MaxConn int `validate:"min=1,max=1000"`
AutoMigrate bool
DebugLog bool
}