cli

package
v4.2.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2018 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GenerateCommand

type GenerateCommand struct {
	MigrationDirectory string        `short:"d" long:"directory" default:"migrations" description:"The directory to which the migration files should be written"`
	MigrationName      string        `short:"n" long:"name" description:"The name of the migration"`
	Type               MigrationType `short:"t" long:"type" description:"The file type of the migration"`
}

func NewGenerateCommand

func NewGenerateCommand(migrationDir string, migrationName string, migrationType MigrationType) *GenerateCommand

func (*GenerateCommand) Execute

func (c *GenerateCommand) Execute(args []string) error

func (*GenerateCommand) GenerateGoMigration

func (c *GenerateCommand) GenerateGoMigration() error

func (*GenerateCommand) GenerateSQLMigration

func (c *GenerateCommand) GenerateSQLMigration() error

type MigrationCommand

type MigrationCommand struct {
	GenerateCommand GenerateCommand `command:"generate"`
}

type MigrationType

type MigrationType string
const (
	SQL MigrationType = "sql"
	Go  MigrationType = "go"
)

Jump to

Keyboard shortcuts

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