Documentation
¶
Index ¶
- Constants
- Variables
- func NewClickhouseDialector(dsn string) gorm.Dialector
- func NewGormLoggerAdapter(lg logger.Logger, cfg gormLogger.Config) gormLogger.Interface
- func NewGormProvider(configs Configs) contracts.Provider
- func NewMigrateCommands(app contracts.Application, mig migorm.Migrater) []*cli.Command
- func NewMigraterService(app contracts.Application, cfg migorm.Config, upOnStart bool) migorm.Migrater
- type Callback
- type Config
- type Configs
- type Connection
- type ConnectionPool
- type ConnectionRegistry
Constants ¶
View Source
const ( MysqlDriver = "mysql" PostgresqlDriver = "postgresql" ClickhouseDriver = "clickhouse" )
Variables ¶
View Source
var GormLoggerLevels = map[string]gormLogger.LogLevel{ "info": gormLogger.Info, "warn": gormLogger.Warn, "error": gormLogger.Error, "silent": gormLogger.Silent, }
Functions ¶
func NewClickhouseDialector ¶
func NewGormLoggerAdapter ¶
func NewGormLoggerAdapter(lg logger.Logger, cfg gormLogger.Config) gormLogger.Interface
func NewGormProvider ¶
func NewMigrateCommands ¶
func NewMigrateCommands(app contracts.Application, mig migorm.Migrater) []*cli.Command
func NewMigraterService ¶
Types ¶
type Config ¶
type Config struct { Name string Driver string DBHost string DBPort string DBUser string DBPass string DBName string MigrationsTableName string MigrationsDir string MigrationsRunOnStart bool LogLevel string SlowThreshold time.Duration }
func (*Config) LowerPrefix ¶
func (*Config) UpperPrefix ¶
type Connection ¶
type Connection interface { DB() *gorm.DB Register(cb Callback) IsConnected() bool Connect() Close() }
func NewGormConnection ¶
type ConnectionPool ¶
type ConnectionPool interface { Default() Connection Get(name string) Connection }
type ConnectionRegistry ¶
type ConnectionRegistry interface { ConnectionPool Register(name string, conn Connection) }
func NewConnectionRegistry ¶
func NewConnectionRegistry() ConnectionRegistry
Source Files
¶
Click to show internal directories.
Click to hide internal directories.