Versions in this module Expand all Collapse all v1 v1.0.1 Dec 16, 2022 v1.0.0 Dec 16, 2022 Changes in this version + const DefaultAdvisoryLockingFlag + const DefaultLockTimeout + const DefaultLockTimeoutInterval + const DefaultLockingCollection + const LockIndexName + var DefaultMigrationsCollection = "schema_migrations" + var ErrLockTimeoutConfigConflict = fmt.Errorf(...) + var ErrNilConfig = fmt.Errorf("no config") + var ErrNoDatabaseName = fmt.Errorf("no database name") + func WithInstance(instance *mongo.Client, config *Config) (database.Driver, error) + type Config struct + DatabaseName string + Locking Locking + MigrationsCollection string + TransactionMode bool + type Locking struct + CollectionName string + Enabled bool + Interval int + Timeout int + type Mongo struct + func (m *Mongo) Close() error + func (m *Mongo) Drop() error + func (m *Mongo) Lock() error + func (m *Mongo) Open(dsn string) (database.Driver, error) + func (m *Mongo) Run(migration io.Reader) error + func (m *Mongo) SetVersion(version int, dirty bool) error + func (m *Mongo) Unlock() error + func (m *Mongo) Version() (version int, dirty bool, err error)