migrator

package
v0.0.0-...-f7dd486 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DBConnection

type DBConnection interface {
	Exec(ctx context.Context, sql string) error
}

type DirectoryOperator

type DirectoryOperator interface {
	IsFileExist(name string) bool
	ReadFile(name string) ([]byte, error)
}

type Migrator

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

func NewMigrator

func NewMigrator(do DirectoryOperator, db DBConnection) *Migrator

func (*Migrator) Migrate

func (m *Migrator) Migrate(ctx context.Context, workingDir string, md Mode) error

type Mode

type Mode string
const (
	UP   Mode = "up"
	DOWN Mode = "down"
)

Jump to

Keyboard shortcuts

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