Documentation
¶
Index ¶
- Variables
- func AppSchemaVersion() uint
- func Backup(backupPath string) error
- func DatabaseBackupPath() string
- func Initialize(databasePath string)
- func NeedsMigration() bool
- func Reset(databasePath string) error
- func RestoreFromBackup(backupPath string) error
- func RunMigrations() error
- func Version() uint
- func WithInstance(instance *Packr2Source) (source.Driver, error)
- type Packr2Source
- func (s *Packr2Source) Close() error
- func (s *Packr2Source) First() (version uint, err error)
- func (s *Packr2Source) Next(version uint) (nextVersion uint, err error)
- func (s *Packr2Source) Open(url string) (source.Driver, error)
- func (s *Packr2Source) Prev(version uint) (prevVersion uint, err error)
- func (s *Packr2Source) ReadDown(version uint) (r io.ReadCloser, identifier string, err error)
- func (s *Packr2Source) ReadUp(version uint) (r io.ReadCloser, identifier string, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var DB *sqlx.DB
Functions ¶
func AppSchemaVersion ¶ added in v0.2.0
func AppSchemaVersion() uint
func DatabaseBackupPath ¶ added in v0.2.0
func DatabaseBackupPath() string
func Initialize ¶
func Initialize(databasePath string)
func RestoreFromBackup ¶ added in v0.2.0
func RestoreFromBackup(backupPath string) error
func WithInstance ¶
func WithInstance(instance *Packr2Source) (source.Driver, error)
Types ¶
type Packr2Source ¶
type Packr2Source struct {
Box *packr.Box
Migrations *source.Migrations
}
Click to show internal directories.
Click to hide internal directories.