command

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const USAGE = "Usage: migrate <command> args...\nAvailable commands:\nup, down(rollback), rollback, reset, generate, status"

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	Type     string
	Executor CommandExecutor
	// contains filtered or unexported fields
}

func NewCommand

func NewCommand(m *migrate.Migration) (*Command, error)

func (*Command) Exec

func (c *Command) Exec() error

type CommandExecutor

type CommandExecutor interface {
	Exec() error
	ParseArgs() error
}

type DownCommand

type DownCommand struct {
	Version string
	DownAll bool
	// contains filtered or unexported fields
}

func (*DownCommand) Exec

func (c *DownCommand) Exec() error

func (*DownCommand) ParseArgs

func (c *DownCommand) ParseArgs() error

type GenerateCommand

type GenerateCommand struct {
	Name string
	// contains filtered or unexported fields
}

func (*GenerateCommand) Exec

func (c *GenerateCommand) Exec() error

func (*GenerateCommand) ParseArgs

func (c *GenerateCommand) ParseArgs() error

type ResetCommand

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

func (*ResetCommand) Exec

func (c *ResetCommand) Exec() error

func (*ResetCommand) ParseArgs

func (c *ResetCommand) ParseArgs() error

type RollbackCommand

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

func (*RollbackCommand) Exec

func (c *RollbackCommand) Exec() error

func (*RollbackCommand) ParseArgs

func (c *RollbackCommand) ParseArgs() error

type StatusCommand

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

func (*StatusCommand) Exec

func (c *StatusCommand) Exec() error

func (*StatusCommand) ParseArgs

func (c *StatusCommand) ParseArgs() error

type UpCommand

type UpCommand struct {
	Version string
	// contains filtered or unexported fields
}

func (*UpCommand) Exec

func (c *UpCommand) Exec() error

func (*UpCommand) ParseArgs

func (c *UpCommand) ParseArgs() error

Jump to

Keyboard shortcuts

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