tfplan

package
v0.54.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DaemonPlanner

type DaemonPlanner struct {
	Logger log.Logger
	Daemon daemontypes.Daemon
}

DaemonPlanner interfaces with the Daemon to perform interactions with the end user

func (*DaemonPlanner) ConfirmPlan

func (d *DaemonPlanner) ConfirmPlan(
	ctx context.Context,
	formmatedTerraformPlan string,
	release api.Release,
	confirmedChan chan bool,
) (bool, error)

ConfirmPlan presents the plan to the user. returns true if the plan should be applied

func (*DaemonPlanner) WithStatusReceiver

func (d *DaemonPlanner) WithStatusReceiver(daemontypes.StatusReceiver) PlanConfirmer

WithStatusReceiver is a no-op for the daemon version of PlanConfirmer

type DaemonlessPlanner

type DaemonlessPlanner struct {
	Logger log.Logger
	Status daemontypes.StatusReceiver
}

func (*DaemonlessPlanner) ConfirmPlan

func (d *DaemonlessPlanner) ConfirmPlan(
	ctx context.Context,
	formattedTerraformPlan string,
	release api.Release,
	confirmedChan chan bool,
) (bool, error)

func (*DaemonlessPlanner) WithStatusReceiver

func (d *DaemonlessPlanner) WithStatusReceiver(statusReceiver daemontypes.StatusReceiver) PlanConfirmer

type PlanConfirmer

type PlanConfirmer interface {
	ConfirmPlan(
		ctx context.Context,
		formmatedTerraformPlan string,
		release api.Release,
		confirmedChan chan bool,
	) (bool, error)
	WithStatusReceiver(daemontypes.StatusReceiver) PlanConfirmer
}

func NewDaemonlessPlanner

func NewDaemonlessPlanner(
	logger log.Logger,
) PlanConfirmer

func NewPlanner

func NewPlanner(
	logger log.Logger,
	daemon daemontypes.Daemon,
) PlanConfirmer

Jump to

Keyboard shortcuts

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