github.com/binbinly/pkg@v0.0.11-0.20240321014439-f4fbf666eb0f/storage/orm/config.go (about)

     1  package orm
     2  
     3  import "time"
     4  
     5  // Config mysql config
     6  type Config struct {
     7  	Driver          string
     8  	Dsn             string
     9  	Host            string
    10  	Port            int
    11  	User            string
    12  	Password        string
    13  	Database        string
    14  	TablePrefix     string
    15  	Debug           bool
    16  	Trace           bool
    17  	MaxIdleConn     int
    18  	MaxOpenConn     int
    19  	ConnMaxLifeTime time.Duration
    20  	SlowThreshold   time.Duration // 慢查询时长,默认500ms
    21  }