Documentation
¶
Index ¶
- Constants
- type ConnectionConfig
- type Manager
- type MigrationConfig
- type Option
- func WithConnection(maxOpen int, maxIdle int, maxLifetime time.Duration, execTimeout time.Duration) Option
- func WithDataSource(source Source) Option
- func WithLogger(logger log.Logger) Option
- func WithMigration(sqlDir string, version uint) Option
- func WithName(name string) Option
- func WithType(dbtype string) Option
- type Source
- type Type
Constants ¶
View Source
const ( SQLite = Type("sqlite") MySQL = Type("mysql") Postgres = Type("postgres") Clickhouse = Type("clickhouse") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectionConfig ¶
type Manager ¶
type Manager interface {
common.Service
common.Initializable
common.Debuggable
ORM() *gorm.DB
DB() *sql.DB
}
type MigrationConfig ¶
type Option ¶
type Option func(*manager)
func WithConnection ¶
func WithDataSource ¶
func WithLogger ¶
func WithMigration ¶
Click to show internal directories.
Click to hide internal directories.