migration

package
v0.0.0-...-2bebce4 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: Apache-2.0 Imports: 14 Imported by: 21

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

func NewManager

func NewManager(
	logger lager.Logger,
	sqlDB db.DB,
	rawSQLDB *sql.DB,
	cryptor encryption.Cryptor,
	migrations Migrations,
	migrationsDone chan<- struct{},
	clock clock.Clock,
	databaseDriver string,
	metronClient loggingclient.IngressClient,
) Manager

func (Manager) Run

func (m Manager) Run(signals <-chan os.Signal, ready chan<- struct{}) error

type Migration

type Migration interface {
	String() string
	Version() int64
	Up(tx *sql.Tx, logger lager.Logger) error
	SetCryptor(cryptor encryption.Cryptor)
	SetClock(c clock.Clock)
	SetDBFlavor(flavor string)
}

type Migrations

type Migrations []Migration

func (Migrations) Len

func (m Migrations) Len() int

func (Migrations) Less

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

func (Migrations) Swap

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

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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