Documentation ¶
Index ¶
- func CandidatesByResourceType(plan TfPlan) map[string]Candidates
- func ConsumeByLine(reader io.Reader, f func(string)) error
- func Find(runtime RuntimeEnvironment, findFlags FindFlags, planfile NamedWriter) error
- func Plan(runtime RuntimeEnvironment, changes io.Reader, localState NamedWriter) error
- type BestEffortRefactorFinder
- type Candidates
- type Change
- type ChangingResource
- type CommandRunner
- type Edge
- type FindFlags
- type GetApproval
- type GuidedRefactorFinder
- type NamedWriter
- type Prompt
- type Refactor
- type RefactorFinder
- type RuntimeEnvironment
- type SilentSpinner
- type Spinner
- type StartSpinner
- type SurveyPrompt
- type TfPlan
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CandidatesByResourceType ¶
func CandidatesByResourceType(plan TfPlan) map[string]Candidates
func Find ¶
func Find( runtime RuntimeEnvironment, findFlags FindFlags, planfile NamedWriter, ) error
func Plan ¶
func Plan( runtime RuntimeEnvironment, changes io.Reader, localState NamedWriter, ) error
Types ¶
type BestEffortRefactorFinder ¶
type BestEffortRefactorFinder struct{}
type Candidates ¶
type Candidates struct { Creating []ChangingResource Deleting []ChangingResource }
func (Candidates) Add ¶
func (c Candidates) Add(r ChangingResource) Candidates
func (Candidates) All ¶
func (c Candidates) All() []ChangingResource
func (Candidates) NewAddresses ¶
func (c Candidates) NewAddresses() []string
func (Candidates) OldAddresses ¶
func (c Candidates) OldAddresses() []string
func (Candidates) Remove ¶
func (c Candidates) Remove(address string) Candidates
type ChangingResource ¶
type ChangingResource struct { Address string `json:"address"` Change Change `json:"change"` Name string `json:"name"` ProviderName string `json:"provider_name"` Type string `json:"type"` }
func (ChangingResource) GetAction ¶
func (cr ChangingResource) GetAction() string
func (ChangingResource) GetAddress ¶
func (cr ChangingResource) GetAddress() string
func (ChangingResource) GetType ¶
func (cr ChangingResource) GetType() string
type GetApproval ¶
var AutoApprove GetApproval = func() (bool, error) { return true, nil }
type GuidedRefactorFinder ¶
type GuidedRefactorFinder struct {
Prompt Prompt
}
type NamedWriter ¶
type RefactorFinder ¶
type RuntimeEnvironment ¶
type RuntimeEnvironment struct { Execute CommandRunner ExtraArgs []string GetApproval GetApproval Prompt Prompt Screen io.Writer StartSpinner StartSpinner Void io.Writer }
func CreateLiveRuntimeEnvironment ¶
func CreateLiveRuntimeEnvironment(extraArgs []string) RuntimeEnvironment
type SilentSpinner ¶
type SilentSpinner struct{}
func (*SilentSpinner) Stop ¶
func (s *SilentSpinner) Stop() error
func (*SilentSpinner) Success ¶
func (s *SilentSpinner) Success(_ ...interface{})
func (*SilentSpinner) UpdateText ¶
func (s *SilentSpinner) UpdateText(_ string)
type StartSpinner ¶
var StartPtermSpinner StartSpinner = func(x ...interface{}) (Spinner, error) { return pterm.DefaultSpinner.WithRemoveWhenDone(true).Start(x) }
var StartSilentSpinner StartSpinner = func(_ ...interface{}) (Spinner, error) { s := SilentSpinner{} return &s, nil }
type SurveyPrompt ¶
type SurveyPrompt struct{}
Click to show internal directories.
Click to hide internal directories.