mdb

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 6, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClnOpt

type ClnOpt struct {
	IfAll    bool     // if all collections
	ClnNames []string // collection names
}

ClnOpt is collection options

type MDB

type MDB interface {
	// Connect init db connections
	Connect()

	// Disconnect disconnect
	Disconnect()

	// Overview shows source mongo database collection info,
	// includes document count, size, indexes
	Overview(cln ClnOpt)

	// Migrate do mgrations and return result
	Migrate(cln ClnOpt, opt MigOpt)
}

MDB offers mongodb operation support

func NewMDB

func NewMDB(srcURI string, dstURI string) MDB

NewMDB create a new dbs

type MigOpt

type MigOpt struct {
	Interval int64
	IfIndex  bool // if include indexes
	FBatch   int32
}

MigOpt options for migration

Jump to

Keyboard shortcuts

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