packdiags

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 26, 2024 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DiagFailedToConvertCty

func DiagFailedToConvertCty(err error, sub *hcl.Range) *hcl.Diagnostic

DiagFailedToConvertCty is an error that can happen late in parsing. It should not occur, but is here for coverage.

func DiagFileNotFound

func DiagFileNotFound(f string) *hcl.Diagnostic

DiagFileNotFound is returned when pack parsing encounters a required file that is missing.

func DiagInvalidDefaultValue

func DiagInvalidDefaultValue(detail string, sub *hcl.Range) *hcl.Diagnostic

DiagInvalidDefaultValue is returned when the default for a variable does not match the specified variable type.

func DiagInvalidValueForType

func DiagInvalidValueForType(err error, sub *hcl.Range) *hcl.Diagnostic

DiagInvalidValueForType is returned when a pack consumer attempts to set a variable to an inappopriate value based on the pack's variable specification

func DiagInvalidVariableName

func DiagInvalidVariableName(sub *hcl.Range) *hcl.Diagnostic

DiagInvalidVariableName is returned when a pack author specifies an invalid name for a variable in their varfile

func DiagMissingRootVar

func DiagMissingRootVar(name string, sub *hcl.Range) *hcl.Diagnostic

DiagMissingRootVar is returned when a pack consumer passes in a variable that is not defined for the pack.

func SafeDiagnosticsAppend

func SafeDiagnosticsAppend(base hcl.Diagnostics, in *hcl.Diagnostic) hcl.Diagnostics

SafeDiagnosticsAppend prevents a nil Diagnostic from appending to the target Diagnostics, since HasError is not nil-safe.

func SafeDiagnosticsExtend

func SafeDiagnosticsExtend(base, in hcl.Diagnostics) hcl.Diagnostics

SafeDiagnosticsExtend clean where the input Diagnostics of nils as they are appended to the base

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL