Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateAttribute ¶ added in v0.5.0
func ValidateAttribute(definition *base.EntityDefinition, reqAttribute *base.Attribute) (err error)
ValidateAttribute checks whether a given attribute request (reqAttribute) aligns with the attribute definition in a given entity definition. It verifies if the attribute exists in the entity definition and if the attribute type matches the type specified in the request. If the attribute value is not of the expected type, an error is returned.
'definition' is the entity definition containing the definitions of valid attributes. 'reqAttribute' is the attribute that needs to be validated against the entity definition.
Returns nil if the attribute is valid, otherwise returns an error.
func ValidateTuple ¶
func ValidateTuple(definition *base.EntityDefinition, tup *base.Tuple) (err error)
ValidateTuple checks if the provided tuple conforms to the entity definition and relation schema provided. It returns an error if the tuple is invalid.
func ValidateTupleFilter ¶ added in v0.5.0
func ValidateTupleFilter(filter *base.TupleFilter) (err error)
ValidateTupleFilter checks if the provided filter conforms to the entity definition
Types ¶
This section is empty.