diff options
Diffstat (limited to 'vendor/github.com/hashicorp/terraform/tfdiags/diagnostic.go')
-rw-r--r-- | vendor/github.com/hashicorp/terraform/tfdiags/diagnostic.go | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/vendor/github.com/hashicorp/terraform/tfdiags/diagnostic.go b/vendor/github.com/hashicorp/terraform/tfdiags/diagnostic.go new file mode 100644 index 0000000..2c23f76 --- /dev/null +++ b/vendor/github.com/hashicorp/terraform/tfdiags/diagnostic.go | |||
@@ -0,0 +1,26 @@ | |||
1 | package tfdiags | ||
2 | |||
3 | type Diagnostic interface { | ||
4 | Severity() Severity | ||
5 | Description() Description | ||
6 | Source() Source | ||
7 | } | ||
8 | |||
9 | type Severity rune | ||
10 | |||
11 | //go:generate stringer -type=Severity | ||
12 | |||
13 | const ( | ||
14 | Error Severity = 'E' | ||
15 | Warning Severity = 'W' | ||
16 | ) | ||
17 | |||
18 | type Description struct { | ||
19 | Summary string | ||
20 | Detail string | ||
21 | } | ||
22 | |||
23 | type Source struct { | ||
24 | Subject *SourceRange | ||
25 | Context *SourceRange | ||
26 | } | ||