github.com/davebizus/terraform-main@v0.11.12-beta1/tfdiags/diagnostic.go (about)

     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  }