migration

package
v0.0.0-...-6857e3f Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const MigrationKey = "routing-api-migration"

Variables

This section is empty.

Functions

func RunAllMigration

func RunAllMigration(sqlDB *db.SqlDB, logger lager.Logger) error

func RunMigrations

func RunMigrations(sqlDB *db.SqlDB, migrations []Migration, logger lager.Logger) error

Types

type Migration

type Migration interface {
	Run(*db.SqlDB) error
	Version() int
}

func InitializeMigrations

func InitializeMigrations() []Migration

type MigrationData

type MigrationData struct {
	MigrationKey   string `gorm:"primary_key"`
	CurrentVersion int
	TargetVersion  int
}

type Runner

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

func NewRunner

func NewRunner(
	sqlDB *db.SqlDB,
	logger lager.Logger,
) *Runner

func (*Runner) Run

func (r *Runner) Run(signals <-chan os.Signal, ready chan<- struct{}) error

type V0InitMigration

type V0InitMigration struct{}

func NewV0InitMigration

func NewV0InitMigration() *V0InitMigration

func (*V0InitMigration) Run

func (v *V0InitMigration) Run(sqlDB *db.SqlDB) error

func (*V0InitMigration) Version

func (v *V0InitMigration) Version() int

type V2UpdateRgMigration

type V2UpdateRgMigration struct{}

func NewV2UpdateRgMigration

func NewV2UpdateRgMigration() *V2UpdateRgMigration

func (*V2UpdateRgMigration) Run

func (v *V2UpdateRgMigration) Run(sqlDB *db.SqlDB) error

func (*V2UpdateRgMigration) Version

func (v *V2UpdateRgMigration) Version() int

type V3UpdateTcpRouteMigration

type V3UpdateTcpRouteMigration struct{}

func NewV3UpdateTcpRouteMigration

func NewV3UpdateTcpRouteMigration() *V3UpdateTcpRouteMigration

func (*V3UpdateTcpRouteMigration) Run

func (v *V3UpdateTcpRouteMigration) Run(sqlDB *db.SqlDB) error

func (*V3UpdateTcpRouteMigration) Version

func (v *V3UpdateTcpRouteMigration) Version() int

type V4AddRgUniqIdxTCPRoute

type V4AddRgUniqIdxTCPRoute struct{}

func NewV4AddRgUniqIdxTCPRouteMigration

func NewV4AddRgUniqIdxTCPRouteMigration() *V4AddRgUniqIdxTCPRoute

func (*V4AddRgUniqIdxTCPRoute) Run

func (v *V4AddRgUniqIdxTCPRoute) Run(sqlDB *db.SqlDB) error

func (*V4AddRgUniqIdxTCPRoute) Version

func (v *V4AddRgUniqIdxTCPRoute) Version() int

type V5SniHostnameMigration

type V5SniHostnameMigration struct{}

func NewV5SniHostnameMigration

func NewV5SniHostnameMigration() *V5SniHostnameMigration

func (*V5SniHostnameMigration) Run

func (v *V5SniHostnameMigration) Run(sqlDB *db.SqlDB) error

func (*V5SniHostnameMigration) Version

func (v *V5SniHostnameMigration) Version() int

type V6TCPTLSRoutes

type V6TCPTLSRoutes struct{}

func NewV6TCPTLSRoutes

func NewV6TCPTLSRoutes() *V6TCPTLSRoutes

func (*V6TCPTLSRoutes) Run

func (v *V6TCPTLSRoutes) Run(sqlDB *db.SqlDB) error

func (*V6TCPTLSRoutes) Version

func (v *V6TCPTLSRoutes) Version() int

type V7TCPTLSRoutes

type V7TCPTLSRoutes struct{}

func NewV7TCPTLSRoutes

func NewV7TCPTLSRoutes() *V7TCPTLSRoutes

func (*V7TCPTLSRoutes) Run

func (v *V7TCPTLSRoutes) Run(sqlDB *db.SqlDB) error

func (*V7TCPTLSRoutes) Version

func (v *V7TCPTLSRoutes) Version() 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