mongomiger

package module
v0.0.0-...-8b8c4eb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 2, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package mongomiger provides MongoDB implementation of the Gomiger interface. Extended from core.BaseMigrator.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mongomiger

type Mongomiger struct {
	*core.BaseMigrator

	Client *mongo.Client
	Db     *mongo.Database
	// contains filtered or unexported fields
}

Mongomiger implements core.DbPlugin for MongoDB.

func NewMongomiger

func NewMongomiger(cfg *core.GomigerConfig) *Mongomiger

NewMongomiger creates a new Mongomiger plugin.

func (*Mongomiger) ApplyMigration

func (m *Mongomiger) ApplyMigration(ctx context.Context, mi core.Migration) error

ApplyMigration implements core.DbPlugin.

func (*Mongomiger) Connect

func (m *Mongomiger) Connect(ctx context.Context) (err error)

Connect implements core.DbPlugin.

func (*Mongomiger) GetSchema

func (m *Mongomiger) GetSchema(ctx context.Context, version string) (*core.Schema, error)

GetSchema implements core.DbPlugin.

func (*Mongomiger) RevertMigration

func (m *Mongomiger) RevertMigration(ctx context.Context, mi core.Migration) error

RevertMigration implements core.DbPlugin.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL