migrate

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMigratorFactory         = errors.New("failed to make migrators")
	ErrNoOneMigratorWasDefined = errors.New("no migrators were defined")
)

Functions

This section is empty.

Types

type Migrate

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

func New

func New(ctx context.Context, logger logger.Logger, factory storage.Factorier) (*Migrate, error)

func (*Migrate) Down

func (m *Migrate) Down() error

Down executes each migrator in parallel wrapping them in errgroup without context.

func (*Migrate) Migrators

func (m *Migrate) Migrators() []storage.Storager

Migrators returns all for self management.

func (*Migrate) Up

func (m *Migrate) Up() error

Up executes each migrator in parallel wrapping them in errgroup without context.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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