Documentation ¶
Overview ¶
Code generated by go-bindata. (@generated) DO NOT EDIT. sources: stub/a/1.sql stub/a/3.sql stub/b/2.sql stub/c/2.sql stub/c/4.sql
Index ¶
- Constants
- func Asset(name string) ([]byte, error)
- func AssetDir(name string) ([]string, error)
- func AssetInfo(name string) (os.FileInfo, error)
- func AssetNames() []string
- func Canonicalize(database string) string
- func Connect(db string, logger logrus.FieldLogger, memf func() error, ...) error
- func MustAsset(name string) []byte
- func MustCanonicalize(database string) string
- func NewMustPackerMigrationSource(l logrus.FieldLogger, folder []string, loader func(string) ([]byte, error), ...) *migrate.PackrMigrationSource
- func NewPackerMigrationSource(l logrus.FieldLogger, sources []string, loader func(string) ([]byte, error), ...) (*migrate.PackrMigrationSource, error)
- func RestoreAsset(dir, name string) error
- func RestoreAssets(dir, name string) error
Constants ¶
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 Asset ¶ added in v0.0.26
Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetDir ¶ added in v0.0.26
AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:
data/ foo.txt img/ a.png b.png
then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.
func AssetInfo ¶ added in v0.0.26
AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.
func AssetNames ¶ added in v0.0.26
func AssetNames() []string
AssetNames returns the names of the assets.
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 MustAsset ¶ added in v0.0.26
MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.
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, loader func(string) ([]byte, error), filters []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, sources []string, loader func(string) ([]byte, error), filters []string) (*migrate.PackrMigrationSource, error)
NewPackerMigrationSource create a new packr-based migration source or returns an error
func RestoreAsset ¶ added in v0.0.26
RestoreAsset restores an asset under the given directory
func RestoreAssets ¶ added in v0.0.26
RestoreAssets restores an asset under the given directory recursively
Types ¶
This section is empty.