cli

package
v0.0.0-...-d8b352d Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CurrentVersionCommand

type CurrentVersionCommand struct {
	ConnectionString string `short:"c" long:"connection-string"`
}

func (*CurrentVersionCommand) Execute

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

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 (*GenerateCommand) Execute

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

type MigrateCommand

type MigrateCommand struct {
	MigrationDirectory string `short:"d" long:"directory" default:"migrations" description:"The directory to which the migration files should be written"`
	Version            string `` /* 159-byte string literal not displayed */
	ConnectionString   string `short:"c" long:"connection-string" description:"connection string for db"`
}

func (*MigrateCommand) Execute

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

type MigrationCommand

type MigrationCommand struct {
	//TODO : use commands shortcuts.
	GenerateCommand       GenerateCommand       `command:"generate"`
	CurrentVersionCommand CurrentVersionCommand `command:"current-version"`
	MigrateCommand        MigrateCommand        `command:"migrate"`
}

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