verification

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 9 Imported by: 3

Documentation

Overview

Package verification allows you to verify model instances.

The main function is Verify.

Other verification functions (`Verify*`) are left for modularity, in case you want to be explicit about the typing in your code. However, in the large majority of the cases, you only want to call Verify.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DataSpecificationIEC61360sForDocumentHaveAppropriateDataType

func DataSpecificationIEC61360sForDocumentHaveAppropriateDataType(
	embeddedDataSpecifications []aastypes.IEmbeddedDataSpecification) bool

Check that aastypes.DataSpecificationIec61360.DataType is defined appropriately for all data specifications whose content is given as IEC 61360.

func DataSpecificationIEC61360sForPropertyOrValueHaveAppropriateDataType

func DataSpecificationIEC61360sForPropertyOrValueHaveAppropriateDataType(
	embeddedDataSpecifications []aastypes.IEmbeddedDataSpecification) bool

Check that aastypes.DataSpecificationIec61360.DataType is defined appropriately for all data specifications whose content is given as IEC 61360.

func DataSpecificationIEC61360sForReferenceHaveAppropriateDataType

func DataSpecificationIEC61360sForReferenceHaveAppropriateDataType(
	embeddedDataSpecifications []aastypes.IEmbeddedDataSpecification) bool

Check that aastypes.DataSpecificationIec61360.DataType is defined appropriately for all data specifications whose content is given as IEC 61360.

func DataSpecificationIEC61360sHaveDataType

func DataSpecificationIEC61360sHaveDataType(
	embeddedDataSpecifications []aastypes.IEmbeddedDataSpecification) bool

Check that aastypes.DataSpecificationIec61360.DataType is defined for all data specifications whose content is given as IEC 61360.

func DataSpecificationIEC61360sHaveDefinitionAtLeastInEnglish

func DataSpecificationIEC61360sHaveDefinitionAtLeastInEnglish(
	embeddedDataSpecifications []aastypes.IEmbeddedDataSpecification) bool

Check that aastypes.DataSpecificationIec61360.Definition is defined for all data specifications whose content is given as IEC 61360 at least in English.

func DataSpecificationIEC61360sHaveValue

func DataSpecificationIEC61360sHaveValue(
	embeddedDataSpecifications []aastypes.IEmbeddedDataSpecification) bool

Check that aastypes.DataSpecificationIec61360.Value is defined for all data specifications whose content is given as IEC 61360.

func ExtensionNamesAreUnique

func ExtensionNamesAreUnique[E aastypes.IExtension](
	extensions []E) bool

Check that all aastypes.IExtension.Name are unique among `extensions`.

func IDShortsAreUnique

func IDShortsAreUnique[R aastypes.IReferable](
	referables []R) bool

Check that all aastypes.IReferable.IDShort are unique among `referables`.

func IDShortsOfVariablesAreUnique

func IDShortsOfVariablesAreUnique[O1 aastypes.IOperationVariable,
	O2 aastypes.IOperationVariable,
	O3 aastypes.IOperationVariable](
	inputVariables []O1,
	outputVariables []O2,
	inoutputVariables []O3) bool

Check that aastypes.IReferable.IDShort's among all the `inputVariables`, `outputVariables` and `inoutputVariables` are unique.

func IsBCP47ForEnglish

func IsBCP47ForEnglish(text string) bool

Check that the text corresponds to a BCP47 code for english.

func IsModelReferenceTo

func IsModelReferenceTo(
	reference aastypes.IReference,
	expectedType aastypes.KeyTypes,
) bool

Check that the target of the model reference matches the expectedType.

func IsModelReferenceToReferable

func IsModelReferenceToReferable(
	reference aastypes.IReference,
) bool

Check that the target of the reference matches a aasconstants.AASReferables.

func IsXsByte

func IsXsByte(value string) bool

Check that `value` is a valid `xs:byte`.

func IsXsDate

func IsXsDate(value string) bool

Check that `value` is a valid `xs:date`.

The year must fit in the 64-bit range so that we can check whether it is a leap year or not.

func IsXsDateTime

func IsXsDateTime(value string) bool

Check that `value` is a valid `xs:dateTime`.

Year 1 BCE is the last leap BCE year. See https://www.w3.org/TR/xmlschema-2/#dateTime.

