Documentation
¶
Index ¶
Constants ¶
View Source
const ( // MaxLimit represents the max number of items for pagination MaxLimit = 100 // DefaultSlowThreshold represents the default slow threshold value DefaultSlowThreshold time.Duration = 200 * time.Millisecond )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DB ¶
DB represents the database.
func (*DB) MakeMigrations ¶
MakeMigrations runs GORM migrations.
type DatabaseConfig ¶
type DatabaseConfig struct { Driver string // Not used Host string Username string Password string Port int Database string Charset string Collation string Location string MaxIdleConns int // Sets the maximum number of connections in the idle connection pool MaxOpenConns int // Sets the maximum number of open connections to the database ConnMaxLifetime time.Duration // Sets the maximum amount of time a connection may be reused SlowThreshold time.Duration // Slow SQL threshold (Default: 200ms) }
DatabaseConfig represents the database configuration.
Click to show internal directories.
Click to hide internal directories.