providers

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultLogger = logger.New(
	log.New(os.Stdout, "\r\n", log.LstdFlags),
	logger.Config{
		SlowThreshold: time.Second,
		LogLevel:      logger.Info,
		Colorful:      false,
	},
)

Functions

This section is empty.

Types

type PostgresMigrator

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

func NewPostgresMigrator

func NewPostgresMigrator(host string, port int, username string, password string, database string, sslEnabled bool) *PostgresMigrator

func NewPostgresMigratorFromConnectionString

func NewPostgresMigratorFromConnectionString(connectionString string) *PostgresMigrator

func (*PostgresMigrator) CommitTransaction

func (m *PostgresMigrator) CommitTransaction()

func (*PostgresMigrator) CreateMigrationsTable

func (m *PostgresMigrator) CreateMigrationsTable() error

func (*PostgresMigrator) DeleteFromMigrationsTable

func (m *PostgresMigrator) DeleteFromMigrationsTable(migrationName string, runID string) error

func (*PostgresMigrator) FetchMigrationsByRunID

func (m *PostgresMigrator) FetchMigrationsByRunID(runID string) ([]string, error)

func (*PostgresMigrator) InsertIntoMigrationsTable

func (m *PostgresMigrator) InsertIntoMigrationsTable(migrationName string, runID string) error

func (*PostgresMigrator) LastMigrationRunID

func (m *PostgresMigrator) LastMigrationRunID() (string, error)

func (*PostgresMigrator) MigrationAlreadyRun

func (m *PostgresMigrator) MigrationAlreadyRun(migrationName string) bool

func (*PostgresMigrator) RollbackTransaction

func (m *PostgresMigrator) RollbackTransaction()

func (*PostgresMigrator) RunMigration

func (m *PostgresMigrator) RunMigration(migrationQuery string) error

func (*PostgresMigrator) StartTransaction

func (m *PostgresMigrator) StartTransaction()

Jump to

Keyboard shortcuts

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