func IsXsDateTimeUTC

func IsXsDateTimeUTC(value string) bool

Check that `value` is a valid `xs:dateTime` with the time zone set to UTC.

func IsXsDouble

func IsXsDouble(value string) bool

Check that `value` is a valid `xs:double`.

func IsXsFloat

func IsXsFloat(value string) bool

Check that `value` is a valid `xs:float`.

func IsXsGMonthDay

func IsXsGMonthDay(value string) bool

Check that `value` is a valid `xs:gMonthDay`.

func IsXsInt

func IsXsInt(value string) bool

Check that `value` is a valid `xs:int`.

func IsXsLong

func IsXsLong(value string) bool

Check that `value` is a valid `xs:long`.

func IsXsShort

func IsXsShort(value string) bool

Check that `value` is a valid `xs:short`.

func IsXsUnsignedByte

func IsXsUnsignedByte(value string) bool

Check that `value` is a valid `xs:unsignedByte`.

func IsXsUnsignedInt

func IsXsUnsignedInt(value string) bool

Check that `value` is a valid `xs:unsignedInt`.

func IsXsUnsignedLong

func IsXsUnsignedLong(value string) bool

Check that `value` is a valid `xs:unsignedLong`.

func IsXsUnsignedShort

func IsXsUnsignedShort(value string) bool

Check that `value` is a valid `xs:unsignedShort`.

func LangStringsHaveUniqueLanguages

func LangStringsHaveUniqueLanguages[L aastypes.IAbstractLangString](
	langStrings []L) bool

Check that `langStrings` are specified each for a unique language.

func MatchesBCP47

func MatchesBCP47(text string) bool

Check that text is a valid BCP 47 language tag.

See: https://en.wikipedia.org/wiki/IETF_language_tag

func MatchesIDShort

func MatchesIDShort(text string) bool

Check that text is a valid short ID.

func MatchesMIMEType

func MatchesMIMEType(text string) bool

Check that text conforms to the pattern of MIME type.

The definition has been taken from: https://www.rfc-editor.org/rfc/rfc7231#section-3.1.1.1, https://www.rfc-editor.org/rfc/rfc7230#section-3.2.3 and https://www.rfc-editor.org/rfc/rfc7230#section-3.2.6.

  • `text`: Text to be checked
  • Return True if the text conforms to the pattern

func MatchesRFC8089Path

func MatchesRFC8089Path(text string) bool

Check that text is a path conforming to the pattern of RFC 8089.

The definition has been taken from: https://datatracker.ietf.org/doc/html/rfc8089

  • `text`: Text to be checked
  • Return True if the text conforms to the pattern

func MatchesRevisionType

func MatchesRevisionType(text string) bool

Check that text is a valid revision string.

func MatchesVersionType

func MatchesVersionType(text string) bool

Check that text is a valid version string.

func MatchesXMLSerializableString

func MatchesXMLSerializableString(text string) bool

Check that text conforms to the pattern of the Constraint AASd-130.

Ensures that encoding is possible and interoperability between different serializations is possible.

  • `text`: Text to be checked
  • Return True if the text conforms to the pattern

func MatchesXsAnyURI

func MatchesXsAnyURI(text string) bool

Check that text conforms to the pattern of an `xs:anyURI`.

See: https://www.w3.org/TR/xmlschema-2/#anyURI and https://datatracker.ietf.org/doc/html/rfc3987

  • `text`: Text to be checked
  • Return True if the text conforms to the pattern

func MatchesXsBase64Binary

func MatchesXsBase64Binary(text string) bool

Check that text conforms to the pattern of an `xs:base64Binary`.

See: https://www.w3.org/TR/xmlschema-2/#base64Binary

  • `text`: Text to be checked
  • Return True if the text conforms to the pattern

func MatchesXsBoolean

func MatchesXsBoolean(text string) bool

Check that text conforms to the pattern of an `xs:boolean`.

See: https://www.w3.org/TR/xmlschema-2/#boolean

  • `text`: Text to be checked
  • Return True if the text conforms to the pattern

func MatchesXsByte

func MatchesXsByte(text string) bool

Check that text conforms to the pattern of an `xs:byte`.

See: https://www.w3.org/TR/xmlschema-2/#byte

  • `text`: Text to be checked
  • Return True if the text conforms to the pattern

