Documentation
¶
Index ¶
- Variables
- func Asset(string) ([]byte, error)
- func AssetDir(string) ([]string, error)
- func AssetInfo(string) (os.FileInfo, error)
- func AssetNames() []string
- func MustAsset(string) []byte
- func RestoreAsset(string, string) error
- func RestoreAssets(string, string) error
- type Bindata
- type Migrator
- type OpenHelper
- type Parser
- type Strategy
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCouldNotParseDirection = errors.New("could not parse direction for migration")
View Source
var ErrEncryptedWithUnknownKey = errors.New("row encrypted with neither old nor new key")
Functions ¶
func AssetNames ¶
func AssetNames() []string
func RestoreAsset ¶
func RestoreAssets ¶
Types ¶
type Migrator ¶
type Migrator interface { CurrentVersion() (int, error) SupportedVersion() (int, error) Migrate(newKey, oldKey *encryption.Key, version int) error Up(newKey, oldKey *encryption.Key) error Migrations() ([]migration, error) }
func NewMigrator ¶
func NewMigrator(db *sql.DB, lockFactory lock.LockFactory) Migrator
type OpenHelper ¶
type OpenHelper struct {
// contains filtered or unexported fields
}
func NewOpenHelper ¶
func NewOpenHelper(driver, name string, lockFactory lock.LockFactory, newKey *encryption.Key, oldKey *encryption.Key) *OpenHelper
func (*OpenHelper) CurrentVersion ¶
func (helper *OpenHelper) CurrentVersion() (int, error)
func (*OpenHelper) MigrateToVersion ¶
func (helper *OpenHelper) MigrateToVersion(version int) error
func (*OpenHelper) OpenAtVersion ¶
func (helper *OpenHelper) OpenAtVersion(version int) (*sql.DB, error)
func (*OpenHelper) SupportedVersion ¶
func (helper *OpenHelper) SupportedVersion() (int, error)
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
func (*Parser) ParseFileToMigration ¶
func (*Parser) ParseMigrationFilename ¶
Click to show internal directories.
Click to hide internal directories.