Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplyCommand ¶
type ApplyCommand struct { Meta // contains filtered or unexported fields }
ApplyCommand is a command which computes a new state and pushes it to the remote state.
func (*ApplyCommand) Run ¶
func (c *ApplyCommand) Run(args []string) int
Run runs the procedure of this command.
func (*ApplyCommand) Synopsis ¶
func (c *ApplyCommand) Synopsis() string
Synopsis returns one-line help text.
type FileRunner ¶ added in v0.2.0
type FileRunner struct {
// contains filtered or unexported fields
}
FileRunner is a runner for a single migration file.
func NewFileRunner ¶ added in v0.2.0
func NewFileRunner(filename string, config *config.TfmigrateConfig, option *tfmigrate.MigratorOption) (*FileRunner, error)
NewFileRunner returns a new FileRunner instance.
func (*FileRunner) Apply ¶ added in v0.2.0
func (r *FileRunner) Apply(ctx context.Context) error
Apply applies a single migration.
func (*FileRunner) MigrationConfig ¶ added in v0.2.0
func (r *FileRunner) MigrationConfig() *tfmigrate.MigrationConfig
MigrationConfig returns an instance of migration. This is required for metadata stored in history
type HistoryRunner ¶ added in v0.2.0
type HistoryRunner struct {
// contains filtered or unexported fields
}
HistoryRunner is a history-aware runner. It allows us to apply all unapplied migrations and save them to history.
func NewHistoryRunner ¶ added in v0.2.0
func NewHistoryRunner(ctx context.Context, filename string, config *config.TfmigrateConfig, option *tfmigrate.MigratorOption) (*HistoryRunner, error)
NewHistoryRunner returns a new HistoryRunner instance.
type ListCommand ¶ added in v0.2.13
type ListCommand struct { Meta // contains filtered or unexported fields }
ListCommand is a command which lists migrations.
func (*ListCommand) Help ¶ added in v0.2.13
func (c *ListCommand) Help() string
Help returns long-form help text.
func (*ListCommand) Run ¶ added in v0.2.13
func (c *ListCommand) Run(args []string) int
Run runs the procedure of this command.
func (*ListCommand) Synopsis ¶ added in v0.2.13
func (c *ListCommand) Synopsis() string
Synopsis returns one-line help text.
type Meta ¶
type Meta struct { // UI is a user interface representing input and output. UI cli.Ui // Option customizes a behavior of Migrator. // It is used for shared settings across Migrator instances. Option *tfmigrate.MigratorOption // contains filtered or unexported fields }
Meta are the meta-options that are available on all or most commands.
type PlanCommand ¶
type PlanCommand struct { Meta // contains filtered or unexported fields }
PlanCommand is a command which computes a new state by applying state migration operations to a temporary state.
func (*PlanCommand) Run ¶
func (c *PlanCommand) Run(args []string) int
Run runs the procedure of this command.
func (*PlanCommand) Synopsis ¶
func (c *PlanCommand) Synopsis() string
Synopsis returns one-line help text.