func MatchesXsDate

func MatchesXsDate(text string) bool

Check that text conforms to the pattern of an `xs:date`.

See: https://www.w3.org/TR/xmlschema-2/#date

  • `text`: Text to be checked
  • Return True if the text conforms to the pattern

func MatchesXsDateTime

func MatchesXsDateTime(text string) bool

Check that text conforms to the pattern of an `xs:dateTime`.

See: https://www.w3.org/TR/xmlschema-2/#dateTime

  • `text`: Text to be checked
  • Return True if the text conforms to the pattern

func MatchesXsDateTimeUTC

func MatchesXsDateTimeUTC(text string) bool

Check that text conforms to the pattern of an `xs:dateTime`.

The time zone must be fixed to UTC. We verify only that the `text` matches a pre-defined pattern. We do not verify that the day of month is correct nor do we check for leap seconds.

See: https://www.w3.org/TR/xmlschema-2/#dateTime

  • `text`: Text to be checked
  • Return True if the text conforms to the pattern

func MatchesXsDecimal

func MatchesXsDecimal(text string) bool

Check that text conforms to the pattern of an `xs:decimal`.

See: https://www.w3.org/TR/xmlschema-2/#decimal

  • `text`: Text to be checked
  • Return True if the text conforms to the pattern

func MatchesXsDouble

func MatchesXsDouble(text string) bool

Check that text conforms to the pattern of an `xs:double`.

See: https://www.w3.org/TR/xmlschema-2/#double

  • `text`: Text to be checked
  • Return True if the text conforms to the pattern

func MatchesXsDuration

func MatchesXsDuration(text string) bool

Check that text conforms to the pattern of an `xs:duration`.

See: https://www.w3.org/TR/xmlschema-2/#duration

  • `text`: Text to be checked
  • Return True if the text conforms to the pattern

func MatchesXsFloat

func MatchesXsFloat(text string) bool

Check that text conforms to the pattern of an `xs:float`.

See: https://www.w3.org/TR/xmlschema-2/#float

  • `text`: Text to be checked
  • Return True if the text conforms to the pattern

func MatchesXsGDay

func MatchesXsGDay(text string) bool

Check that text conforms to the pattern of an `xs:gDay`.

See: https://www.w3.org/TR/xmlschema-2/#gDay

  • `text`: Text to be checked
  • Return True if the text conforms to the pattern

func MatchesXsGMonth

func MatchesXsGMonth(text string) bool

Check that text conforms to the pattern of an `xs:gMonth`.

See: https://www.w3.org/TR/xmlschema-2/#gMonth

  • `text`: Text to be checked
  • Return True if the text conforms to the pattern

func MatchesXsGMonthDay

func MatchesXsGMonthDay(text string) bool

Check that text conforms to the pattern of an `xs:gMonthDay`.

See: https://www.w3.org/TR/xmlschema-2/#gMonthDay

  • `text`: Text to be checked
  • Return True if the text conforms to the pattern

func MatchesXsGYear

func MatchesXsGYear(text string) bool

Check that text conforms to the pattern of an `xs:gYear`.

See: https://www.w3.org/TR/xmlschema-2/#gYear

  • `text`: Text to be checked
  • Return True if the text conforms to the pattern

func MatchesXsGYearMonth

func MatchesXsGYearMonth(text string) bool

Check that text conforms to the pattern of an `xs:gYearMonth`.

See: https://www.w3.org/TR/xmlschema-2/#gYearMonth

  • `text`: Text to be checked
  • Return True if the text conforms to the pattern

func MatchesXsHexBinary

func MatchesXsHexBinary(text string) bool

Check that text conforms to the pattern of an `xs:hexBinary`.

See: https://www.w3.org/TR/xmlschema-2/#hexBinary

  • `text`: Text to be checked
  • Return True if the text conforms to the pattern

func MatchesXsInt

func MatchesXsInt(text string) bool

Check that text conforms to the pattern of an `xs:int`.

See: https://www.w3.org/TR/xmlschema-2/#int

  • `text`: Text to be checked
  • Return True if the text conforms to the pattern

func MatchesXsInteger

func MatchesXsInteger(text string) bool

Check that text conforms to the pattern of an `xs:integer`.

