migration

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2021 License: BSD-2-Clause Imports: 17 Imported by: 0

Documentation

Overview

Package migration define steps that manage the schema migration using sql-migrate engine

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(ctx context.Context, log *logrus.Entry, recipePath string, name string, nameIndex int, v *viper.Viper, dss datasource.Datasourcers, force bool, dryRun bool, limitedTags []string) (priority uint, steps []common.Steper, err error)

Load data from step file using its viper representation a return priority and list of steps.

Types

type Step

type Step struct {
	Name string
	// contains filtered or unexported fields
}

Step informations.

func (*Step) Cancel

func (st *Step) Cancel(log *logrus.Entry)

Cancel manage the cancellation of the step.

func (*Step) Do

func (st *Step) Do(ctx context.Context, log *logrus.Entry) error

Do manage the runnning of the step.

func (*Step) Finish

func (st *Step) Finish(log *logrus.Entry)

Finish manage the finish of the step (called after all other step of the same priority has ended their Do).

func (*Step) Init

func (st *Step) Init(ctx context.Context, log *logrus.Entry) error

Init manage the initialization of the step.

func (*Step) PostLoad

func (st *Step) PostLoad(log *logrus.Entry, superseed map[string]string) error

PostLoad modify the loaded step values with the values provided in the map in argument.

func (*Step) ToSkip

func (st *Step) ToSkip(ctx context.Context, log *logrus.Entry) (bool, error)

ToSkip return true if the step must be skipped (based on the query parameter.

Jump to

Keyboard shortcuts

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