Documentation ¶
Index ¶
- Variables
- type ErrShortLimit
- type Logger
- type Migrate
- func New(sourceUrl, databaseUrl string) (*Migrate, error)
- func NewWithDatabaseInstance(sourceUrl string, databaseName string, databaseInstance database.Driver) (*Migrate, error)
- func NewWithInstance(sourceName string, sourceInstance source.Driver, databaseName string, ...) (*Migrate, error)
- func NewWithSourceInstance(sourceName string, sourceInstance source.Driver, databaseUrl string) (*Migrate, error)
- type Migration
- type MultiError
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoChange = fmt.Errorf("no change") ErrNilVersion = fmt.Errorf("no migration") ErrLocked = fmt.Errorf("database locked") )
View Source
var DefaultBufferSize = uint(100000)
View Source
var DefaultPrefetchMigrations = uint(10)
View Source
var ErrNoName = fmt.Errorf("no name")
Functions ¶
This section is empty.
Types ¶
type ErrShortLimit ¶
type ErrShortLimit struct {
Short uint
}
func (ErrShortLimit) Error ¶
func (e ErrShortLimit) Error() string
type Migrate ¶
type Migrate struct { Log Logger GracefulStop chan bool PrefetchMigrations uint // contains filtered or unexported fields }
func NewWithDatabaseInstance ¶
func NewWithInstance ¶
func NewWithSourceInstance ¶
type Migration ¶
type Migration struct { Identifier string Version uint TargetVersion int Body io.ReadCloser BufferedBody io.Reader BufferSize uint Scheduled time.Time StartedBuffering time.Time FinishedBuffering time.Time FinishedReading time.Time BytesRead int64 // contains filtered or unexported fields }
func NewMigration ¶
func (*Migration) StringLong ¶
type MultiError ¶
type MultiError struct {
Errs []error
}
func NewMultiError ¶
func NewMultiError(errs ...error) MultiError
func (MultiError) Error ¶
func (m MultiError) Error() string
Directories ¶
Path | Synopsis |
---|---|
Deprecated: package migrate is here to make sure v2 is downwards compatible with v1
|
Deprecated: package migrate is here to make sure v2 is downwards compatible with v1 |
Click to show internal directories.
Click to hide internal directories.