See: https://www.w3.org/TR/xmlschema-2/#integer

  • `text`: Text to be checked
  • Return True if the text conforms to the pattern

func MatchesXsLong

func MatchesXsLong(text string) bool

Check that text conforms to the pattern of an `xs:long`.

See: https://www.w3.org/TR/xmlschema-2/#long

  • `text`: Text to be checked
  • Return True if the text conforms to the pattern

func MatchesXsNegativeInteger

func MatchesXsNegativeInteger(text string) bool

Check that text conforms to the pattern of an `xs:negativeInteger`.

See: https://www.w3.org/TR/xmlschema-2/#negativeInteger

  • `text`: Text to be checked
  • Return True if the text conforms to the pattern

func MatchesXsNonNegativeInteger

func MatchesXsNonNegativeInteger(text string) bool

Check that text conforms to the pattern of an `xs:nonNegativeInteger`.

See: https://www.w3.org/TR/xmlschema-2/#nonNegativeInteger

  • `text`: Text to be checked
  • Return True if the text conforms to the pattern

func MatchesXsNonPositiveInteger

func MatchesXsNonPositiveInteger(text string) bool

Check that text conforms to the pattern of an `xs:nonPositiveInteger`.

See: https://www.w3.org/TR/xmlschema-2/#nonPositiveInteger

  • `text`: Text to be checked
  • Return True if the text conforms to the pattern

func MatchesXsPositiveInteger

func MatchesXsPositiveInteger(text string) bool

Check that text conforms to the pattern of an `xs:positiveInteger`.

See: https://www.w3.org/TR/xmlschema-2/#positiveInteger

  • `text`: Text to be checked
  • Return True if the text conforms to the pattern

func MatchesXsShort

func MatchesXsShort(text string) bool

Check that text conforms to the pattern of an `xs:short`.

See: https://www.w3.org/TR/xmlschema-2/#short

  • `text`: Text to be checked
  • Return True if the text conforms to the pattern

func MatchesXsString

func MatchesXsString(text string) bool

Check that text conforms to the pattern of an `xs:string`.

See: https://www.w3.org/TR/xmlschema-2/#string

  • `text`: Text to be checked
  • Return True if the text conforms to the pattern

func MatchesXsTime

func MatchesXsTime(text string) bool

Check that text conforms to the pattern of an `xs:time`.

See: https://www.w3.org/TR/xmlschema-2/#time

  • `text`: Text to be checked
  • Return True if the text conforms to the pattern

func MatchesXsUnsignedByte

func MatchesXsUnsignedByte(text string) bool

Check that text conforms to the pattern of an `xs:unsignedByte`.

See: https://www.w3.org/TR/xmlschema-2/#unsignedByte

  • `text`: Text to be checked
  • Return True if the text conforms to the pattern

func MatchesXsUnsignedInt

func MatchesXsUnsignedInt(text string) bool

Check that text conforms to the pattern of an `xs:unsignedInt`.

See: https://www.w3.org/TR/xmlschema-2/#unsignedInt

  • `text`: Text to be checked
  • Return True if the text conforms to the pattern

func MatchesXsUnsignedLong

func MatchesXsUnsignedLong(text string) bool

Check that text conforms to the pattern of an `xs:unsignedLong`.

See: https://www.w3.org/TR/xmlschema-2/#unsignedLong

  • `text`: Text to be checked
  • Return True if the text conforms to the pattern

func MatchesXsUnsignedShort

func MatchesXsUnsignedShort(text string) bool

Check that text conforms to the pattern of an `xs:unsignedShort`.

See: https://www.w3.org/TR/xmlschema-2/#unsignedShort

  • `text`: Text to be checked
  • Return True if the text conforms to the pattern

func PropertiesOrRangesHaveValueType

func PropertiesOrRangesHaveValueType[E aastypes.ISubmodelElement](
	elements []E,
	valueType aastypes.DataTypeDefXSD,
) bool

Check that `elements` which are aastypes.IProperty or aastypes.IRange have the given `valueType`.

func QualifierTypesAreUnique

func QualifierTypesAreUnique[Q aastypes.IQualifier](
	qualifiers []Q) bool

Check that there are no duplicate aastypes.IQualifier.Type's in the `qualifiers`.

