migrationkit

package
v0.0.0-...-fe7ef4e Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Migration

type Migration struct {
	*migrate.Migrate
	// contains filtered or unexported fields
}

func NewMigration

func NewMigration(ctx context.Context, conf *MigrationConfig) *Migration

func (*Migration) Close

func (m *Migration) Close() error

func (*Migration) Up

func (m *Migration) Up() error

type MigrationConfig

type MigrationConfig struct {
	// Source is the migration files source directory,
	// currently we only accept file system as source.
	//
	// Register more source types by importing other source packages.
	//
	// File System: https://github.com/golang-migrate/migrate/tree/master/source/file
	Source string `long:"source" env:"SOURCE" description:"the migration files source directory" required:"true"`
	// URL is the migration database URL,
	// currently we only accept Postgres as database.
	//
	// Register more database types by importing other database packages.
	//
	// Postgres: https://github.com/golang-migrate/migrate/tree/master/database/postgres
	URL string `long:"url" env:"URL" description:"the database url" required:"true"`
}

Jump to

Keyboard shortcuts

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