Files
workspace/code/base-project/base-go-v3/config/database.go
T
2025-11-28 17:31:58 +08:00

33 lines
623 B
Go

package config
import (
"time"
)
type dbConfig struct {
Host string
Port int
User string
Password string
Dbname string
SllMode bool
TimeZone string
MaxOpenConns int
MaxIdleConns int
ConnMaxLifetime time.Duration
}
// Db 默认值
var Db = &dbConfig{
Host: "117.72.182.135",
Port: 5432,
User: "postgres",
Password: "zhang520..",
Dbname: "base",
SllMode: false,
TimeZone: "Asia/Shanghai",
MaxOpenConns: 10,
MaxIdleConns: 5,
ConnMaxLifetime: 30 * time.Minute,
}