implement basic db module
This commit is contained in:
13
config.go
Normal file
13
config.go
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user