Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Darwinx ¶
type Darwinx struct {
// contains filtered or unexported fields
}
Darwinx is a helper struct to access the Validate and migration functions
func (*Darwinx) Info ¶
func (d *Darwinx) Info(ctx context.Context) ([]MigrationInfo, error)
Info returns the status of all migrations
type DuplicateMigrationVersionError ¶
type DuplicateMigrationVersionError struct {
Version float64
}
DuplicateMigrationVersionError is used to report when the migration list has duplicated entries
func (DuplicateMigrationVersionError) Error ¶
func (d DuplicateMigrationVersionError) Error() string
type IllegalMigrationVersionError ¶
type IllegalMigrationVersionError struct {
Version float64
}
IllegalMigrationVersionError is used to report when the migration has an illegal Version number
func (IllegalMigrationVersionError) Error ¶
func (i IllegalMigrationVersionError) Error() string
type InvalidChecksumError ¶
type InvalidChecksumError struct {
Version float64
}
InvalidChecksumError is used to report when a migration was modified
func (InvalidChecksumError) Error ¶
func (i InvalidChecksumError) Error() string
type MigrationInfo ¶
MigrationInfo is a struct used in the infoChan to inform clients about the migration being applied.
type MigrationRecord ¶
type MigrationRecord struct { Version float64 Description string Checksum string AppliedAt time.Time ExecutionTime time.Duration }
MigrationRecord is the entry in schema table
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func WithMigration ¶
func WithTableName ¶
type RemovedMigrationsError ¶
type RemovedMigrationsError struct {
Versions []float64
}
RemovedMigrationError is used to report when a migration is removed from the list
func (RemovedMigrationsError) Error ¶
func (r RemovedMigrationsError) Error() string
type Status ¶
type Status uint8
Status is a migration status value
const ( // Ignored means that the migrations was not applied to the database Ignored Status = iota // Applied means that the migrations was successfully applied to the database Applied // Pending means that the migrations is a new migration and it is waiting to be applied to the database Pending // Error means that the migration could not be applied to the database Error )