Documentation ¶
Index ¶
- Constants
- func Canonicalize(database string) string
- func Connect(db string, logger logrus.FieldLogger, memf func() error, ...) error
- func MustCanonicalize(database string) string
- func NewMustPackerMigrationSource(l logrus.FieldLogger, folder []string) *migrate.PackrMigrationSource
- func NewPackerMigrationSource(l logrus.FieldLogger, folder []string) (*migrate.PackrMigrationSource, error)
Constants ¶
View Source
const ( // DriverMySQL is the mysql driver name. DriverMySQL = "mysql" // DriverPostgreSQL is the mysql driver name. DriverPostgreSQL = "postgres" // UnknownDriver is the driver name if the driver is unknown. UnknownDriver = "unknown" )
Variables ¶
This section is empty.
Functions ¶
func Canonicalize ¶ added in v0.0.22
Canonicalize returns constants DriverMySQL, DriverPostgreSQL, UnknownDriver, depending on `database`.
func Connect ¶
func Connect(db string, logger logrus.FieldLogger, memf func() error, sqlf func(db *sqlx.DB) error) error
Connect is a wrapper for connecting to different SQL drivers.
func MustCanonicalize ¶ added in v0.0.22
MustCanonicalize returns constants DriverMySQL, DriverPostgreSQL or fatals.
func NewMustPackerMigrationSource ¶ added in v0.0.24
func NewMustPackerMigrationSource(l logrus.FieldLogger, folder []string) *migrate.PackrMigrationSource
NewMustPackerMigrationSource create a new packr-based migration source or fatals.
func NewPackerMigrationSource ¶ added in v0.0.24
func NewPackerMigrationSource(l logrus.FieldLogger, folder []string) (*migrate.PackrMigrationSource, error)
NewPackerMigrationSource create a new packr-based migration source or returns an error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.