dbtool

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config interface {
	DatabaseName() string
	DataSource() string
	AdminDataSource() string
	DriverName() string
	MigrationSource() string
}

Config for database configuration

type Tool

type Tool struct {
	CreateDatabaseScriptTemplate string
	DropDatabaseScriptTemplate   string
}

Tool contain tool of database operation

func NewPostgresTool

func NewPostgresTool() *Tool

NewPostgresTool return new instance of Tool for Postgres

func (*Tool) CreateDB

func (t *Tool) CreateDB(ctx typictx.ActionContext) (err error)

CreateDB is tool to create new database

func (*Tool) DropDB

func (t *Tool) DropDB(ctx typictx.ActionContext) (err error)

DropDB is tool to drop database

func (*Tool) MigrateDB

func (t *Tool) MigrateDB(ctx typictx.ActionContext) (err error)

MigrateDB is tool to migrate database

func (*Tool) RollbackDB

func (t *Tool) RollbackDB(ctx typictx.ActionContext) (err error)

RollbackDB is tool to rollback database

Jump to

Keyboard shortcuts

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