func ReferenceKeyValuesEqual

func ReferenceKeyValuesEqual(
	that aastypes.IReference,
	other aastypes.IReference) bool

Check that the two references, `that` and `other`, are equal by comparing their aastypes.Reference.Keys by aastypes.Key.Value's.

func SubmodelElementIsOfType

func SubmodelElementIsOfType(
	element aastypes.ISubmodelElement,
	expectedType aastypes.AASSubmodelElements,
) bool

Check that `element` is an instance of the interface corresponding to `expectedType`.

func SubmodelElementsHaveIdenticalSemanticIDs

func SubmodelElementsHaveIdenticalSemanticIDs[S aastypes.ISubmodelElement](
	elements []S) bool

Check that all `elements` have the identical aastypes.IHasSemantics.SemanticID.

func ValueConsistentWithXSDType

func ValueConsistentWithXSDType(
	value string,
	valueType aastypes.DataTypeDefXSD,
) bool

Check that `value` is consistent with the given `valueType`.

func Verify

func Verify(
	that aastypes.IClass,
	onError func(*VerificationError) bool,
) (abort bool)

Verify “that“ instance.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyAdministrativeInformation

func VerifyAdministrativeInformation(
	that aastypes.IAdministrativeInformation,
	onError func(*VerificationError) bool,
) (abort bool)

Verify `that` instance of aastypes.IAdministrativeInformation.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyAnnotatedRelationshipElement

func VerifyAnnotatedRelationshipElement(
	that aastypes.IAnnotatedRelationshipElement,
	onError func(*VerificationError) bool,
) (abort bool)

Verify `that` instance of aastypes.IAnnotatedRelationshipElement.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyAssetAdministrationShell

func VerifyAssetAdministrationShell(
	that aastypes.IAssetAdministrationShell,
	onError func(*VerificationError) bool,
) (abort bool)

Verify `that` instance of aastypes.IAssetAdministrationShell.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyAssetInformation

func VerifyAssetInformation(
	that aastypes.IAssetInformation,
	onError func(*VerificationError) bool,
) (abort bool)

Verify `that` instance of aastypes.IAssetInformation.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyBCP47LanguageTag

func VerifyBCP47LanguageTag(
	that string,
	onError func(*VerificationError) bool,
) (abort bool)

Verify the constraints of `that` value.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyBasicEventElement

func VerifyBasicEventElement(
	that aastypes.IBasicEventElement,
	onError func(*VerificationError) bool,
) (abort bool)

Verify `that` instance of aastypes.IBasicEventElement.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyBlob

func VerifyBlob(
	that aastypes.IBlob,
	onError func(*VerificationError) bool,
) (abort bool)

Verify `that` instance of aastypes.IBlob.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyBlobType

func VerifyBlobType(
	that []byte,
	onError func(*VerificationError) bool,
) (abort bool)

Verify the constraints of `that` value.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyCapability

func VerifyCapability(
	that aastypes.ICapability,
	onError func(*VerificationError) bool,
) (abort bool)

Verify `that` instance of aastypes.ICapability.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyConceptDescription

func VerifyConceptDescription(
	that aastypes.IConceptDescription,
	onError func(*VerificationError) bool,
) (abort bool)

Verify `that` instance of aastypes.IConceptDescription.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyContentType

func VerifyContentType(
	that string,
	onError func(*VerificationError) bool,
) (abort bool)

Verify the constraints of `that` value.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyDataSpecificationIEC61360

func VerifyDataSpecificationIEC61360(
	that aastypes.IDataSpecificationIEC61360,
	onError func(*VerificationError) bool,
) (abort bool)

Verify `that` instance of aastypes.IDataSpecificationIEC61360.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyDateTimeUTC

func VerifyDateTimeUTC(
	that string,
	onError func(*VerificationError) bool,
) (abort bool)

Verify the constraints of `that` value.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyDuration

func VerifyDuration(
	that string,
	onError func(*VerificationError) bool,
) (abort bool)

Verify the constraints of `that` value.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyEmbeddedDataSpecification

func VerifyEmbeddedDataSpecification(
	that aastypes.IEmbeddedDataSpecification,
	onError func(*VerificationError) bool,
) (abort bool)

