Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareMigrations ¶
CompareMigrations compares two migrations and returns `true` if `left` migration is less.
func DummyUpDown ¶
DummyUpDown is a dummy migration function.
func MajorityOpts ¶
func MajorityOpts() *options.CollectionOptions
MajorityOpts returns `writeConcern: "majority"` collection option.
Types ¶
type Migration ¶
type Migration struct { Version int64 `json:"version" bson:"version"` Name string `json:"name" bson:"name"` Up ApplyFunc `json:"-" bson:"-"` Down ApplyFunc `json:"-" bson:"-"` Stored bool `json:"-" bson:"-"` }
Migration declares a migration data structure.
type Migrations ¶
type Migrations []Migration
Migrations type declares a slice-type of `Migration` with an implementation of `sort.Sort` interface.
func (Migrations) Len ¶
func (ms Migrations) Len() int
func (Migrations) Swap ¶
func (ms Migrations) Swap(i int, j int)
Click to show internal directories.
Click to hide internal directories.