validatordiag

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2022 License: MPL-2.0 Imports: 4 Imported by: 17

Documentation

Overview

Package validatordiag provides diagnostics helpers for validator implementations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorsCount

func ErrorsCount(diags diag.Diagnostics) int

ErrorsCount returns the amount of diag.Diagnostic in diag.Diagnostics that are diag.SeverityError.

func InvalidAttributeSchemaDiagnostic

func InvalidAttributeSchemaDiagnostic(path *tftypes.AttributePath, description string) diag.Diagnostic

InvalidAttributeSchemaDiagnostic returns an error Diagnostic to be used when a schemavalidator of attributes is invalid.

func InvalidAttributeTypeDiagnostic

func InvalidAttributeTypeDiagnostic(path *tftypes.AttributePath, description string, value string) diag.Diagnostic

InvalidAttributeTypeDiagnostic returns an error Diagnostic to be used when an attribute has an invalid type.

func InvalidAttributeValueDiagnostic

func InvalidAttributeValueDiagnostic(path *tftypes.AttributePath, description string, value string) diag.Diagnostic

InvalidAttributeValueDiagnostic returns an error Diagnostic to be used when an attribute has an invalid value.

func InvalidAttributeValueLengthDiagnostic

func InvalidAttributeValueLengthDiagnostic(path *tftypes.AttributePath, description string, value string) diag.Diagnostic

InvalidAttributeValueLengthDiagnostic returns an error Diagnostic to be used when an attribute's value has an invalid length.

func InvalidAttributeValueMatchDiagnostic

func InvalidAttributeValueMatchDiagnostic(path *tftypes.AttributePath, description string, value string) diag.Diagnostic

InvalidAttributeValueMatchDiagnostic returns an error Diagnostic to be used when an attribute's value has an invalid match.

func WarningsCount

func WarningsCount(diags diag.Diagnostics) int

WarningsCount returns the amount of diag.Diagnostic in diag.Diagnostics that are diag.SeverityWarning.

Types

This section is empty.

Jump to

Keyboard shortcuts

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