Verify `that` instance of aastypes.IEmbeddedDataSpecification.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyEntity

func VerifyEntity(
	that aastypes.IEntity,
	onError func(*VerificationError) bool,
) (abort bool)

Verify `that` instance of aastypes.IEntity.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyEnvironment

func VerifyEnvironment(
	that aastypes.IEnvironment,
	onError func(*VerificationError) bool,
) (abort bool)

Verify `that` instance of aastypes.IEnvironment.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyEventPayload

func VerifyEventPayload(
	that aastypes.IEventPayload,
	onError func(*VerificationError) bool,
) (abort bool)

Verify `that` instance of aastypes.IEventPayload.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyExtension

func VerifyExtension(
	that aastypes.IExtension,
	onError func(*VerificationError) bool,
) (abort bool)

Verify `that` instance of aastypes.IExtension.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyFile

func VerifyFile(
	that aastypes.IFile,
	onError func(*VerificationError) bool,
) (abort bool)

Verify `that` instance of aastypes.IFile.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyIDShortType

func VerifyIDShortType(
	that string,
	onError func(*VerificationError) bool,
) (abort bool)

Verify the constraints of `that` value.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyIdentifier

func VerifyIdentifier(
	that string,
	onError func(*VerificationError) bool,
) (abort bool)

Verify the constraints of `that` value.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyKey

func VerifyKey(
	that aastypes.IKey,
	onError func(*VerificationError) bool,
) (abort bool)

Verify `that` instance of aastypes.IKey.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyLabelType

func VerifyLabelType(
	that string,
	onError func(*VerificationError) bool,
) (abort bool)

Verify the constraints of `that` value.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyLangStringDefinitionTypeIEC61360

func VerifyLangStringDefinitionTypeIEC61360(
	that aastypes.ILangStringDefinitionTypeIEC61360,
	onError func(*VerificationError) bool,
) (abort bool)

Verify `that` instance of aastypes.ILangStringDefinitionTypeIEC61360.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyLangStringNameType

func VerifyLangStringNameType(
	that aastypes.ILangStringNameType,
	onError func(*VerificationError) bool,
) (abort bool)

Verify `that` instance of aastypes.ILangStringNameType.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyLangStringPreferredNameTypeIEC61360

func VerifyLangStringPreferredNameTypeIEC61360(
	that aastypes.ILangStringPreferredNameTypeIEC61360,
	onError func(*VerificationError) bool,
) (abort bool)

Verify `that` instance of aastypes.ILangStringPreferredNameTypeIEC61360.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyLangStringShortNameTypeIEC61360

func VerifyLangStringShortNameTypeIEC61360(
	that aastypes.ILangStringShortNameTypeIEC61360,
	onError func(*VerificationError) bool,
) (abort bool)

Verify `that` instance of aastypes.ILangStringShortNameTypeIEC61360.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyLangStringTextType

func VerifyLangStringTextType(
	that aastypes.ILangStringTextType,
	onError func(*VerificationError) bool,
) (abort bool)

Verify `that` instance of aastypes.ILangStringTextType.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyLevelType

func VerifyLevelType(
	that aastypes.ILevelType,
	onError func(*VerificationError) bool,
) (abort bool)

Verify `that` instance of aastypes.ILevelType.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyMessageTopicType

func VerifyMessageTopicType(
	that string,
	onError func(*VerificationError) bool,
) (abort bool)

Verify the constraints of `that` value.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyMultiLanguageProperty

func VerifyMultiLanguageProperty(
	that aastypes.IMultiLanguageProperty,
	onError func(*VerificationError) bool,
) (abort bool)

Verify `that` instance of aastypes.IMultiLanguageProperty.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyNameType

func VerifyNameType(
	that string,
	onError func(*VerificationError) bool,
) (abort bool)

Verify the constraints of `that` value.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyNonEmptyXMLSerializableString

func VerifyNonEmptyXMLSerializableString(
	that string,
	onError func(*VerificationError) bool,
) (abort bool)

Verify the constraints of `that` value.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyOperation

func VerifyOperation(
	that aastypes.IOperation,
	onError func(*VerificationError) bool,
) (abort bool)

Verify `that` instance of aastypes.IOperation.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyOperationVariable

func VerifyOperationVariable(
	that aastypes.IOperationVariable,
	onError func(*VerificationError) bool,
) (abort bool)

