Documentation ¶
Index ¶
- func CountDiag(d Diagnostic) uint64
- type BaseError
- type Countable
- type Description
- type Diagnostic
- type DiagnosticType
- type Diagnostics
- func (diags Diagnostics) Add(new ...interface{}) Diagnostics
- func (diags Diagnostics) CountBySeverity(sev Severity) uint64
- func (diags Diagnostics) Error() string
- func (diags Diagnostics) Errors() uint64
- func (diags Diagnostics) HasDiags() bool
- func (diags Diagnostics) HasErrors() bool
- func (diags Diagnostics) Len() int
- func (diags Diagnostics) Less(i, j int) bool
- func (diags Diagnostics) Squash() Diagnostics
- func (diags Diagnostics) Swap(i, j int)
- func (diags Diagnostics) Warnings() uint64
- type FlatDiag
- type Redactable
- type RedactedDiagnostic
- type Severity
- type SquashedDiag
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CountDiag ¶ added in v0.7.6
func CountDiag(d Diagnostic) uint64
Types ¶
type BaseError ¶
type BaseError struct { // Err is the underlying go error this diagnostic wraps Err error // contains filtered or unexported fields }
BaseError is a generic error returned when execution is run, satisfies Diagnostic interface
func NewBaseError ¶
func NewBaseError(err error, severity Severity, dt DiagnosticType, resource, summary, details string) *BaseError
NewBaseError creates a BaseError from given error
func (BaseError) Description ¶
func (e BaseError) Description() Description
func (BaseError) Type ¶
func (e BaseError) Type() DiagnosticType
type Description ¶
type Diagnostic ¶
type Diagnostic interface { error Severity() Severity Type() DiagnosticType Description() Description }
type DiagnosticType ¶
type DiagnosticType int
const ( UNKNOWN DiagnosticType = iota RESOLVING ACCESS THROTTLE DATABASE SCHEMA INTERNAL )
func (DiagnosticType) String ¶
func (d DiagnosticType) String() string
type Diagnostics ¶
type Diagnostics []Diagnostic
func (Diagnostics) Add ¶
func (diags Diagnostics) Add(new ...interface{}) Diagnostics
func (Diagnostics) CountBySeverity ¶ added in v0.7.6
func (diags Diagnostics) CountBySeverity(sev Severity) uint64
func (Diagnostics) Error ¶
func (diags Diagnostics) Error() string
func (Diagnostics) Errors ¶
func (diags Diagnostics) Errors() uint64
func (Diagnostics) HasDiags ¶
func (diags Diagnostics) HasDiags() bool
func (Diagnostics) HasErrors ¶
func (diags Diagnostics) HasErrors() bool
func (Diagnostics) Len ¶
func (diags Diagnostics) Len() int
func (Diagnostics) Less ¶
func (diags Diagnostics) Less(i, j int) bool
func (Diagnostics) Squash ¶
func (diags Diagnostics) Squash() Diagnostics
Squash attempts to squash diagnostics
func (Diagnostics) Swap ¶
func (diags Diagnostics) Swap(i, j int)
func (Diagnostics) Warnings ¶
func (diags Diagnostics) Warnings() uint64
type FlatDiag ¶
type FlatDiag struct { Err string Resource string Type DiagnosticType Severity Severity Summary string Description Description }
FlatDiag is a structured diagnostic, usually can be used to create a json of diagnostics or testing.
func FlattenDiags ¶
func FlattenDiags(dd Diagnostics, skipDescription bool) []FlatDiag
FlattenDiags converts Diagnostics to an array of FlatDiag
type Redactable ¶
type Redactable interface {
Redacted() Diagnostic
}
type RedactedDiagnostic ¶
type RedactedDiagnostic struct { Diagnostic // contains filtered or unexported fields }
func NewRedactedDiagnostic ¶
func NewRedactedDiagnostic(vanilla, redacted Diagnostic) RedactedDiagnostic
func (RedactedDiagnostic) Redacted ¶
func (p RedactedDiagnostic) Redacted() Diagnostic
type Severity ¶
type Severity int
const ( // IGNORE severity is set for diagnostics that were ignored by the SDK IGNORE Severity = iota // WARNING severity are diagnostics that should be fixed but aren't fatal to the fetch execution WARNING // ERROR severity are diagnostics that were fatal in the fetch execution and should be fixed. ERROR // PANIC severity are diagnostics that are returned from a panic in the underlying code. PANIC )
type SquashedDiag ¶
type SquashedDiag struct { Diagnostic // contains filtered or unexported fields }
func (SquashedDiag) Count ¶
func (s SquashedDiag) Count() uint64
func (SquashedDiag) Description ¶
func (s SquashedDiag) Description() Description
func (SquashedDiag) Redacted ¶ added in v0.7.6
func (s SquashedDiag) Redacted() Diagnostic
Click to show internal directories.
Click to hide internal directories.