]> git.immae.eu Git - github/fretlink/terraform-provider-statuscake.git/blobdiff - vendor/github.com/hashicorp/terraform/tfdiags/diagnostic.go
Upgrade to 0.12
[github/fretlink/terraform-provider-statuscake.git] / vendor / github.com / hashicorp / terraform / tfdiags / diagnostic.go
index 2c23f76ae5bba617c83714730c684924c511ce38..c91ba9a529f41f558ccb9a173b45f0eb2a931c10 100644 (file)
@@ -1,9 +1,18 @@
 package tfdiags
 
+import (
+       "github.com/hashicorp/hcl2/hcl"
+)
+
 type Diagnostic interface {
        Severity() Severity
        Description() Description
        Source() Source
+
+       // FromExpr returns the expression-related context for the diagnostic, if
+       // available. Returns nil if the diagnostic is not related to an
+       // expression evaluation.
+       FromExpr() *FromExpr
 }
 
 type Severity rune
@@ -24,3 +33,8 @@ type Source struct {
        Subject *SourceRange
        Context *SourceRange
 }
+
+type FromExpr struct {
+       Expression  hcl.Expression
+       EvalContext *hcl.EvalContext
+}