migration

package
v0.0.0-...-3f23628 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddMigration

func AddMigration(migration *Migration)

func RunMigrations

func RunMigrations(ctx context.Context, net *network.Network, clean bool) error

Types

type Migration

type Migration struct {
	Number int
	F      MigrationFunc
}

type MigrationFunc

type MigrationFunc func(context.Context, *network.Network) error

type Migrations

type Migrations []*Migration

func (Migrations) Len

func (s Migrations) Len() int

func (Migrations) Less

func (s Migrations) Less(i, j int) bool

func (Migrations) Swap

func (s Migrations) Swap(i, j int)

type Migrator

type Migrator struct {
	// contains filtered or unexported fields
}

func (*Migrator) AddMigration

func (m *Migrator) AddMigration(migration *Migration)

func (*Migrator) RunMigrations

func (m *Migrator) RunMigrations(ctx context.Context, net *network.Network, clean bool) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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