cli

package
v6.4.2 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2020 License: Apache-2.0 Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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