Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidFileName = errors.New("the migration name should contain letters, digits, underscore and/or backslash characters only")
)
Functions ¶
This section is empty.
Types ¶
type Console ¶
type Console interface {
Confirm(s string) bool
Info(message string)
InfoLn(message string)
Infof(message string, a ...any)
Success(message string)
SuccessLn(message string)
Successf(message string, a ...any)
Warn(message string)
WarnLn(message string)
Warnf(message string, a ...any)
Error(message string)
ErrorLn(message string)
Errorf(message string, a ...any)
Fatal(err error)
NumberPlural(count int, one, many string) string
}
type Downgrade ¶
type Downgrade struct {
// contains filtered or unexported fields
}
func NewDowngrade ¶
func NewDowngrade( service MigrationService, fileNameBuilder FileNameBuilder, interactive bool, ) *Downgrade
type FileNameBuilder ¶
type History ¶
type History struct {
// contains filtered or unexported fields
}
func NewHistory ¶
func NewHistory( service MigrationService, ) *History
type HistoryNew ¶
type HistoryNew struct {
// contains filtered or unexported fields
}
func NewHistoryNew ¶
func NewHistoryNew( service MigrationService, ) *HistoryNew
type MigrationService ¶
type MigrationService interface {
// Migrations returns an entities of migrations
Migrations(ctx context.Context, limit int) (entity.Migrations, error)
// NewMigrations returns an entities of new migrations
//todo: domain.Migrations
NewMigrations(ctx context.Context) (entity.Migrations, error)
// ApplyFile applies new migration
//todo: domain.Migration
ApplyFile(ctx context.Context, entity *entity.Migration, fileName string, safely bool) error
// RevertFile reverts the migration
RevertFile(ctx context.Context, entity *entity.Migration, fileName string, safely bool) error
}
type Redo ¶
type Redo struct {
// contains filtered or unexported fields
}
func NewRedo ¶
func NewRedo( service MigrationService, fileNameBuilder FileNameBuilder, interactive bool, ) *Redo
type To ¶
type To struct {
// contains filtered or unexported fields
}
func NewTo ¶
func NewTo( service MigrationService, fileNameBuilder FileNameBuilder, interactive bool, ) *To
type Upgrade ¶
type Upgrade struct {
// contains filtered or unexported fields
}
func NewUpgrade ¶
func NewUpgrade( console Console, service MigrationService, fileNameBuilder FileNameBuilder, interactive bool, ) *Upgrade
Source Files
¶
Click to show internal directories.
Click to hide internal directories.