aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/hashicorp/terraform/tfdiags/diagnostic.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/hashicorp/terraform/tfdiags/diagnostic.go')
-rw-r--r--vendor/github.com/hashicorp/terraform/tfdiags/diagnostic.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/vendor/github.com/hashicorp/terraform/tfdiags/diagnostic.go b/vendor/github.com/hashicorp/terraform/tfdiags/diagnostic.go
index 2c23f76..c91ba9a 100644
--- a/vendor/github.com/hashicorp/terraform/tfdiags/diagnostic.go
+++ b/vendor/github.com/hashicorp/terraform/tfdiags/diagnostic.go
@@ -1,9 +1,18 @@
1package tfdiags 1package tfdiags
2 2
3import (
4 "github.com/hashicorp/hcl2/hcl"
5)
6
3type Diagnostic interface { 7type Diagnostic interface {
4 Severity() Severity 8 Severity() Severity
5 Description() Description 9 Description() Description
6 Source() Source 10 Source() Source
11
12 // FromExpr returns the expression-related context for the diagnostic, if
13 // available. Returns nil if the diagnostic is not related to an
14 // expression evaluation.
15 FromExpr() *FromExpr
7} 16}
8 17
9type Severity rune 18type Severity rune
@@ -24,3 +33,8 @@ type Source struct {
24 Subject *SourceRange 33 Subject *SourceRange
25 Context *SourceRange 34 Context *SourceRange
26} 35}
36
37type FromExpr struct {
38 Expression hcl.Expression
39 EvalContext *hcl.EvalContext
40}