runner

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2024 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 Base

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

func New

func New(conn *db.DB) (*Base, error)

func (*Base) Down

func (r *Base) Down(ctx context.Context, tx db.Tx, size int) error

func (*Base) SetElements

func (r *Base) SetElements(elements Elements)

func (*Base) SetLogger

func (r *Base) SetLogger(l logger.Logger)

func (*Base) Up

func (s *Base) Up(ctx context.Context, tx db.Tx, size int) error

type Elements

type Elements []Migration

func (*Elements) Len

func (s *Elements) Len() int

func (*Elements) Less

func (s *Elements) Less(i, j int) bool

func (*Elements) Swap

func (s *Elements) Swap(i, j int)

type Migration

type Migration interface {
	Up(ctx context.Context, tx db.Tx) error
	Down(ctx context.Context, tx db.Tx) error
	Version() (string, error)
	Path() string
	Kind() (constants.MigrationKind, error)
}

type Yaml

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

func NewYaml

func NewYaml(conn *sqlx.DB, pathGlob string) (*Yaml, error)

func (Yaml) Down

func (y Yaml) Down(ctx context.Context, tx db.Tx, size int) error

func (Yaml) Up

func (y Yaml) Up(ctx context.Context, tx db.Tx, size int) error

Jump to

Keyboard shortcuts

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