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 ¶
- func DataSpecificationIEC61360sForDocumentHaveAppropriateDataType(embeddedDataSpecifications []aastypes.IEmbeddedDataSpecification) bool
- func DataSpecificationIEC61360sForPropertyOrValueHaveAppropriateDataType(embeddedDataSpecifications []aastypes.IEmbeddedDataSpecification) bool
- func DataSpecificationIEC61360sForReferenceHaveAppropriateDataType(embeddedDataSpecifications []aastypes.IEmbeddedDataSpecification) bool
- func DataSpecificationIEC61360sHaveDataType(embeddedDataSpecifications []aastypes.IEmbeddedDataSpecification) bool
- func DataSpecificationIEC61360sHaveDefinitionAtLeastInEnglish(embeddedDataSpecifications []aastypes.IEmbeddedDataSpecification) bool
- func DataSpecificationIEC61360sHaveValue(embeddedDataSpecifications []aastypes.IEmbeddedDataSpecification) bool
- func ExtensionNamesAreUnique[E aastypes.IExtension](extensions []E) bool
- func IDShortsAreUnique[R aastypes.IReferable](referables []R) bool
- func IDShortsOfVariablesAreUnique[O1 aastypes.IOperationVariable, O2 aastypes.IOperationVariable, ...](inputVariables []O1, outputVariables []O2, inoutputVariables []O3) bool
- func IsBCP47ForEnglish(text string) bool
- func IsModelReferenceTo(reference aastypes.IReference, expectedType aastypes.KeyTypes) bool
- func IsModelReferenceToReferable(reference aastypes.IReference) bool
- func IsXsByte(value string) bool
- func IsXsDate(value string) bool
- func IsXsDateTime(value string) bool
- func IsXsDateTimeUTC(value string) bool
- func IsXsDouble(value string) bool
- func IsXsFloat(value string) bool
- func IsXsGMonthDay(value string) bool
- func IsXsInt(value string) bool
- func IsXsLong(value string) bool
- func IsXsShort(value string) bool
- func IsXsUnsignedByte(value string) bool
- func IsXsUnsignedInt(value string) bool
- func IsXsUnsignedLong(value string) bool
- func IsXsUnsignedShort(value string) bool
- func LangStringsHaveUniqueLanguages[L aastypes.IAbstractLangString](langStrings []L) bool
- func MatchesBCP47(text string) bool
- func MatchesIDShort(text string) bool
- func MatchesMIMEType(text string) bool
- func MatchesRFC8089Path(text string) bool
- func MatchesRevisionType(text string) bool
- func MatchesVersionType(text string) bool
- func MatchesXMLSerializableString(text string) bool
- func MatchesXsAnyURI(text string) bool
- func MatchesXsBase64Binary(text string) bool
- func MatchesXsBoolean(text string) bool
- func MatchesXsByte(text string) bool
- func MatchesXsDate(text string) bool
- func MatchesXsDateTime(text string) bool
- func MatchesXsDateTimeUTC(text string) bool
- func MatchesXsDecimal(text string) bool
- func MatchesXsDouble(text string) bool
- func MatchesXsDuration(text string) bool
- func MatchesXsFloat(text string) bool
- func MatchesXsGDay(text string) bool
- func MatchesXsGMonth(text string) bool
- func MatchesXsGMonthDay(text string) bool
- func MatchesXsGYear(text string) bool
- func MatchesXsGYearMonth(text string) bool
- func MatchesXsHexBinary(text string) bool
- func MatchesXsInt(text string) bool
- func MatchesXsInteger(text string) bool
- func MatchesXsLong(text string) bool
- func MatchesXsNegativeInteger(text string) bool
- func MatchesXsNonNegativeInteger(text string) bool
- func MatchesXsNonPositiveInteger(text string) bool
- func MatchesXsPositiveInteger(text string) bool
- func MatchesXsShort(text string) bool
- func MatchesXsString(text string) bool
- func MatchesXsTime(text string) bool
- func MatchesXsUnsignedByte(text string) bool
- func MatchesXsUnsignedInt(text string) bool
- func MatchesXsUnsignedLong(text string) bool
- func MatchesXsUnsignedShort(text string) bool
- func PropertiesOrRangesHaveValueType[E aastypes.ISubmodelElement](elements []E, valueType aastypes.DataTypeDefXSD) bool
- func QualifierTypesAreUnique[Q aastypes.IQualifier](qualifiers []Q) bool
- func ReferenceKeyValuesEqual(that aastypes.IReference, other aastypes.IReference) bool
- func SubmodelElementIsOfType(element aastypes.ISubmodelElement, expectedType aastypes.AASSubmodelElements) bool
- func SubmodelElementsHaveIdenticalSemanticIDs[S aastypes.ISubmodelElement](elements []S) bool
- func ValueConsistentWithXSDType(value string, valueType aastypes.DataTypeDefXSD) bool
- func Verify(that aastypes.IClass, onError func(*VerificationError) bool) (abort bool)
- func VerifyAdministrativeInformation(that aastypes.IAdministrativeInformation, ...) (abort bool)
- func VerifyAnnotatedRelationshipElement(that aastypes.IAnnotatedRelationshipElement, ...) (abort bool)
- func VerifyAssetAdministrationShell(that aastypes.IAssetAdministrationShell, onError func(*VerificationError) bool) (abort bool)
- func VerifyAssetInformation(that aastypes.IAssetInformation, onError func(*VerificationError) bool) (abort bool)
- func VerifyBCP47LanguageTag(that string, onError func(*VerificationError) bool) (abort bool)
- func VerifyBasicEventElement(that aastypes.IBasicEventElement, onError func(*VerificationError) bool) (abort bool)
- func VerifyBlob(that aastypes.IBlob, onError func(*VerificationError) bool) (abort bool)
- func VerifyBlobType(that []byte, onError func(*VerificationError) bool) (abort bool)
- func VerifyCapability(that aastypes.ICapability, onError func(*VerificationError) bool) (abort bool)
- func VerifyConceptDescription(that aastypes.IConceptDescription, onError func(*VerificationError) bool) (abort bool)
- func VerifyContentType(that string, onError func(*VerificationError) bool) (abort bool)
- func VerifyDataSpecificationIEC61360(that aastypes.IDataSpecificationIEC61360, ...) (abort bool)
- func VerifyDateTimeUTC(that string, onError func(*VerificationError) bool) (abort bool)
- func VerifyDuration(that string, onError func(*VerificationError) bool) (abort bool)
- func VerifyEmbeddedDataSpecification(that aastypes.IEmbeddedDataSpecification, ...) (abort bool)
- func VerifyEntity(that aastypes.IEntity, onError func(*VerificationError) bool) (abort bool)
- func VerifyEnvironment(that aastypes.IEnvironment, onError func(*VerificationError) bool) (abort bool)
- func VerifyEventPayload(that aastypes.IEventPayload, onError func(*VerificationError) bool) (abort bool)
- func VerifyExtension(that aastypes.IExtension, onError func(*VerificationError) bool) (abort bool)
- func VerifyFile(that aastypes.IFile, onError func(*VerificationError) bool) (abort bool)
- func VerifyIDShortType(that string, onError func(*VerificationError) bool) (abort bool)
- func VerifyIdentifier(that string, onError func(*VerificationError) bool) (abort bool)
- func VerifyKey(that aastypes.IKey, onError func(*VerificationError) bool) (abort bool)
- func VerifyLabelType(that string, onError func(*VerificationError) bool) (abort bool)
- func VerifyLangStringDefinitionTypeIEC61360(that aastypes.ILangStringDefinitionTypeIEC61360, ...) (abort bool)
- func VerifyLangStringNameType(that aastypes.ILangStringNameType, onError func(*VerificationError) bool) (abort bool)
- func VerifyLangStringPreferredNameTypeIEC61360(that aastypes.ILangStringPreferredNameTypeIEC61360, ...) (abort bool)
- func VerifyLangStringShortNameTypeIEC61360(that aastypes.ILangStringShortNameTypeIEC61360, ...) (abort bool)
- func VerifyLangStringTextType(that aastypes.ILangStringTextType, onError func(*VerificationError) bool) (abort bool)
- func VerifyLevelType(that aastypes.ILevelType, onError func(*VerificationError) bool) (abort bool)
- func VerifyMessageTopicType(that string, onError func(*VerificationError) bool) (abort bool)
- func VerifyMultiLanguageProperty(that aastypes.IMultiLanguageProperty, onError func(*VerificationError) bool) (abort bool)
- func VerifyNameType(that string, onError func(*VerificationError) bool) (abort bool)
- func VerifyNonEmptyXMLSerializableString(that string, onError func(*VerificationError) bool) (abort bool)
- func VerifyOperation(that aastypes.IOperation, onError func(*VerificationError) bool) (abort bool)
- func VerifyOperationVariable(that aastypes.IOperationVariable, onError func(*VerificationError) bool) (abort bool)
- func VerifyPathType(that string, onError func(*VerificationError) bool) (abort bool)
- func VerifyProperty(that aastypes.IProperty, onError func(*VerificationError) bool) (abort bool)
- func VerifyQualifier(that aastypes.IQualifier, onError func(*VerificationError) bool) (abort bool)
- func VerifyQualifierType(that string, onError func(*VerificationError) bool) (abort bool)
- func VerifyRange(that aastypes.IRange, onError func(*VerificationError) bool) (abort bool)
- func VerifyReference(that aastypes.IReference, onError func(*VerificationError) bool) (abort bool)
- func VerifyReferenceElement(that aastypes.IReferenceElement, onError func(*VerificationError) bool) (abort bool)
- func VerifyRelationshipElement(that aastypes.IRelationshipElement, onError func(*VerificationError) bool) (abort bool)
- func VerifyResource(that aastypes.IResource, onError func(*VerificationError) bool) (abort bool)
- func VerifyRevisionType(that string, onError func(*VerificationError) bool) (abort bool)
- func VerifySpecificAssetID(that aastypes.ISpecificAssetID, onError func(*VerificationError) bool) (abort bool)
- func VerifySubmodel(that aastypes.ISubmodel, onError func(*VerificationError) bool) (abort bool)
- func VerifySubmodelElementCollection(that aastypes.ISubmodelElementCollection, ...) (abort bool)
- func VerifySubmodelElementList(that aastypes.ISubmodelElementList, onError func(*VerificationError) bool) (abort bool)
- func VerifyValueDataType(that string, onError func(*VerificationError) bool) (abort bool)
- func VerifyValueList(that aastypes.IValueList, onError func(*VerificationError) bool) (abort bool)
- func VerifyValueReferencePair(that aastypes.IValueReferencePair, onError func(*VerificationError) bool) (abort bool)
- func VerifyValueTypeIEC61360(that string, onError func(*VerificationError) bool) (abort bool)
- func VerifyVersionType(that string, onError func(*VerificationError) bool) (abort bool)
- type VerificationError
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 ¶
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 IsXsDate ¶
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 ¶
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 ¶
Check that `value` is a valid `xs:dateTime` with the time zone set to UTC.
func IsXsGMonthDay ¶
Check that `value` is a valid `xs:gMonthDay`.
func IsXsUnsignedByte ¶
Check that `value` is a valid `xs:unsignedByte`.
func IsXsUnsignedInt ¶
Check that `value` is a valid `xs:unsignedInt`.
func IsXsUnsignedLong ¶
Check that `value` is a valid `xs:unsignedLong`.
func IsXsUnsignedShort ¶
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 ¶
Check that text is a valid BCP 47 language tag.
func MatchesMIMEType ¶
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 ¶
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 ¶
Check that text is a valid revision string.
func MatchesVersionType ¶
Check that text is a valid version string.
func MatchesXMLSerializableString ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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.