Documentation ¶
Index ¶
- func Close(db *gorm.DB)
- func CreateMigrationFile(migrationName string) error
- func DBMigrationPath() string
- func MigrateDb(cfg *config.Config, direction string, steps ...int) error
- func MigrateDown(config *config.Config, steps ...int) error
- func MigrateUp(config *config.Config, steps ...int) error
- func NewDB(cfg *config.Config, sl *slog.Logger) (db *gorm.DB)
- func NewDbMigration(config *config.Config) (m *migrate.Migrate, err error)
- func SetDBMigrationPath(value string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DBMigrationPath ¶
func DBMigrationPath() string
func NewDB ¶
NewDB return a new gorm database connector. cfg provides the database connection information. return a gorm.DB instance if success, nil on error and panic on invalid input arguments.
func NewDbMigration ¶
func SetDBMigrationPath ¶
func SetDBMigrationPath(value string)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.