cmd

package
v0.0.0-...-3568023 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2016 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DatabaseURL string
View Source
var DriverName string

Functions

func Down

func Down(ctx *cli.Context)

Down is the command runt when you do `tranporter down` on your CLI.

func Generate

func Generate(c *cli.Context)

Generate generates a migration on the migrations folder

func Init

func Init(ctx *cli.Context)

Init creates needed files/folders for transporter to work correctly.

func Up

func Up(ctx *cli.Context)

Up is the command runt when you do `tranporter up` on your CLI.

Types

type Config

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

Config holds configuration values for transporter

type MainData

type MainData struct {
	TempDir        string
	Environment    string
	DatabaseURL    string
	DatabaseDriver string
}

MainData is the data passed to generate the main.go when running Up and Down.

type MigrationData

type MigrationData struct {
	Identifier  int64
	UpCommand   string
	DownCommand string
	Name        string
}

MigrationData is used to store migration data sent to the template.

Jump to

Keyboard shortcuts

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