Documentation ¶
Index ¶
- type MigratorSuite
- func (suite *MigratorSuite) ApplyAll(t *testing.T)
- func (suite *MigratorSuite) ApplyAllWhenFull(t *testing.T)
- func (suite *MigratorSuite) ApplyOne(t *testing.T)
- func (suite *MigratorSuite) Drop(t *testing.T)
- func (suite *MigratorSuite) Redo(t *testing.T)
- func (suite *MigratorSuite) RevertAll(t *testing.T)
- func (suite *MigratorSuite) RevertAllWhenEmpty(t *testing.T)
- func (suite *MigratorSuite) RevertOne(t *testing.T)
- type MockMigrator
- func (mm *MockMigrator) DoStep(ctx context.Context, step dbump.Step) error
- func (mm *MockMigrator) Drop(ctx context.Context) error
- func (mm *MockMigrator) Init(ctx context.Context) error
- func (mm *MockMigrator) LockDB(ctx context.Context) error
- func (mm *MockMigrator) Log() []string
- func (mm *MockMigrator) LogAdd(s ...string)
- func (mm *MockMigrator) UnlockDB(ctx context.Context) error
- func (mm *MockMigrator) Version(ctx context.Context) (version int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MigratorSuite ¶
type MigratorSuite struct { ApplyTmpl string RevertTmpl string CleanMigTmpl string CleanTest string // contains filtered or unexported fields }
func NewMigratorSuite ¶
func NewMigratorSuite(m dbump.Migrator) *MigratorSuite
func (*MigratorSuite) ApplyAll ¶
func (suite *MigratorSuite) ApplyAll(t *testing.T)
func (*MigratorSuite) ApplyAllWhenFull ¶
func (suite *MigratorSuite) ApplyAllWhenFull(t *testing.T)
func (*MigratorSuite) ApplyOne ¶
func (suite *MigratorSuite) ApplyOne(t *testing.T)
func (*MigratorSuite) Drop ¶
func (suite *MigratorSuite) Drop(t *testing.T)
func (*MigratorSuite) Redo ¶
func (suite *MigratorSuite) Redo(t *testing.T)
func (*MigratorSuite) RevertAll ¶
func (suite *MigratorSuite) RevertAll(t *testing.T)
func (*MigratorSuite) RevertAllWhenEmpty ¶
func (suite *MigratorSuite) RevertAllWhenEmpty(t *testing.T)
func (*MigratorSuite) RevertOne ¶
func (suite *MigratorSuite) RevertOne(t *testing.T)
type MockMigrator ¶
type MockMigrator struct { LockDBFn func(ctx context.Context) error UnlockDBFn func(ctx context.Context) error InitFn func(ctx context.Context) error DropFn func(ctx context.Context) error VersionFn func(ctx context.Context) (version int, err error) DoStepFn func(ctx context.Context, step dbump.Step) error // contains filtered or unexported fields }
func NewMockMigrator ¶
func NewMockMigrator(m dbump.Migrator) *MockMigrator
func (*MockMigrator) Log ¶
func (mm *MockMigrator) Log() []string
func (*MockMigrator) LogAdd ¶
func (mm *MockMigrator) LogAdd(s ...string)
Click to show internal directories.
Click to hide internal directories.