migration

package
v0.0.0-...-2942e7d Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

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(logger lager.Logger) error
	SetCryptor(cryptor encryption.Cryptor)
	SetClock(c clock.Clock)
	SetRawSQLDB(rawSQLDB *sql.DB)
	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