Documentation ¶
Index ¶
- func NewBoxMigrator(migrations *rice.Box, connectionString string) (*migrate.Migrate, error)
- type Box
- func (b *Box) Close() error
- func (b *Box) First() (version uint, err error)
- func (b *Box) Initialize() error
- func (b *Box) Next(version uint) (nextVersion uint, err error)
- func (b *Box) Open(url string) (source.Driver, error)
- func (b *Box) Prev(version uint) (prevVersion uint, err error)
- func (b *Box) ReadDown(version uint) (r io.ReadCloser, identifier string, err error)
- func (b *Box) ReadUp(version uint) (r io.ReadCloser, identifier string, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Box ¶
type Box struct {
// contains filtered or unexported fields
}
Box is a migrate driver
func (*Box) First ¶
First returns the very first migration version available to the driver. Migrate will call this function multiple times.
func (*Box) Initialize ¶
Initialize reads the rice-box for all migrations
func (*Box) Next ¶
Next returns the next version for a given version available to the driver. Migrate will call this function multiple times.
func (*Box) Prev ¶
Prev returns the previous version for a given version available to the driver. Migrate will call this function multiple times.
func (*Box) ReadDown ¶
ReadDown returns the DOWN migration body and an identifier that helps finding this migration in the source for a given version. If there is no down migration available for this version, it must return os.ErrNotExist.