Versions in this module Expand all Collapse all v0 v0.25.3 Nov 1, 2026 Changes in this version + func GetProviderName(dbType DBType) string + type CockroachDB struct + AllowGlobalUpdate bool + Config string + ConnMaxIdleTime int + ConnMaxLifeTime int + CreateBatchSize int + Dbname string + DisableForeignKeyConstraintWhenMigrating bool + DisableNestedTransaction bool + Host string + IgnoreRecordNotFoundError bool + LogLevel string + MaxIdleConns int + MaxOpenConns int + ModuleName string + Password string + Port string + PrepareStmt bool + QueryFields bool + SingularTable bool + SkipDefaultTransaction bool + SlowThreshold int + Username string + func DefaultCockroachDB() *CockroachDB + func NewCockroachDBConfig(opt *CockroachDB) *CockroachDB + func (c *CockroachDB) Clone() internal.Configurable + func (c *CockroachDB) Get() interface{} + func (c *CockroachDB) GetAllowGlobalUpdate() bool + func (c *CockroachDB) GetConfig() string + func (c *CockroachDB) GetCreateBatchSize() int + func (c *CockroachDB) GetDBName() string + func (c *CockroachDB) GetDBType() DBType + func (c *CockroachDB) GetDisableForeignKeyConstraintWhenMigrating() bool + func (c *CockroachDB) GetDisableNestedTransaction() bool + func (c *CockroachDB) GetHost() string + func (c *CockroachDB) GetIgnoreRecordNotFoundError() bool + func (c *CockroachDB) GetLogLevel() string + func (c *CockroachDB) GetModuleName() string + func (c *CockroachDB) GetPassword() string + func (c *CockroachDB) GetPort() string + func (c *CockroachDB) GetPrepareStmt() bool + func (c *CockroachDB) GetQueryFields() bool + func (c *CockroachDB) GetSingularTable() bool + func (c *CockroachDB) GetSkipDefaultTransaction() bool + func (c *CockroachDB) GetSlowThreshold() int + func (c *CockroachDB) GetUsername() string + func (c *CockroachDB) Set(data interface{}) + func (c *CockroachDB) SetCredentials(username, password string) + func (c *CockroachDB) SetDBName(dbName string) + func (c *CockroachDB) SetHost(host string) + func (c *CockroachDB) SetPort(port string) + func (c *CockroachDB) Validate() error + func (c *CockroachDB) WithConfig(config string) *CockroachDB + func (c *CockroachDB) WithConnMaxIdleTime(connMaxIdleTime int) *CockroachDB + func (c *CockroachDB) WithConnMaxLifeTime(connMaxLifeTime int) *CockroachDB + func (c *CockroachDB) WithDbname(dbname string) *CockroachDB + func (c *CockroachDB) WithHost(host string) *CockroachDB + func (c *CockroachDB) WithLogLevel(logLevel string) *CockroachDB + func (c *CockroachDB) WithMaxIdleConns(maxIdleConns int) *CockroachDB + func (c *CockroachDB) WithMaxOpenConns(maxOpenConns int) *CockroachDB + func (c *CockroachDB) WithModuleName(moduleName string) *CockroachDB + func (c *CockroachDB) WithPassword(password string) *CockroachDB + func (c *CockroachDB) WithPort(port string) *CockroachDB + func (c *CockroachDB) WithUsername(username string) *CockroachDB + type DBType string + const DBTypeCockroachDB + const DBTypeMySQL + const DBTypePostgreSQL + const DBTypeSQLite + func GetSupportedTypes() []DBType + func ParseDBType(typeStr string) (DBType, error) + type Database struct + CockroachDB *CockroachDB + Default string + Enabled bool + MySQL *MySQL + PostgreSQL *PostgreSQL + SQLite *SQLite + Type DBType + func DefaultDatabaseConfig() *Database + func NewDatabase() *Database + func (c *Database) AfterLoad() error + func (c *Database) BeforeLoad() error + func (c *Database) Clone() internal.Configurable + func (c *Database) EnsureDefaults() + func (c *Database) Get() interface{} + func (c *Database) GetDefaultProvider() (DatabaseProvider, error) + func (c *Database) GetProvider(dbType DBType) (DatabaseProvider, error) + func (c *Database) GetSafe() interface{} + func (c *Database) ListAvailableProviders() []DBType + func (c *Database) Set(data interface{}) + func (c *Database) SetDefaultProvider(dbType DBType) + func (c *Database) Validate() error + func (c *Database) ValidateAll() error + func (c *Database) ValidateProvider(dbType DBType) error + func (d *Database) EnableCockroachDB() *Database + func (d *Database) EnableDatabase() *Database + func (d *Database) EnableMySQL() *Database + func (d *Database) EnablePostgreSQL() *Database + func (d *Database) EnableSQLite() *Database + func (d *Database) WithCockroachDB(cockroachdb *CockroachDB) *Database + func (d *Database) WithDefault(defaultDB string) *Database + func (d *Database) WithEnabled(enabled bool) *Database + func (d *Database) WithMySQL(mysql *MySQL) *Database + func (d *Database) WithPostgreSQL(postgresql *PostgreSQL) *Database + func (d *Database) WithSQLite(sqlite *SQLite) *Database + func (d *Database) WithType(dbType DBType) *Database + type DatabaseProvider interface + GetAllowGlobalUpdate func() bool + GetConfig func() string + GetCreateBatchSize func() int + GetDBName func() string + GetDBType func() DBType + GetDisableForeignKeyConstraintWhenMigrating func() bool + GetDisableNestedTransaction func() bool + GetHost func() string + GetIgnoreRecordNotFoundError func() bool + GetLogLevel func() string + GetModuleName func() string + GetPassword func() string + GetPort func() string + GetPrepareStmt func() bool + GetQueryFields func() bool + GetSingularTable func() bool + GetSkipDefaultTransaction func() bool + GetSlowThreshold func() int + GetUsername func() string + SetCredentials func(username, password string) + SetDBName func(dbName string) + SetHost func(host string) + SetPort func(port string) + type MySQL struct + AllowGlobalUpdate bool + Config string + ConnMaxIdleTime int + ConnMaxLifeTime int + CreateBatchSize int + Dbname string + DisableForeignKeyConstraintWhenMigrating bool + DisableNestedTransaction bool + Host string + IgnoreRecordNotFoundError bool + LogLevel string + MaxIdleConns int + MaxOpenConns int + ModuleName string + Password string + Port string + PrepareStmt bool + QueryFields bool + SingularTable bool + SkipDefaultTransaction bool + SlowThreshold int + Username string + func DefaultMySQL() *MySQL + func NewMySQLConfig(opt *MySQL) *MySQL + func (m *MySQL) Clone() internal.Configurable + func (m *MySQL) Get() interface{} + func (m *MySQL) GetAllowGlobalUpdate() bool + func (m *MySQL) GetConfig() string + func (m *MySQL) GetCreateBatchSize() int + func (m *MySQL) GetDBName() string + func (m *MySQL) GetDBType() DBType + func (m *MySQL) GetDisableForeignKeyConstraintWhenMigrating() bool + func (m *MySQL) GetDisableNestedTransaction() bool + func (m *MySQL) GetHost() string + func (m *MySQL) GetIgnoreRecordNotFoundError() bool + func (m *MySQL) GetLogLevel() string + func (m *MySQL) GetModuleName() string + func (m *MySQL) GetPassword() string + func (m *MySQL) GetPort() string + func (m *MySQL) GetPrepareStmt() bool + func (m *MySQL) GetQueryFields() bool + func (m *MySQL) GetSingularTable() bool + func (m *MySQL) GetSkipDefaultTransaction() bool + func (m *MySQL) GetSlowThreshold() int + func (m *MySQL) GetUsername() string + func (m *MySQL) Set(data interface{}) + func (m *MySQL) SetCredentials(username, password string) + func (m *MySQL) SetDBName(dbName string) + func (m *MySQL) SetHost(host string) + func (m *MySQL) SetPort(port string) + func (m *MySQL) Validate() error + func (m *MySQL) WithConfig(config string) *MySQL + func (m *MySQL) WithConnMaxIdleTime(connMaxIdleTime int) *MySQL + func (m *MySQL) WithConnMaxLifeTime(connMaxLifeTime int) *MySQL + func (m *MySQL) WithDbname(dbname string) *MySQL + func (m *MySQL) WithHost(host string) *MySQL + func (m *MySQL) WithLogLevel(logLevel string) *MySQL + func (m *MySQL) WithMaxIdleConns(maxIdleConns int) *MySQL + func (m *MySQL) WithMaxOpenConns(maxOpenConns int) *MySQL + func (m *MySQL) WithModuleName(moduleName string) *MySQL + func (m *MySQL) WithPassword(password string) *MySQL + func (m *MySQL) WithPort(port string) *MySQL + func (m *MySQL) WithUsername(username string) *MySQL + type PostgreSQL struct + AllowGlobalUpdate bool + Config string + ConnMaxIdleTime int + ConnMaxLifeTime int + CreateBatchSize int + Dbname string + DisableForeignKeyConstraintWhenMigrating bool + DisableNestedTransaction bool + Host string + IgnoreRecordNotFoundError bool + LogLevel string + MaxIdleConns int + MaxOpenConns int + ModuleName string + Password string + Port string + PrepareStmt bool + QueryFields bool + SingularTable bool + SkipDefaultTransaction bool + SlowThreshold int + Username string + func DefaultPostgreSQL() *PostgreSQL + func NewPostgreSQLConfig(opt *PostgreSQL) *PostgreSQL + func (p *PostgreSQL) Clone() internal.Configurable + func (p *PostgreSQL) Get() interface{} + func (p *PostgreSQL) GetAllowGlobalUpdate() bool + func (p *PostgreSQL) GetConfig() string + func (p *PostgreSQL) GetCreateBatchSize() int + func (p *PostgreSQL) GetDBName() string + func (p *PostgreSQL) GetDBType() DBType + func (p *PostgreSQL) GetDisableForeignKeyConstraintWhenMigrating() bool + func (p *PostgreSQL) GetDisableNestedTransaction() bool + func (p *PostgreSQL) GetHost() string + func (p *PostgreSQL) GetIgnoreRecordNotFoundError() bool + func (p *PostgreSQL) GetLogLevel() string + func (p *PostgreSQL) GetModuleName() string + func (p *PostgreSQL) GetPassword() string + func (p *PostgreSQL) GetPort() string + func (p *PostgreSQL) GetPrepareStmt() bool + func (p *PostgreSQL) GetQueryFields() bool + func (p *PostgreSQL) GetSingularTable() bool + func (p *PostgreSQL) GetSkipDefaultTransaction() bool + func (p *PostgreSQL) GetSlowThreshold() int + func (p *PostgreSQL) GetUsername() string + func (p *PostgreSQL) Set(data interface{}) + func (p *PostgreSQL) SetCredentials(username, password string) + func (p *PostgreSQL) SetDBName(dbName string) + func (p *PostgreSQL) SetHost(host string) + func (p *PostgreSQL) SetPort(port string) + func (p *PostgreSQL) Validate() error + func (p *PostgreSQL) WithConfig(config string) *PostgreSQL + func (p *PostgreSQL) WithConnMaxIdleTime(connMaxIdleTime int) *PostgreSQL + func (p *PostgreSQL) WithConnMaxLifeTime(connMaxLifeTime int) *PostgreSQL + func (p *PostgreSQL) WithDbname(dbname string) *PostgreSQL + func (p *PostgreSQL) WithHost(host string) *PostgreSQL + func (p *PostgreSQL) WithLogLevel(logLevel string) *PostgreSQL + func (p *PostgreSQL) WithMaxIdleConns(maxIdleConns int) *PostgreSQL + func (p *PostgreSQL) WithMaxOpenConns(maxOpenConns int) *PostgreSQL + func (p *PostgreSQL) WithModuleName(moduleName string) *PostgreSQL + func (p *PostgreSQL) WithPassword(password string) *PostgreSQL + func (p *PostgreSQL) WithPort(port string) *PostgreSQL + func (p *PostgreSQL) WithUsername(username string) *PostgreSQL + type SQLite struct + AllowGlobalUpdate bool + Config string + ConnMaxIdleTime int + ConnMaxLifeTime int + CreateBatchSize int + DbPath string + DisableForeignKeyConstraintWhenMigrating bool + DisableNestedTransaction bool + IgnoreRecordNotFoundError bool + LogLevel string + MaxIdleConns int + MaxOpenConns int + ModuleName string + PrepareStmt bool + QueryFields bool + SingularTable bool + SkipDefaultTransaction bool + SlowThreshold int + Vacuum bool + func DefaultSQLite() *SQLite + func NewSQLiteConfig(opt *SQLite) *SQLite + func (s *SQLite) Clone() internal.Configurable + func (s *SQLite) Get() interface{} + func (s *SQLite) GetAllowGlobalUpdate() bool + func (s *SQLite) GetConfig() string + func (s *SQLite) GetCreateBatchSize() int + func (s *SQLite) GetDBName() string + func (s *SQLite) GetDBType() DBType + func (s *SQLite) GetDisableForeignKeyConstraintWhenMigrating() bool + func (s *SQLite) GetDisableNestedTransaction() bool + func (s *SQLite) GetHost() string + func (s *SQLite) GetIgnoreRecordNotFoundError() bool + func (s *SQLite) GetLogLevel() string + func (s *SQLite) GetModuleName() string + func (s *SQLite) GetPassword() string + func (s *SQLite) GetPort() string + func (s *SQLite) GetPrepareStmt() bool + func (s *SQLite) GetQueryFields() bool + func (s *SQLite) GetSingularTable() bool + func (s *SQLite) GetSkipDefaultTransaction() bool + func (s *SQLite) GetSlowThreshold() int + func (s *SQLite) GetUsername() string + func (s *SQLite) Set(data interface{}) + func (s *SQLite) SetCredentials(username, password string) + func (s *SQLite) SetDBName(dbName string) + func (s *SQLite) SetHost(host string) + func (s *SQLite) SetPort(port string) + func (s *SQLite) Validate() error + func (s *SQLite) WithConfig(config string) *SQLite + func (s *SQLite) WithConnMaxIdleTime(connMaxIdleTime int) *SQLite + func (s *SQLite) WithConnMaxLifeTime(connMaxLifeTime int) *SQLite + func (s *SQLite) WithDbPath(dbPath string) *SQLite + func (s *SQLite) WithLogLevel(logLevel string) *SQLite + func (s *SQLite) WithMaxIdleConns(maxIdleConns int) *SQLite + func (s *SQLite) WithMaxOpenConns(maxOpenConns int) *SQLite + func (s *SQLite) WithModuleName(moduleName string) *SQLite + func (s *SQLite) WithVacuum(vacuum bool) *SQLite