2022-08-06 14:21:18 +00:00
|
|
|
package tfdiags
|
|
|
|
|
|
|
|
type Diagnostic interface {
|
|
|
|
Severity() Severity
|
|
|
|
Description() Description
|
|
|
|
}
|
|
|
|
|
|
|
|
type Severity rune
|
|
|
|
|
2023-03-20 20:25:53 +00:00
|
|
|
// This code was previously generated with a go:generate directive calling:
|
|
|
|
// go run golang.org/x/tools/cmd/stringer -type=Severity
|
|
|
|
// However, it is now considered frozen and the tooling dependency has been
|
|
|
|
// removed. The String method can be manually updated if necessary.
|
2022-08-06 14:21:18 +00:00
|
|
|
|
|
|
|
const (
|
|
|
|
Error Severity = 'E'
|
|
|
|
Warning Severity = 'W'
|
|
|
|
)
|
|
|
|
|
|
|
|
type Description struct {
|
|
|
|
Summary string
|
|
|
|
Detail string
|
|
|
|
}
|