Verify `that` instance of aastypes.IOperationVariable.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyPathType

func VerifyPathType(
	that string,
	onError func(*VerificationError) bool,
) (abort bool)

Verify the constraints of `that` value.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyProperty

func VerifyProperty(
	that aastypes.IProperty,
	onError func(*VerificationError) bool,
) (abort bool)

Verify `that` instance of aastypes.IProperty.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyQualifier

func VerifyQualifier(
	that aastypes.IQualifier,
	onError func(*VerificationError) bool,
) (abort bool)

Verify `that` instance of aastypes.IQualifier.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyQualifierType

func VerifyQualifierType(
	that string,
	onError func(*VerificationError) bool,
) (abort bool)

Verify the constraints of `that` value.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyRange

func VerifyRange(
	that aastypes.IRange,
	onError func(*VerificationError) bool,
) (abort bool)

Verify `that` instance of aastypes.IRange.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyReference

func VerifyReference(
	that aastypes.IReference,
	onError func(*VerificationError) bool,
) (abort bool)

Verify `that` instance of aastypes.IReference.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyReferenceElement

func VerifyReferenceElement(
	that aastypes.IReferenceElement,
	onError func(*VerificationError) bool,
) (abort bool)

Verify `that` instance of aastypes.IReferenceElement.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyRelationshipElement

func VerifyRelationshipElement(
	that aastypes.IRelationshipElement,
	onError func(*VerificationError) bool,
) (abort bool)

Verify `that` instance of aastypes.IRelationshipElement.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyResource

func VerifyResource(
	that aastypes.IResource,
	onError func(*VerificationError) bool,
) (abort bool)

Verify `that` instance of aastypes.IResource.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyRevisionType

func VerifyRevisionType(
	that string,
	onError func(*VerificationError) bool,
) (abort bool)

Verify the constraints of `that` value.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifySpecificAssetID

func VerifySpecificAssetID(
	that aastypes.ISpecificAssetID,
	onError func(*VerificationError) bool,
) (abort bool)

Verify `that` instance of aastypes.ISpecificAssetID.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifySubmodel

func VerifySubmodel(
	that aastypes.ISubmodel,
	onError func(*VerificationError) bool,
) (abort bool)

Verify `that` instance of aastypes.ISubmodel.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifySubmodelElementCollection

func VerifySubmodelElementCollection(
	that aastypes.ISubmodelElementCollection,
	onError func(*VerificationError) bool,
) (abort bool)

Verify `that` instance of aastypes.ISubmodelElementCollection.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifySubmodelElementList

func VerifySubmodelElementList(
	that aastypes.ISubmodelElementList,
	onError func(*VerificationError) bool,
) (abort bool)

Verify `that` instance of aastypes.ISubmodelElementList.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyValueDataType

func VerifyValueDataType(
	that string,
	onError func(*VerificationError) bool,
) (abort bool)

Verify the constraints of `that` value.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyValueList

func VerifyValueList(
	that aastypes.IValueList,
	onError func(*VerificationError) bool,
) (abort bool)

Verify `that` instance of aastypes.IValueList.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyValueReferencePair

func VerifyValueReferencePair(
	that aastypes.IValueReferencePair,
	onError func(*VerificationError) bool,
) (abort bool)

Verify `that` instance of aastypes.IValueReferencePair.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyValueTypeIEC61360

func VerifyValueTypeIEC61360(
	that string,
	onError func(*VerificationError) bool,
) (abort bool)

Verify the constraints of `that` value.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

func VerifyVersionType

func VerifyVersionType(
	that string,
	onError func(*VerificationError) bool,
) (abort bool)

Verify the constraints of `that` value.

You have to supply the callback `onError` to iterate over the errors. If `onError` returns abort `true`, this function will abort further verification as well, and return abort `true`. Otherwise, abort `false` is returned.

Types

type VerificationError

type VerificationError struct {
	Path    *aasreporting.Path
	Message string
}

Represent a verification violation.

Implements `error`.

func (*VerificationError) Error

func (ve *VerificationError) Error() string

func (*VerificationError) PathString

func (ve *VerificationError) PathString() string

Render the path as a string.

Jump to

Keyboard shortcuts

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