Documentation
¶
Index ¶
- Variables
- func Migrate(g *gorm.DB, db *sql.DB)
- func MigratePostgres(g *gorm.DB, db *sql.DB)
- func MongoDB() (disconnectors []func())
- func MySQL() (disconnectors []func())
- func Postgres() (disconnectors []func())
- func Redis() (disconnectors []func())
- func RegisterSQLDriver(name string, run func() []func(), enabled func() bool)
- func ResolveSQLDrivers() []func() []func()
- func SqLiteClient() (disconnectors []func())
- type SqLiteProvider
Constants ¶
This section is empty.
Variables ¶
View Source
var MongoDBConfig types.IMongoDB
View Source
var MySQLConfig []types.IMySQL
View Source
var PostgresConfig []types.IPostgres
View Source
var RedisConfig types.IRedis
View Source
var SqLiteConfig *[]*types.SqLite
Functions ¶
func MongoDB ¶
func MongoDB() (disconnectors []func())
MongoDB initializes and returns MongoDB client with connection pooling and retry logic
func Redis ¶
func Redis() (disconnectors []func())
Redis initializes and returns Redis client with connection pooling and retry logic
func RegisterSQLDriver ¶
func ResolveSQLDrivers ¶
func ResolveSQLDrivers() []func() []func()
Types ¶
type SqLiteProvider ¶
type SqLiteProvider struct {
Config *types.SqLite
// debug bool
DSN string
Gorm *gorm.DB
Sql *sql.DB
Mu sync.RWMutex
}
func (*SqLiteProvider) Connect ¶
func (m *SqLiteProvider) Connect()
func (*SqLiteProvider) Disconnect ¶
func (m *SqLiteProvider) Disconnect()
Click to show internal directories.
Click to hide internal directories.