]> git.immae.eu Git - github/fretlink/terraform-provider-statuscake.git/blame - 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
CommitLineData
15c0b25d
AP
1package tfdiags
2
107c1cdb
ND
3import (
4 "github.com/hashicorp/hcl2/hcl"
5)
6
15c0b25d
AP
7type Diagnostic interface {
8 Severity() Severity
9 Description() Description
10 Source() Source
107c1cdb
ND
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
15c0b25d
AP
16}
17
18type Severity rune
19
20//go:generate stringer -type=Severity
21
22const (
23 Error Severity = 'E'
24 Warning Severity = 'W'
25)
26
27type Description struct {
28 Summary string
29 Detail string
30}
31
32type Source struct {
33 Subject *SourceRange
34 Context *SourceRange
35}
107c1cdb
ND
36
37type FromExpr struct {
38 Expression hcl.Expression
39 EvalContext *hcl.EvalContext
40}