errors

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsApplyFailed

func IsApplyFailed(err error) bool

IsApplyFailed returns whether error is due to failure of an apply operation.

func IsDestroyFailed

func IsDestroyFailed(err error) bool

IsDestroyFailed returns whether error is due to failure of a destroy operation.

func IsPlanFailed

func IsPlanFailed(err error) bool

IsPlanFailed returns whether error is due to failure of a destroy operation.

func IsRefreshFailed

func IsRefreshFailed(err error) bool

IsRefreshFailed returns whether error is due to failure of a destroy operation.

func NewApplyFailed

func NewApplyFailed(logs []byte) error

NewApplyFailed returns a new apply failure error with given logs.

func NewDestroyFailed

func NewDestroyFailed(logs []byte) error

NewDestroyFailed returns a new destroy failure error with given logs.

func NewPlanFailed

func NewPlanFailed(logs []byte) error

NewPlanFailed returns a new destroy failure error with given logs.

func NewRefreshFailed

func NewRefreshFailed(logs []byte) error

NewRefreshFailed returns a new destroy failure error with given logs.

Types

type LogDiagnostic

type LogDiagnostic struct {
	Severity string `json:"severity"`
	Summary  string `json:"summary"`
	Detail   string `json:"detail"`
	Range    Range  `json:"range"`
}

LogDiagnostic represents relevant fields of a Terraform CLI JSON-formatted log line diagnostic info

type Range

type Range struct {
	FileName string `json:"filename"`
}

Range represents a line range in a Terraform workspace file

type TerraformLog

type TerraformLog struct {
	Level      string        `json:"@level"`
	Message    string        `json:"@message"`
	Diagnostic LogDiagnostic `json:"diagnostic"`
}

TerraformLog represents relevant fields of a Terraform CLI JSON-formatted log line

Jump to

Keyboard shortcuts

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